New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Printing #5718
Comments
Do you have a PDF file for us to test with? |
https://www.dropbox.com/s/e2xprzc853lmxlg/example_RTL.pdf?dl=0 |
@Rob--W do you have any ideas what causes this? |
@Hengjie Not immediately, but I have some ideas about how to debug this issue. I don't have the time to debug it at the moment. |
Hi, So i am not sure if that particular problem is chrome-specific. |
Hi, The printing results (using always the same printer on the same linux hosts) from within
Hope this helps I was willing to attach the pdf as mirror to this issue - but github only supports image formats like png, gif and jpg. Should i offer any other mirror for that pdf as i cant quaranty it will be online for unlimited time (might be replaced with an updated version in the future) Feel free to ask further - i will provide as much information as possible/needed ;) Greetings |
In Chrome 41.0.2272.77, the print preview of the PDF looks like this, unless I change the paper size from "Letter" to "A4". Using the A4 letter size, there is a blank page between every page (just like you describe for Firefox): Chrome seems to offer @yafp For comparison, could you take a screenshot of how the PDF looks in your browser/viewer? |
Which version of Chrome are you using? I don't see the "Fit to page" option in Chromium 41.0.2272.77, not with the Chrome extension and neither with the built-in PDF viewer (PDFium). If you untick "Fit to page", does Chrome's result look similar to Acrobat's? |
Hi, i am using Chrome 39.0.2171.95 (64-bit) on Ubuntu 14.04. May i asked why you are only focusing on Chrome? |
May i asked why you are only focusing on Chrome?
Printing is handled differently in Firefox vs other browsers, hence I'm
only focusing on Chrome (also because the issue was reported as being
Chrome-specific).
Should i open another issue for my mozilla concerns?
You can do that when it turns out that the root cause for the bug is
different from Chrome's. For now let's keep the discussion on this issue.
|
Ok - just to have it pointed out once again. so i doubt this pdf file might be the best document to focus on chrome specific issues. Lets hope for @AdamBes then to provide his document as well. |
@yafp Changing the units from pt to inches (with an equivalent value, http://www.printernational.org/iso-paper-sizes.php) seems to fix the blank page problem here. I've reported the inconsistency in handling pt/inch at https://code.google.com/p/chromium/issues/detail?id=467579. @yafp Could you check whether Firefox correctly renders your PDF when the paper size is set to A4? |
@Rob--W: Regarding the additional blank page: |
@yafp The font is probably not related to the letter size (I have seen bad fonts in Firefox's print preview during testing, that's not related to this issue). The blank page issue only occurs in Chrome, not Firefox, right? |
No - my last comment was totally targeting Firefox (v36 on linux). But your question made me retesting Chrome again - and it works fine for me if it comes to the blank pages To sum it up: i do have blank pages at the end of the print if i do use Firefox - but not in Chrome. |
@yafp Ah, I see. I also get a blank page at the end with your PDF (http://kniel.de/download/96141656.02.pdf) in Firefox 36.0 (Linux) with paper size A4 and scale 100%. In Chrome (using the PDF.js Chrome extension and presumably also in the viewer demo), I get a blank page between every page. I guess that you tested using Chrome's built-in PDF viewer instead of the PDF.js viewer? |
@Rob--W I've reuploaded the original PDF here: |
@Hengjie Thanks. It seems to be the same issue as the PDF reported by yafp. It seems that the issue applies to EVERY A4-sized documents (see also #5718 (comment)). I'll write a patch for PDF.js to address the issue. |
Chrome and Firefox internally uses integer pixels for paper size, while PDFs use points. Due to rounding errors, blank pages may appear between printed pages (in Chrome). In Firefox, the rounding errors don't cause any observable issues because pages are clipped anyway (and page breaks are not forced). This patch fixes the problem by converting points to pixels, and rounding the dimensions (height = round down, width = round up). To test the result, open a PDF with A4 size, such as the ones in mozilla#5718 and show a print preview.
Printing a range of PDF pages seems to result in the last few being cut off. (i.e. printing from 26-31 will print pages 26-28 with a blank page in between).
Padding is miles off on some tested files (9cm along the bottom and 8cm along the right edge)
Blank pages are being added after every page (this is visible from print preview) - issues has been consistent on each PDF ive tested except the one with large padding issues above ^
The text was updated successfully, but these errors were encountered: