Closed Bug 1448395 Opened 7 years ago Closed 6 years ago

PDF Print Scaling on PC

Categories

(Firefox :: PDF Viewer, defect, P1)

59 Branch
All
Windows
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: jdawkins, Unassigned)

References

Details

Attachments

(1 file)

Printing PDF documents from PC (tested on Windows 10, Firefox version 59.0.1) results unavoidably in scaled or misaligned content. This is a critical issue for all applications where accurate print registration is needed (printing labels, checks, etc.). Steps to Reproduce 1. Open attached document in Firefox on PC 2. Print document using integrated PDF viewer (pdf.js) 3. Resulting print is scaled to less than 100% size (an easy way to check this is to measure the shaded area, top to bottom; it should be exactly 10") NOTE: Using File > Page Setup to uncheck "Shrink to fit Page Width" will results in print at 100% scale, but the page contents are nevertheless misaligned (shifted down and to the right). Adjusting page margins from 0.5" to 0.0" has no effect. Expected Results Any PDF document with viewer preference PrintScaling = "None" should, by default, print at 100% scale and should align appropriately on the printed page. In our example, the printed result should have a shaded area exactly 10" tall with a 0.5" white space on top and bottom. Interestingly, printing from Firefox for Mac produces the expected results while PC does not. The PrintScaling preference is part of the ISO PDF specification and is honored by other applications (e.g. Adobe Acrobat, Reader, etc.).
I was able to reproduce on windows using a real printer. Stepping through the printing code shows that we scale the page down to the printable region of the page. On a fake printer (XPS or PDF output) things work correctly since the printable region is the entire 8.5"x11" region whereas the real printer has this unwriteable region. I dug a bit more and it looks like this is the very long standing bug 221706. I'll take a quick stab at it to see if I can get the scaling fixed, but judging from my previous experience with the printing code this may be difficult.
Depends on: 221706
(In reply to Brendan Dahl [:bdahl] from comment #1) > I was able to reproduce on windows using a real printer. Stepping through > the printing code shows that we scale the page down to the printable region > of the page. On a fake printer (XPS or PDF output) things work correctly > since the printable region is the entire 8.5"x11" region whereas the real > printer has this unwriteable region. I dug a bit more and it looks like this > is the very long standing bug 221706. I'll take a quick stab at it to see if > I can get the scaling fixed, but judging from my previous experience with > the printing code this may be difficult. Regarding comment on bug 221706: "PDF.js sets @page margins to 0 so now this printout lines up perfectly with output from Acrobat." Does this mean that a change has been applied that delivers the expected print result for the attached PDF? Thanks Brendan.
(In reply to Jeff Dawkins from comment #2) > Does this mean that a change has been applied that delivers the expected > print result for the attached PDF? Yes. You can try it out by downloading and running a test build[1]. Extract the zip and enter that folder with the command prompt and run "firefox.exe --no-remote --profile temp_profile" [1] https://queue.taskcluster.net/v1/task/UTKtNxMhSbiMWPez4LsQ7w/runs/0/artifacts/public/build/target.zip
(In reply to Brendan Dahl [:bdahl] from comment #3) > (In reply to Jeff Dawkins from comment #2) > > Does this mean that a change has been applied that delivers the expected > > print result for the attached PDF? > > > Yes. You can try it out by downloading and running a test build[1]. Extract > the zip and enter that folder with the command prompt and run "firefox.exe > --no-remote --profile temp_profile" > > > > [1] > https://queue.taskcluster.net/v1/task/UTKtNxMhSbiMWPez4LsQ7w/runs/0/ > artifacts/public/build/target.zip Tested and looks good, thank you. Does this need to be further reviewed prior to inclusion in public release? What should be our expectations on timing? Thanks again.
The code over in that other bug is waiting for review from Jim. Once reviewed it should hopefully land in Firefox 61 which is schedule to be released on 2018-06-26.
Priority: -- → P1
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: