pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tilman Hausherr <THaush...@t-online.de>
Subject Re: pdfbox Encrypt from command line
Date Fri, 19 Jun 2015 21:25:53 GMT
Could you please upload the file somewhere?

Tilman

Am 19.06.2015 um 22:27 schrieb Santiago Cardoso Geller:
> Hi! I was trying to Encrypt a pdf from the command line by executing the
> following:
>
> java -jar pdfbox-app-1.8.9.jar Encrypt -U 12345 -O 12345 test.pdf
> test-encrypted.pdf
>
> But I get the following error:
> Encrypt failed with the following exception:
> java.io.IOException: Error: Expected a long type at offset 7321, instead
> got '?'
>          at
> org.apache.pdfbox.pdfparser.BaseParser.readLong(BaseParser.java:1695)
>          at
> org.apache.pdfbox.pdfparser.BaseParser.readObjectNumber(BaseParser.java:1623)
>          at
> org.apache.pdfbox.pdfparser.PDFParser.parseXrefTable(PDFParser.java:818)
>          at
> org.apache.pdfbox.pdfparser.PDFParser.parseObject(PDFParser.java:540)
>          at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:203)
>          at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1220)
>          at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1187)
>          at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:1112)
>          at org.apache.pdfbox.Encrypt.encrypt(Encrypt.java:158)
>          at org.apache.pdfbox.Encrypt.main(Encrypt.java:53)
>          at org.apache.pdfbox.PDFBox.main(PDFBox.java:54)
>
> I only downloaded pdfbox-app-1.8.9.jar file. Is it required something else?
>
> Thanks,
> Santiago
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Mime
View raw message