6 Replies Latest reply: Sep 2, 2013 7:36 AM by AdobeHacker8 RSS

    Prevent printing to PDF file

    AdobeHacker8 Community Member

      Hi,

       

      I'm trying to prevent the user to print a protected PDF document to a PDF file.

      My questions:

      - How do I detect that the user prints to a specific printer?

        My replacement callback for AVDocDoPrint is called before the print dialog is viewed. But after the dialog is closed I have no chance to find out, which printer the user has chosen.

        My replacement callback for AVDocPrintPagesWithParams is never called..

        Or how can I find out the properties of the selected printer, like it is a "PDF printer" or a "postscript printer"?

       

      If I print a protected document with the "Adobe PDF" printer, I get the message

      "

      %%[ ProductName: Distiller ]%%

      This PostScript file was created from an encrypted PDF file.

      Redistilling encrypted PDF is not permitted.

      %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%

      %%[ Warning: PostScript error. No PDF file produced. ] %%"

       

      How do I achieve this for every other printer?

       

      Best regards,

      Stefan

        • 1. Re: Prevent printing to PDF file
          lrosenth Adobe Employee

          Just encrypt the file and specify that printing is not supported.   No need to do anything special.

           

          OR do you only want to prevent printing to a PDF (but allow printing to a physical printer)?

          • 2. Re: Prevent printing to PDF file
            AdobeHacker8 Community Member

            HI,

            "OR do you only want to prevent printing to a PDF (but allow printing to a physical printer)?"

            Yes, this is want I want to achieve!

            • 3. Re: Prevent printing to PDF file
              lrosenth Adobe Employee

              That's (for the most part) impossible, unfortunately.

               

              Since there is no way to identify a given printer as a "PDF printer", the only thing you could do would be to get the name of the printer and compare it against some list that you've built.  If it matches, then using the provided hooks for printing in the Acrobat SDK Plugin API, you could then disallow printing to that particular printer.

               

              But given the NUMEROUS 3rd party PDF printers on the market – many of which are themselves OEM'd out and rebranded – I think you have a long road ahead :(.

               

              Can I ask what you are REALLY trying to achieve?  Is it some form of protection/right management?  Perhaps there is a better way if we understood your underlying need.

              • 4. Re: Prevent printing to PDF file
                AdobeHacker8 Community Member

                I currently have a solution which encrypts PDF documents via a generated password, so the user must not remember it.

                The user should be able to print this document, but not to print it as new PDF, which would be then unsecured.

                 

                So if I *may* try the solution to get the name of the selected PDF printer, or some check some other properties of the printer: Is there a hook in the Adobe SDK for that? As I wrote, AVDocDoPrint() is just called before a printer is selected, and after that it seems that there is no more callback into my plugin.

                • 5. Re: Prevent printing to PDF file
                  Test Screen Name CommunityMVP

                  If you allow printing, there really isn't any security. Consider, for example that the user could print it, then take the stack of pages and stick it in the scanner, to scan-to-PDF.

                   

                  Or, what may be a normal network printer might have a feature allowing the queued file to be viewed as PDF...

                   

                  The most you can do is cause inconvenience to the uninformed or unmotivated. Who are, at least, in the majority.

                  • 6. Re: Prevent printing to PDF file
                    AdobeHacker8 Community Member

                    Yes, I know the problems with that. But my customer (the document encryptor) demands it in this way...

                    And I know a perfect solution is impossible.