Tìm kiếm hỗ trợ

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Printing in A4 is damaged

  • 8 trả lời
  • 1 gặp vấn đề này
  • 9 lượt xem
  • Trả lời mới nhất được viết bởi jscher2000

more options

Printing is damaged. All margins are set to zero. When you look at the print preview, you can see that the width of the document must be smaller and the height must be larger. With the red boxes, I made sure that it was A4. It is displayed correctly in other browsers, but not in Firefox. See the screenshot. What can I do?

Đính kèm ảnh chụp màn hình

Giải pháp được chọn

In the meantime I have found the solution.

about:config -> print . printer_Microsoft_Print_To_PDF . print_paper_size_unit -> 0 to 1

Now I have a new problem: The page overlaps by 0.4mm. Means I have to set the page to 210x296.6mm. How can that be? If I make the page 0.1mm larger, a new page will be created.

Đọc câu trả lời này trong ngữ cảnh 👍 0

Tất cả các câu trả lời (8)

more options

Hi Patrick, I'm not sure I understand the red lines/boxes test.

Is this a regular web page that needs to be fitted to your paper size, or is it a PDF that already was created for a particular paper size?

A lot of factors go into printing, some of which you cannot set directly in Print Preview and Page Setup. In particular, Firefox may not know you intend to use A4 sized paper until until you pop up the Print dialog and use the Preferences button to select a paper size, by which time you're out of Preview. Until you print to a new paper size, Firefox may re-use the last size rather than knowing your current intentions.

In addition to the margins you set in the Page Setup dialog, Firefox sometimes becomes aware of "unprintable" areas for your printer and automatically prevent you from using those. (You also can specify those yourself if you find your headers and footers being cut off.)

Print Preview is also an approximation. Are the lines getting cut off in the actual printout (to paper or PDF)?

Hữu ích?

more options

The grid was created with via HTML, CSS and JavaScript. Millimeters are given in CSS, so each red box has a size of 10 mm. I also had to limit the last row by 7mm. The page size is 210x297mm. All other objects, such as the navigation, are hidden. I have to correct myself, in the Microsoft Edge the side is 1mm too long, which is still acceptable. Only in Firefox the view is not correct at all.

Được chỉnh sửa bởi Patrick Gommers vào

Hữu ích?

more options

Giải pháp được chọn

In the meantime I have found the solution.

about:config -> print . printer_Microsoft_Print_To_PDF . print_paper_size_unit -> 0 to 1

Now I have a new problem: The page overlaps by 0.4mm. Means I have to set the page to 210x296.6mm. How can that be? If I make the page 0.1mm larger, a new page will be created.

Hữu ích?

more options

Progress!

Does Firefox show any unprintable area at the top or bottom which could account for the .4mm? Those preferences have names like:

  • print.printer_Adobe_PDF.print_edge_top
  • print.printer_Adobe_PDF.print_unwriteable_margin_top

Otherwise, perhaps there is a rounding error in the code that uses the measurement?

Hữu ích?

more options

I have checked and changed all settings without success.

Được chỉnh sửa bởi Patrick Gommers vào

Hữu ích?

more options

Although in theory at 96 dots per inch an A4 sheet has a length of over 1122 pixels (96 x 11.69 = 1122.24), if set to 100% scaling, Firefox won't fit more than 1121 pixels on the page for some reason.

I think you already have a bug on file for this?

Hữu ích?

more options

The code in my script is fine. As stated in the title, printing with Firefox is damaged, broken or just buggy. I opened the same script with Microsoft Edge. See screenshots. How can I contact the developer?

Được chỉnh sửa bởi Patrick Gommers vào

Hữu ích?

more options

Hữu ích?

Đặt một câu hỏi

Bạn phải đăng nhập vào tài khoản của bạn để trả lời bài viết. Vui lòng bắt đầu một câu hỏi mới, nếu bạn chưa có tài khoản.