#๐Ÿ”’ Extracting mixed data from a PDF

10 messages ยท Page 1 of 1 (latest)

surreal zealot
#

I'm trying to make a study resource from a bunch of PDFs with math questions. I want to extract all the questions from these PDFs into one big .json file, where each question will have its ID number (which is already in the PDF) and the question text. a lot of the questions have images to go with them and/or have math equations that are just images in the PDF and not actual text. How can I easily extract these questions with mixed text and images?

patent shoalBOT
#

@surreal zealot

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

wanton dragon
surreal zealot
wanton dragon
surreal zealot
#

does pymupdf have OCR?

wanton dragon
sweet cave
#

If the number of total PDF pages isn't very large, you can try the image capabilities of the free tier of gpt-4o (provide the PDF pages as images and ask it to transcribe the questions as, say, LaTeX). Any other way of doing OCR on equations is probably going to be hellish.

patent shoalBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.