jrmuizel / pdf-extract

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

Would you be able to make the fields of MediaBox public? #11

Closed anfractuosity closed 5 years ago

anfractuosity commented 5 years ago

Hi,

First of all thanks for the great library. I'm just wondering if you would consider making the fields of MediaBox public?

(I'm creating my a little parser based on your extractor, but to do that, requires the fields to be public, so I can create my own OutputDev)

Also one more question, do you know if there is a way in which the OutputDev, would be able to terminate processing after say the first page?

I noticed there may be a println! that could have been left in accidentally too - https://github.com/jrmuizel/pdf-extract/blob/master/src/lib.rs#L1118

Thanks!

jrmuizel commented 5 years ago

Both of those things should be fixed.

There's not currently a good option to terminate processing after the first page, although you could panic and catch the panic.