Closed Bug 486690 Opened 15 years ago Closed 14 years ago

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

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: sterling, Unassigned)

Details

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

Attachments

(1 file)

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.
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
Closed: 14 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: