Closed Bug 932313 Opened 11 years ago Closed 3 years ago

Low Quality Print Output of PDFs (Mac OS)

Categories

(Core :: Graphics, defect)

x86
macOS
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 1269023

People

(Reporter: david.leibovic, Unassigned, NeedInfo)

References

Details

(Whiteboard: [pdfjs-d-printing])

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0 (Beta/Release) Build ID: 20130910160258 Steps to reproduce: Printing a PDF from pdf.js results in blurry output.
Component: Untriaged → Graphics
Product: Firefox → Core
Version: 24 Branch → Trunk
Severity: normal → major
Hello, I am an engineer at http://etsy.com/ on the Shipping Labels team. We have 200,000 users on Etsy who are onboarded to print shipping labels. These users purchase ~40,000 shipping labels per day. Firefox is the desktop browser of choice for 15-20% of our users. When a shipping label is purchased, it is downloaded as a PDF. The user prints the PDF and affixes it to their package. Printing PDFs using Firefox is a constant struggle. Headers and footers are often left on by default, which can invalidate the label. Furthermore, the printed output of PDF.js is blurry, which can lead to inaccurate barcode scans at the post office. When users write to our support team complaining about blurry PDF printouts from Firefox, we tell them that they can download the PDF and print it from Adobe Reader, or they can switch browsers. Please see examples here: http://fastcheetahs.com/FF_bug_811002.zip In this ZIP you will find several files: CanadaPost_Adobe.pdf - A scanned Canada Post shipping label printed using Adobe Reader. It is clear & crisp. CanadaPost_FF.pdf - A scanned Canada Post shipping label printed using Firefox (PDF.js). It is blurry. CanadaPost_Original.pdf - The original Canada Post shipping label PDF file. USPS_Adobe.pdf - A scanned USPS shipping label printed using Adobe Reader. It is clear & crisp. USPS_FF.pdf - A scanned USPS shipping label printed using Firefox (PDF.js). It is blurry. USPS_Original.pdf - The original USPS shipping label PDF file. These PDFs were all viewed and printed from OS X 10.8.2 Hopefully this bug can be fixed soon, and we can stop turning users away from Firefox! Best regards, David Leibovic
Thanks for reporting this David. > Headers and footers are often left on by default, which can invalidate the label. This should be fixed by bug 839916, isn't it? > Furthermore, the printed output of PDF.js is blurry, which can lead to inaccurate barcode scans at the post office. I took a look at "CanadaPost_Original.pdf". My setup is like this: OSX 10.9, Firefox UX Nightly 2013-10-25. The PDF was opened using the online version of PDF.JS at: http://mozilla.github.io/pdf.js/web/viewer.html The document "CanadaPost_Original.pdf" was printed to a PDF again using the OSX's SaveAsPDF option from the print dialog. As I opened the saved PDF again, I was able to select the text again. That means, the text, that Firefox saved to the PDF using PDF.JS stayed there and did not get rasterised. With this, I am wondering why the fonts at "CanadaPost_FF.pdf" are such blurry. @David, are you sure you use the same print optinos (quality, color, ...) when printing using Firefox/PDF.JS compared to printing using Adobe Reader?
Flags: needinfo?(david.leibovic)
(In reply to Julian Viereck from comment #2) > Thanks for reporting this David. > > > Headers and footers are often left on by default, which can invalidate the label. > > This should be fixed by bug 839916, isn't it? Good point. Yes, I believe it is fixed now. > > > Furthermore, the printed output of PDF.js is blurry, which can lead to inaccurate barcode scans at the post office. > > I took a look at "CanadaPost_Original.pdf". My setup is like this: > > OSX 10.9, Firefox UX Nightly 2013-10-25. The PDF was opened using the online > version of PDF.JS at: > > http://mozilla.github.io/pdf.js/web/viewer.html > > The document "CanadaPost_Original.pdf" was printed to a PDF again using the > OSX's SaveAsPDF option from the print dialog. As I opened the saved PDF > again, I was able to select the text again. That means, the text, that > Firefox saved to the PDF using PDF.JS stayed there and did not get > rasterised. > > With this, I am wondering why the fonts at "CanadaPost_FF.pdf" are such > blurry. > > @David, are you sure you use the same print optinos (quality, color, ...) > when printing using Firefox/PDF.JS compared to printing using Adobe Reader? Yes, as far as I can tell, I am using the same print quality settings in both cases. I can also confirm the behavior you are seeing -- when I go to Print > Save As PDF from the PDF.js print dialog in OS X, everything is crisp, and text stays as text. It is only when a hard paper copy is printed from PDF.js that the blurriness ensues.
Flags: needinfo?(david.leibovic)
Note that bug 811002 has the Windows only fix.
Thanks for getting back at me David! (In reply to david.leibovic from comment #3) > > @David, are you sure you use the same print optinos (quality, color, ...) > > when printing using Firefox/PDF.JS compared to printing using Adobe Reader? > > Yes, as far as I can tell, I am using the same print quality settings in > both cases. I can also confirm the behavior you are seeing -- when I go to > Print > Save As PDF from the PDF.js print dialog in OS X, everything is > crisp, and text stays as text. It is only when a hard paper copy is printed > from PDF.js that the blurriness ensues. What does a web page printed with Firefox looks like for you? Is the text blurred similarly to the blurring you see when printing using PDF.JS?
Flags: needinfo?(david.leibovic)
(In reply to Julian Viereck from comment #5) > What does a web page printed with Firefox looks like for you? Is the text > blurred similarly to the blurring you see when printing using PDF.JS? A normal (non-PDF) webpage does not look blurry when printed.
Flags: needinfo?(david.leibovic)
I am in an almost identical situation to that of @david. My product is also a shipping label that is held to quality standards in its physical (printed) medium. Firefox\PDF.js is consistently showing poor results in this area and as a result my product is often unscannable and degraded. Tossing in a vote for this.
It looks like one can reproduce this bug in OS X without needing a physical printer. In the OS X "Print" dialog, choose "Save as Postscript…" instead of "Save as PDF…" If you then open up the .ps file, you'll see that the text is unselectable, and, if you zoom in, it is badly pixelated.
Jet, who do we have on PDF.js?
Flags: needinfo?(bugs)
Yury: can you help track this down? How/why does PDF.js rasterize text and shapes for printing as described in comment 8 ?
Flags: needinfo?(bugs) → needinfo?(ydelendik)
(In reply to Jet Villegas (:jet) from comment #10) > Yury: can you help track this down? How/why does PDF.js rasterize text and > shapes for printing as described in comment 8 ? Printing of the PDF.js is based on the mozPrintCallback (bug 745025). During onbeforeprint PDF.js creates canvases for each page. (Theoretically resolution shall not be important, however proportions are). Each canvas has mozPrintCallback attached, and PDF.js paints page content on the provided by the API 2d context (no rasterization is happening at PDF.js side). There are few exceptions for small amount of PDF: a PDF contains blending/composition operations, in this intermediate canvases needs to be created at some resolution, and content shall be painted there then composed. I don't think it's related to comment 8, since "Save as PDF..." does not rasterize the output.
Flags: needinfo?(ydelendik)
I did some more testing this morning, and found a few interesting tidbits: - With a physical printer, my sample PDF (simple text) is printing just fine. From comment 11, it sounds like that's what is expected, with the exception of a few PDF operations. Are any of the other reporters on this bug still able to reproduce it? - "Save as PDF…" still functions as expected (i.e. high-quality). - "Save as PostScript…" still gives low-resolution output. Printing *this* HTML page shows *both* pixelated text and sharp text, apparently depending on the font—so perhaps the "Save as PostScript…" is a separate issue from PDF.js entirely? Sorry if the "Save as PostScript…" was a red herring…
I had previously done some printing samples here. https://github.com/mozilla/pdf.js/issues/4706#issuecomment-43330713
(In reply to David Alan Hjelle from comment #12) > - "Save as PDF…" still functions as expected (i.e. high-quality). > - "Save as PostScript…" still gives low-resolution output. Printing *this* > HTML page shows *both* pixelated text and sharp text, apparently depending > on the font—so perhaps the "Save as PostScript…" is a separate issue from > PDF.js entirely? Sorry if the "Save as PostScript…" was a red herring… Short fly-by comment: The output gets rasterized if the Cairo backend (which is used in Firefox to generate the PDF and PostScript output) does not support all the drawing operations used when generating the output. That means it can happen that the CairoPDF backend supports all the drawing operations (and therefore the information can stay as vector graphics in the PDF) while this is not the case for the PostScript output (and as a fall-back solution Cairo starts rasterizing the resulting image before storing it in the PostScript file). Note that in the past we had problems that the PDF output got also rasterized, which you find more information about in bug 811002 and the link [1] from the Cairo Mailing list. [1]: http://lists.cairographics.org/archives/cairo/2012-May/023084.html
(In reply to David Alan Hjelle from comment #12) > - With a physical printer, my sample PDF (simple text) is printing just > fine. From comment 11, it sounds like that's what is expected, with the > exception of a few PDF operations. Are any of the other reporters on this > bug still able to reproduce it? Hi David, I am still able to reproduce this issue on Firefox 37.0.2, Mac OS 10.8.5. Please see my comment #1 for examples.

Hello from year 2021 the Firefox 85 printouts of PDF still sux on FreeBSD (12) - they are blurry and poor quailty unlike other system pdf viewers. Please fix :-)

Hey David,
Can you still reproduce this issue or should we close it?
I tried printing from https://github.com/mozilla/pdf.js/issues/4706#issuecomment-43330713 and it's not blurry for me anymore. If you have another example where to test this please share since this link (http://fastcheetahs.com/FF_bug_811002.zip) isn't available anymore.

Flags: needinfo?(david.leibovic)

On FreeBSD 13 and Firefox 94.0 print looks maybe better but still technical drawings qrcodes etc is worse quality and lighter than other print software (i.e. qpdfview) no matter if internal or system print dialog is used. For technical prints I still have to use external print software.

Example: https://drive.google.com/file/d/1ro6cw8puKANK71s6voCkb6vTfMFy1_h-/view?usp=sharing

Whiteboard: [pdfjs-d-printing]
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.