Closed Bug 752390 Opened 12 years ago Closed 12 years ago

Printing from pdf.js rescales output, makes it unreadable

Categories

(Firefox :: PDF Viewer, defect)

x86
macOS
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bzbarsky, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: https://github.com/mozilla/pdf.js/issues/154 [pdfjs-c-feature][pdfjs-d-printing])

I just tried printing a bank statement from pdf.js as follows:

1)  Load the PDF in the browser (via clicking a link on the bank website)
2)  Click the "Print" button that appears in the toolbar

ACTUAL RESULTS: The PDF got rescaled so that each page of the original PDF fit in the 7" by 9.5" printable area it looks like we use by default.  The usual Gecko corner cruft (filename, url, pagenumber, date) got added.  The text in the resulting PDF is more or less unreadable.

EXPECTED RESULTS: Print the PDF at its original size if that matches the paper size, without adding margins of any sort.  Might keep the text readable.
Dupe of bug 743252?
Not quite; the real issue for this bug is the margins, not what's printed or not printed in them.
Whiteboard: https://github.com/mozilla/pdf.js/issues/154
Depends on: 748935
Whiteboard: https://github.com/mozilla/pdf.js/issues/154 → https://github.com/mozilla/pdf.js/issues/154 [pdfjs-c-feature][pdfjs-d-printing]
This applies on Windows as well. When printing PDFs to HP LaserJet 2300, the printout is scaled horizontallay and vertically to about 3/4 of page.
Documents saved to the disk, then printed with Adobe Reader, print fine.
This happens in both 300dpi and 600dpi. Using WinXP SP3 64, FF v19 Beta
Does this reproduce for a particular kind of PDFs? Printing the document from http://www.education.gov.yk.ca/pdf/pdf-test.pdf works fine with latest beta build on Mac 10.7.5: 
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:19.0) Gecko/20100101 Firefox/19.0 (beta 6)
Build ID: 20130212082553
I just tested with a pay stub from ADP.  It looks like we're now maybe using the entire printable area, but that means that the headers/footers are overlapped on top of the PDF content.

I'll try to check with the original bank statement PDF tonight...
(In reply to Boris Zbarsky (:bz) from comment #5)
> I just tested with a pay stub from ADP.  It looks like we're now maybe using
> the entire printable area, but that means that the headers/footers are
> overlapped on top of the PDF content.

You might want to look at Bug 743252.
Sorry for the lag here.  I've confirmed that the original PDFs I reported this on are fine now: we're no longer scaling them down.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
(In reply to Boris Zbarsky (:bz) from comment #7)
> Sorry for the lag here.  I've confirmed that the original PDFs I reported
> this on are fine now: we're no longer scaling them down.

Boris, can you report back on which version you think this is wfm?
I'm pretty sure I've seen down-scaling after pdf.js shipped with FF19. In fact, FF headers overlayed content AND at the same time the pdf was scaled down by approximately 5%. Did you verify that FF pdf print size is exactly the same (to the millimeter) as in original printout from adobe reader?
> Boris, can you report back on which version you think this is wfm?

Whatever is in nightlies right now.

> Did you verify that FF pdf print size is exactly the same (to the millimeter) as in
> original printout from adobe reader?

No, not least since there was no Adobe reader involved.

However the printout looks pretty close to what Preview is producing; certainly not 5% off (that would be 0.5in on a Letter page height, and that's clearly not happening over here on my particular PDFs).  When I reported the bug it was 10-20% off or so because it was leaving 0.5-1in margins on all sides.  So the issue I was reporting is definitely gone.

If you're seeing problems in a nightly still, please file a new bug, ideally with a testcase.
Blocks: 847049
(In reply to Boris Zbarsky (:bz) from comment #9)
> If you're seeing problems in a nightly still, please file a new bug, ideally
> with a testcase.

Thank's. I am still seeing this on 22.0a1 (2013-03-01), so I filed bug 847049.
You need to log in before you can comment on or make changes to this bug.