开发者

Secured/encrypted PDF: iOS 4.3 displays blank pages

开发者 https://www.devze.com 2023-03-29 20:22 出处:网络
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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消