In a web application we provide some documents as PDF files that can be downloaded or emailed. It nicely works with desktop operating systems where the PDF files are usually viewed with Adobe Reader. However, some iPhones and iPads only display blank pages both when opening the file from Safari or the email app.
We've tried to isolate the problem and it looks as if the following factors are relevant:
- iPhones with iOS 4.2 can display the PDF files, iPhones and iPads with iOS 4.3 cannot.
- It only开发者_如何转开发 affects secured/encrypted files.
We use PDF encryption to set permissions on the files in order to prevent modification, comments etc. Viewing and printing the files is allowed and doesn't require a password.
The PDF files are generated from a Postscript file with Ghostscript and the following options:
-sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPermissions#-3900 -dEncryptionR#3 -sOwnerPassword#123456
Has anybody experienced the same problems? Did Apple change something with iOS 4.3? Are there any other encryption settings that could work?
can you please try adding :
-dKeyLength#128
to your postscript generation. I had a similar problem (with safari desktop) and that fixed it.
精彩评论