printing blank pages with pdf

Discussion in 'Web Design and Development' started by CANEHDN, Sep 18, 2006.

  1. CANEHDN macrumors 6502a

    CANEHDN

    Joined:
    Dec 12, 2005
    Location:
    Eagle Mountain, UT
    #1
    I am creating a site for our employees to view customer documents. All the documents are in pdf format. I've made it so they can't have access to the pdf toolbar but I need to make it so they can't print the page that the pdf opens in. I've put this in my head tag:

    <style type="text/css" media="print">
    body { visibility: hidden; display: none }
    </style>

    I can still right click on the embedded pdf image and print. Or I can ctrl+P and Firefox will always print the file the first time I do it but will print a blank page every time after that. I need to make sure the code works in both Firefox and IE.
     
  2. dunc85 macrumors regular

    Joined:
    Jul 23, 2006
    #2
  3. CANEHDN thread starter macrumors 6502a

    CANEHDN

    Joined:
    Dec 12, 2005
    Location:
    Eagle Mountain, UT
    #3
    The people that have access to view the files are idiots, when it comes to computers. I'm not worried about them turning off things like javascript. All they know is right click, ctrl+p, or File > Print. I just need these things blocked.

    I just don't want to go through thousands of files to change these permissions. Especially when some people do have the ability to print if the file is within 1 year of being created. This is why I'm trying to do it with php and HTML. I can use the variables and if statements to control this.
     
  4. dunc85 macrumors regular

    Joined:
    Jul 23, 2006
    #4
    I may be wrong, but as the PDF effectively opens in an external program (i.e. Acrobat Reader), I'm not sure if anything in the browser itself can control the document.

    I await others' suggestions!
     

Share This Page