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

pdftk failed on ID990A.pdf #45

Open
szcf-weiya opened this issue Aug 1, 2022 · 0 comments
Open

pdftk failed on ID990A.pdf #45

szcf-weiya opened this issue Aug 1, 2022 · 0 comments

Comments

@szcf-weiya
Copy link
Owner

I want to extract the 8th page of ID990A.pdf, but it throws the following error,

$ pdftk ID990A.pdf cat 8 output ID990A_8.pdf 
Error: Unexpected Exception in open_reader()
pdftk.com.lowagie.text.exceptions.InvalidPdfException: unknown.encryption.type.r
	at pdftk.com.lowagie.text.pdf.PdfReader.readPdf(PdfReader.java:514)
	at pdftk.com.lowagie.text.pdf.PdfReader.<init>(PdfReader.java:172)
	at pdftk.com.lowagie.text.pdf.PdfReader.<init>(PdfReader.java:161)
	at com.gitlab.pdftk_java.TK_Session.add_reader(TK_Session.java:126)
	at com.gitlab.pdftk_java.TK_Session.add_reader(TK_Session.java:229)
	at com.gitlab.pdftk_java.TK_Session.open_input_pdf_readers(TK_Session.java:242)
	at com.gitlab.pdftk_java.TK_Session.<init>(TK_Session.java:869)
	at com.gitlab.pdftk_java.pdftk.main_noexit(pdftk.java:150)
	at com.gitlab.pdftk_java.pdftk.main(pdftk.java:128)
Error: Failed to open PDF file: 
   ID990A.pdf
Errors encountered.  No output created.
Done.  Input errors, so no output created.

To avoid the possible snap error that on external disk, I also tried to mv the pdf to ~/Download folder, but still not work.

Also check that pdftk works fine on other pdf documents.

So the potential reason might be the interactive fields in ID990A.pdf

Later, I print the 8th page to another file to get the 8th page.

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

1 participant