pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonard Teo <leon...@ballistiq.com>
Subject Re: PDFBox 1.8.1 thinks this PDF has 0 pages?
Date Mon, 27 May 2013 19:03:40 GMT
Yes siree that works! :)

Many thanks Andreas!

Happy happy happy

Leo


On Mon, May 27, 2013 at 2:10 PM, Andreas Lehmkuehler <andreas@lehmi.de>wrote:

> Hi,
>
> Am 27.05.2013 04:49, schrieb Leonard Teo:
>
>> Hey guys thanks so much for letting me know about the encryption!
>>
>> @Thomas, I ran the .decrypt() method and it seems to be working but I'm
>> getting an exception on saving the document out.
>>
>> The method I'm calling is just a doc.save(String "path to output file");
>>
>> java.lang.NullPointerException
>> at
>> org.apache.pdfbox.pdmodel.**encryption.**StandardSecurityHandler.**
>> prepareDocumentForEncryption(**StandardSecurityHandler.java:**303)
>> at org.apache.pdfbox.pdfwriter.**COSWriter.write(COSWriter.**java:1446)
>> at org.apache.pdfbox.pdmodel.**PDDocument.save(PDDocument.**java:1273)
>> at org.apache.pdfbox.pdmodel.**PDDocument.save(PDDocument.**java:1254)
>> at PDFStamper.stamp(PDFStamper.**java:129)
>> at PDFStamper.main(PDFStamper.**java:174)
>>
>>
>> Any ideas here?
>>
> Try doc.setAllSecurityToBeRemoved(**true) before saving the pdf.
>
>  Thanks so much!
>>
>> Leonard
>> SNIP
>>
>
>
> BR
> Andreas Lehmkühler
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message