MozillaZine

65.0.2 - No Longer Able to Prevent Printing via PHP

User Help for Mozilla Firefox
agoodwin86
 
Posts: 2
Joined: March 7th, 2019, 12:31 pm

Post Posted March 7th, 2019, 2:06 pm

Since the update to version 65.0.2 Our company documentation map has been allowing printing of PDF documents. This is something that was previously prevented via our PHP code. The feature is still working on Chrome and Internet Explorer. I'm not entirely confident reporting it as a bug as perhaps it was an intended change or something that was never meant to function the way it did. Everything I can find about preventing people from printing, states that you cant and I am not able to find any references to the code being used. I know posting here is a long shot and I haven't provided much info to go on, but I figured it would be worth a try to see if anyone has any information about this change.

jscher2000

User avatar
 
Posts: 10429
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted March 8th, 2019, 10:26 am

I don't understand the connection between printing a PDF document -- which I guess means a PDF you are viewing in Firefox's built-in PDF viewer -- and a PHP script. Could you explain the scenario in more detail?

agoodwin86
 
Posts: 2
Joined: March 7th, 2019, 12:31 pm

Post Posted March 8th, 2019, 10:34 am

Our documentation map is viewed via web browser.

You select the link to the particular work instructions or procedure you need to view and it opens a PDF within the browsers built in viewer.

Printing this PDF has been restricted as we do not want "uncontrolled" paper copies floating around.

If you want to be able to print it, you need to specify beforehand so that a watermark can be added.

Our PHP code which calls for the display of the PDF sets a flag to indicate if this has been done or not, and if it has not, it does not allow printing.

Since the latest Firefox update, this function has been failing and the documents are now able to be printed regardless.

therube

User avatar
 
Posts: 19374
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted March 9th, 2019, 7:22 am

And if you test now in 65.0.0 or 65.0.1 it still works as you want?
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

jscher2000

User avatar
 
Posts: 10429
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted March 10th, 2019, 5:35 pm

agoodwin86 wrote:Our PHP code which calls for the display of the PDF sets a flag to indicate if this has been done or not, and if it has not, it does not allow printing.

Presumably the PHP script modifies the PDF that is served to the browser by indicating that it cannot be printed without entering a password.

For example:

Unrestricted: https://www.jeffersonscher.com/temp/userChrome_css.pdf

Restricted: https://www.jeffersonscher.com/temp/userChrome_css_noprint.pdf

Adobe Acrobat enforces the print restriction. Firefox's built-in viewer does not. I don't think it ever has.

Return to Firefox Support


Who is online

Users browsing this forum: No registered users and 6 guests