diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index e7a11a9..95a6d1e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,29 @@ +extern crate lopdf; + +use lopdf::{Document, Object}; + fn main() { - println!("Hello, world!"); + let doc = Document::load("example.pdf").unwrap(); + // dbg!("{:?}", doc); + + for (id, obj) in doc.objects { + // dbg!(obj.as_dict().unwrap()); + + match obj { + // Object::String(bs, format) => { + // dbg!(bs, format); + // () + // }, + Object::Dictionary(d) => { + // dbg!(d); + + for (k, v) in d.iter() { + dbg!(::std::str::from_utf8(&k).unwrap(), v); + } + + () + }, + _ => (), + } + } } |