Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

CANEHDN

macrumors 6502a
Original poster
Dec 12, 2005
855
0
Eagle Mountain, UT
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.
 

CANEHDN

macrumors 6502a
Original poster
Dec 12, 2005
855
0
Eagle Mountain, UT
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.
 

dunc85

macrumors regular
Jul 23, 2006
112
0
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!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.