Search Support

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 uphendule
  • 1 inale nkinga
  • 9 views
  • Igcine ukuphendulwa ngu 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?

Ama-screenshot ananyekiwe

Isisombululo esikhethiwe

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.

Funda le mpendulo ngokuhambisana nalesi sihloko 👍 0

All Replies (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)?

Helpful?

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.

Okulungisiwe ngu Patrick Gommers

Helpful?

more options

Isisombululo Esikhethiwe

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.

Helpful?

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?

Helpful?

more options

I have checked and changed all settings without success.

Okulungisiwe ngu Patrick Gommers

Helpful?

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?

Helpful?

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?

Okulungisiwe ngu Patrick Gommers

Helpful?

more options

Helpful?

Buza umbuzo

Kufanele ulogele ukungena ku-akhawunti yakho ukuze uphendule amaphosti. Uyacelwauqale umbuzo omusha, uma ungekabi nayo i-akhawunti namanje.