Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page 2 is an image and allow OCR is false, giving up #23

Open
vikram-ce opened this issue Dec 10, 2018 · 4 comments
Open

Page 2 is an image and allow OCR is false, giving up #23

vikram-ce opened this issue Dec 10, 2018 · 4 comments

Comments

@vikram-ce
Copy link

vikram-ce commented Dec 10, 2018

10:40:30.718 [main] DEBUG o.a.pdffigures2.GraphicsExtractor$ - Page 2 is an image and allow OCR is false, giving up
Exception in thread "main" org.allenai.pdffigures2.FigureExtractor$OcredPdfException: Page 2 is an image and allow OCR is turned off
at org.allenai.pdffigures2.GraphicsExtractor$.extractRawGraphics(GraphicsExtractor.scala:66)
at org.allenai.pdffigures2.GraphicsExtractor$.extractGraphics(GraphicsExtractor.scala:32)
at org.allenai.pdffigures2.FigureExtractor$$anonfun$7.apply(FigureExtractor.scala:133)

Did anyone get this error?

@luomancs
Copy link

10:40:30.718 [main] DEBUG o.a.pdffigures2.GraphicsExtractor$ - Page 2 is an image and allow OCR is false, giving up
Exception in thread "main" org.allenai.pdffigures2.FigureExtractor$OcredPdfException: Page 2 is an image and allow OCR is turned off
at org.allenai.pdffigures2.GraphicsExtractor$.extractRawGraphics(GraphicsExtractor.scala:66)
at org.allenai.pdffigures2.GraphicsExtractor$.extractGraphics(GraphicsExtractor.scala:32)
at org.allenai.pdffigures2.FigureExtractor$$anonfun$7.apply(FigureExtractor.scala:133)

Did anyone get this error?

have you solve this problem? if so, could you point your solution, I have the same issue, thank you

@lucaslioli
Copy link

You can try to enable the OCR option (allowOcr) in file pdffigures2/src/main/resources/application.conf

@rdverse
Copy link

rdverse commented May 9, 2022

There was no application.conf as indicated by lucaioli in resources folder. However, you can change allowOCR = true here - /src/main/scala/org/allenai/pdffigures2/FigureExtractor.scala

@lucaslioli
Copy link

The file application.conf has been removed from the project in this merge (after my comment), and the OCR enable configuration has been moved to the file pointed by rdverse. Thanks for your update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants