If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

JavaScript print/element-hide to Adobe Acrobat PDF printer may lead to incorrect print output

RESOLVED INCOMPLETE

Status

()

Firefox
General
RESOLVED INCOMPLETE
9 years ago
7 years ago

People

(Reporter: Andrew Sterling Hanenkamp, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [CLOSEME 2010-11-01])

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729)

We've put together an application that provides a print preview of a printable HTML document as an aboslutely positioned layer over top the regular page content. If the user wants to continue with the print, they click a Print button on the page, which uses window.print() to tell Firefox to print the document and then we hide the element after a short delay after the print box closes. Normally, this works well.

However, when demoing this with Adobe Acrobat's PDF Printer, we've discovered that Firefox usually sends the incorrect print information to the print driver. The "usually" part depends on how quick you are at clicking "Save" when choosing what to name and where to save the generated PDF file.

When you click the Print button for the PDF Printer, a Save As... dialog comes up and the Print dialog closes. At this point, the setTimeout() continues to close the print document. If you manage to click Save before the timeout runs out, the print is correct. If you take longer than the few seconds of timeout, the print will come out in correct.

I will attach a 40-line HTML file demonstrating the issue. I've cut it down so that it demonstrates the problem. This has been tested using Adobe Acrobat 8 Professional.

I should also note, that this prints correctly when using Internet Explorer 7 to Adobe Acrobat, Firefox on Mac OS X to Mac's built-in PDF writer, and to every print driver I have at my disposal. The behavior is consistent across at least 3 workstations as well.

Reproducible: Always

Steps to Reproduce:
1. Open the attached HTML file in your browser.
2. Click on the "Print Document" button on the page.
3. Select "Adobe PDF" as your driver and click "Print"
4. Quickly click "Save" before the window closes. This print job should correctly read "This Should Print".
5. Go through steps 1 - 3 again.
6. Now, wait until the screen changes in the background and click "Save". This print job should incorrectly read "This Should Not Print"
Actual Results:  
When using the "Acrobat PDF" driver, the print job will look like the screen does at the point you click "Save" (or even blank in some cases).

Expected Results:  
The print job should look as the screen looks at the moment you click Print, regardless of how long it takes to click "Save" on the "Acrobat PDF" driver.
(Reporter)

Comment 1

9 years ago
Created attachment 370871 [details]
An HTML file demonstrating the problem with Acrobat PDF printing.
This is a mass search for bugs which are in the Firefox General component, are
UNCO, have not been changed for 500 days and have an unspecified version. 

Reporter, can you please update to Firefox 3.6.10 or later, create a fresh profile, http://support.mozilla.com/en-US/kb/managing+profiles, and test again. If you still see the issue, please update this bug. If the issue is gone, please set the status to RESOLVED > WORKSFORME.
Whiteboard: [CLOSEME 2010-11-01]
No reply from reporter, INCOMPLETE. Please retest with Firefox 3.6.12 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.