Copy link to clipboard
Copied
Is it possible to write an Adobe javascript that will NOT allow a PDF to be opened from within a browser and force it to open only in Adobe?? Or, at least, javascript that will see the PDF was not opened in Adobe and warn the user?
Copy link to clipboard
Copied
Not really. This has been answered before in the forums; you can't force the users to open a PDF in one particular PDF handler but you can use other methods, like employing custom dialogues or alerts scripts to encourage the users to use Adobe Reader DC, for example.
You'll also notice that, even if such PDF is encrypted with a password to prevent users from opening the file, there are a lot of programd out there that won't respect these restrictions.
Copy link to clipboard
Copied
This may not be very helpful, but AEM (formally LiveCycle) Designer forms in PDF format do not open in browsers (or on mobile devices).
Copy link to clipboard
Copied
Well... they open. They just don't look right and tell you they need to be opened in Acrobat/Reader.
Copy link to clipboard
Copied
Unless someone wants to look at the "Please wait..." screen forever, I consider it as good as not opening.
Copy link to clipboard
Copied
I agree but it's the internet and I just can't resist an opportunity to be pedantic. 🙂
Copy link to clipboard
Copied
True--it is the internet after all...
To paraphrase H. L. Mencken, one should never underestimate the intelligence of the American people. 🤣
Copy link to clipboard
Copied
Here is a failsafe technique that blocks the user from viewing the PDF unless they open it in a compliant viewer, i.e. desktop Acrobat/Reader
https://www.pdfscripting.com/public/Lite-Document-Security-Description.cfm
Copy link to clipboard
Copied
The trick for doing something like that is to hide the document's contents by default and then use a script to show them when the desired requirements are met. This is not simple to set up, but it is possible.