简体   繁体   中英

PDF Restriction on Mobile Devices (Android/iOS)

I created a code in java to apply restrictions on PDF files and it works fine in Desktops using Acrobat Reader.

在此处输入图片说明

But when I open the same pdf in a mobile device using Drive PDF Viewer or any other app on Android or iOS it is not reflecting and I get the option to print or copy the content.

Any suggestions on how to apply the restrictions on pdf documents which works across platforms? Thanks!!

This is not possible; if it works in Adobe Reader on desktop, you're likely doing it right. But honouring these restrictions is a feature of the PDF reader, so if your reader choses to ignore the restrictions, there is nothing you can do about it.

A workaround would be to place an opaque cover field over every page, and then use JavaScript to hide it.

Of course, the crappy PDF viewers would only display a number of blank pages, and only the better PDF viewers (where we can assume that they do honor the restriction settings) can be used.

A variant would be putting the contents as icons in button fields which are hidden by default. Now, if someone removes or flattens the fields, there would still be no contents.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM