jrmuizel / pdf-extract

A rust library for extracting content from pdfs
396 stars 78 forks source link

how to compile + run examples/extract.rs from cargo? #2

Closed ghost closed 6 years ago

ghost commented 6 years ago

HI, thanks for building this; looks useful to grab text from PDF's using rust. I'm new to rust so forgive my ignorance here. I had to copy examples/extract.rs to lib/main.rs to be able to do cargo run some.pdf. Is there a way to compile examples/extract.rs directly? I saw this error when trying:

» rustc examples/extract.rs 
error[E0463]: can't find crate for `pdf_extract`
 --> examples/extract.rs:1:1
  |
1 | extern crate pdf_extract;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
jrmuizel commented 6 years ago

cargo run --example extract some.pdf