Skip to main content
June 25, 2010
Question

Opening a Secure PDF

  • June 25, 2010
  • 1 reply
  • 451 views

Hello,

I am using CF8 on a WinXP machine, using XAMPP to server the pages.

I am working on an app that needs to display a PDF, but not allow it to be changed or printed.  I know that when I view the PDF in the browser, I cannot remove the "Save a copy" button.  So, to try and deter the users, I have created a script that uses iText to add some text to the PDF and then use <cfpdf> to protect the PDF and set the permissions to "None".

The PDF that is created is stored on the server and when I open the PDF directly (using Adobe Acrobat), but security is working properly.  If I create a href link to the file, the security settings in the browser are maintained.

Since I need to have the user select the PDF, modify the PDF and then view the PDF, I am using a <cfcontent> tag in a cfm to view the PDF.  When I do this, I see the modified PDF, but the security settings are lost.  I can print and save the file.  When using the href method, I can still save the file, but the resulting file, still maintains the security settings.

Does anyone know how I can open the PDF (without using href) and still maintain the security settings?  Everything with the created and protecting of the PDF works properly, but it falls apart when the PDF is viewed.

Thanks

Mike

    This topic has been closed for replies.

    1 reply

    June 25, 2010

    Hello,

    I found the problem.  In the cfm to display the PDF, I was referencing the wrong PDF.

    Thanks

    Mike