unstructured: Fallback for PDF to image if `poppler` is not available

Currently the unstructured-inference library relies on poppler for converting PDFs to images. The goal of this issue is to have a fallback to enable unstructured-inference to still convert PDFs to images if poppler isn’t available. PyMuPDF appears to support converting PDFs to images without any system dependencies. See this StackOverflow post for some example usage patterns.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Unstructured v0.14.3 fails with an error saying that poppler is not available on this simple example:

from unstructured.partition.pdf import partition_pdf

elements = partition_pdf(filename="example.pdf", infer_table_structure=True, strategy="hi_res")

Output:

PDFInfoNotInstalledError: Unable to get page count. Is poppler installed and in PATH?

Wow! Glad it’s fixed 🎉 . Thanks for following up @ArkFreestyle !

Hey @ArkFreestyle - yeah I think what you described makes sense as it’s own issue. If you open a bug report for that behave and tag me + @christinestraub , we can take a look.