Belval / pdf2image

A python module that wraps the pdftoppm utility to convert PDF to PIL Image object
MIT License
1.51k stars 187 forks source link

Missing optional arguments in pdfinfo_from_bytes and pdfinfo_from_path #271

Closed magnurud closed 5 months ago

magnurud commented 8 months ago

Describe the bug pdfinfo_from_bytes and pdfinfo_from_path does not have support for optional arguments -f and -l.

From the documentation:

−f number

Specifies the first page to examine. If multiple pages are requested using the "−f" and "−l" options, the size of each requested page (and, optionally, the bounding boxes for each requested page) are printed. Otherwise, only page one is examined.

−l number

Specifies the last page to examine.

Expected behavior I would expect to be able to get info from several pages of the pdf.

Belval commented 8 months ago

If you can implement it that same way it is implemented in convert_from_path and convert_from_bytes I'd happily accept a PR: https://github.com/Belval/pdf2image/blob/master/pdf2image/pdf2image.py#L41

magnurud commented 6 months ago

If you can implement it that same way it is implemented in convert_from_path and convert_from_bytes I'd happily accept a PR: https://github.com/Belval/pdf2image/blob/master/pdf2image/pdf2image.py#L41

https://github.com/Belval/pdf2image/pull/274