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

Error Not a PDF file though my input is pdf file #48

Open
ammaarahmad1999 opened this issue Mar 18, 2022 · 2 comments
Open

Error Not a PDF file though my input is pdf file #48

ammaarahmad1999 opened this issue Mar 18, 2022 · 2 comments

Comments

@ammaarahmad1999
Copy link

[info] running org.allenai.pdffigures2.FigureExtractorVisualizationCli ./input/Dynamic_Memory_Network_Sochar_QA.pdf
Error: File ./input/Dynamic_Memory_Network_Sochar_QA.pdf is not a PDF file
figure-extractor-visualize

I am getting the error above. Entire Console Output Below

[info] Loading settings for project pdffigures2-master-build from plugins.sbt ...
[info] Loading project definition from /Data/tanik/Multi-modalQA/pdffigures2-master/project
[info] Loading settings for project root from build.sbt ...
[info] Set current project to pdffigures2 (in build file:/Data/tanik/Multi-modalQA/pdffigures2-master/)
[warn] Multiple main classes detected. Run 'show discoveredMainClasses' to see the list
[info] running org.allenai.pdffigures2.FigureExtractorVisualizationCli ./input/Dynamic_Memory_Network_Sochar_QA.pdf
Error: File ./input/Dynamic_Memory_Network_Sochar_QA.pdf is not a PDF file
figure-extractor-visualize
Usage: figure-extractor-visualize [options]

input PDF file
-s, --show-steps Show all intermediate steps
-g, --show-graphic-clustering 0s
Show graphical elements found and how they were clustered
-x, --show-cleaned-figure-regions
Shows figure regions after being post-processed using the rasterized PDF at the given DPI
-e, --show-extractions Show the bounding boxes of the text and graphics that were extracted
-r, --show-regions Show the different regions the PDF was broken into
-c, --show-captions Show the location of the captions
-t, --show-sections Show the location of sections and paragraphs
-d, --display-dpi
DPI to display figures at (default 55)
-p, --pages Pages to extract from (defaults to all), 1 is the first page

Exception: sbt.TrapExitSecurityException thrown from the UncaughtExceptionHandler in thread "run-main-0"
[error] Nonzero exit code: 1
[error] (Compile / runMain) Nonzero exit code: 1
[error] Total time: 1 s, completed 18-Mar-2022, 12:53:44 PM

Any idea how to resolve the issue?

@ranok92
Copy link

ranok92 commented Sep 1, 2023

Try passing the absolute path of the file instead.

@val2021-svg
Copy link

From what I have seen in my case, the filename should not contain "-" nor "_". You can try renaming the file. Also, as @ranok92 said, you should also try passing the absolute path of the file.

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

3 participants