[
https://issues.apache.org/jira/browse/PDFBOX-4436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16785663#comment-16785663
]
Till Weiss commented on PDFBOX-4436:
------------------------------------
I was able to modify pdfbox so it generates files that can be opened on mobile.
By setting both the Crypt Filter Dictionary and the Std Crypt Filter Dictionary
to "direct" objects.
I can not explain why this works but in my testing it seems to.
I have attached both a patch file and test pdf I generated using this code.
(The password on the file is test)
[^working_android.pdf]
^[^mobile.patch]^
> Error opening encrypted PDF in Acrobat IOS/Android
> --------------------------------------------------
>
> Key: PDFBOX-4436
> URL: https://issues.apache.org/jira/browse/PDFBOX-4436
> Project: PDFBox
> Issue Type: Bug
> Components: Crypto
> Affects Versions: 2.0.13
> Environment: Linux, OSX
> Reporter: Klaus Mueller
> Priority: Major
> Attachments: itext-AES256-encrypted.pdf, mobile.patch, plain.pdf,
> test.pdf, testenc.pdf, working_android.pdf
>
>
> When encrypting a PDF document using command line, the encrypted PDF is not
> useable in Acrobat Reader IOS or Android.
> Command Line:
> {{java -jar pdfbox-app-2.0.13.jar Encrypt -O test -U test -keyLength 256
> -canAssemble false -canExtractContent false -canModify false
> -canModifyAnnotations false plain.pdf testenc.pdf }}
> Other viewers like Foxit work.
> Java Version:
> {{java version "1.8.0_201"}}
> {{Java(TM) SE Runtime Environment (build 1.8.0_201-b09)}}
> {{Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)}}
> Tried encryption under Linux and OSX.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]