Closed Bug 1695166 Opened 1 year ago Closed 6 months ago

Print Preview Interface alters user's default printer settings as specified in about:config causing headers and footers to be outside printable range of printers.

Categories

(Toolkit :: Printing, defect)

Firefox 85
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: youngjane1118, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:85.0) Gecko/20100101 Firefox/85.0

Steps to reproduce:

) I updated FF to 85.0.2 on my iMac desktop computer with OS 10.13.6. This FF update contains the new print preview interface feature. This feature was not available in any of my prior FF updates.

  1. I went to print a webpage and discovered that my headers and footers that normally print out at the top and bottom of each printed page were not fully visible on the printed pages.

Actual results:

  1. The headers are positioned too high and the footers are positioned too low so they are cut off all printed pages and are no longer clearly visible at the top and bottom of each printed page. Only an indecipherable edge of the header and footer text is visible across the top and bottom of each printed page now.

  2. The headers and footers are cut off of every printed page regardless of whether I use FF's print preview interface to print, or whether I click the link in FF's interface to "Print using system dialog..." which bypasses FF's interface and opens the computer's print window instead.

  3. I went into about:config and discovered that the unwriteable top and bottom margin settings that I had previously set to 25 were altered to 17 after this update containing FF’s new print preview interface. The narrower setting of 17 caused the headers to be positioned too high and the footers to be positioned too low on the page, placing them beyond the printable range of all my printers. As a result, the headers and footers were cut off all printed pages.

  4. I went to the print.printer settings in about:config and manually changed the unwriteable top and bottom margins back to my user specified setting of 25. I saved the changes in about:config and shut FF down so those changes could take effect.

  5. I reopened FF and went to a webpage. I tried to print the page using FF's print preview interface and also by clicking the link within the interface to "Print using system dialog." Regardless of which method I used, the headers and footers were still cut off all the printed pages.

  6. I went back into about:config and discovered that the unwriteable top and bottom margin settings that I had manually changed back to 25 had inexplicably reverted to 17 again which explains why the headers and footers were still cut off the printed pages.

  7. FF is overriding my user print.printer settings in about:config and setting the unwriteable top and bottom margin settings at 17 which places the headers too high and the footers too low on each page where they cannot be printed since that area exceeds the printable range of most printers.

  8. I had no choice but to disable FF’s print preview interface in the about:config settings so I could permanently restore the unwriteable top and bottom margin settings of 25 that I previously had set so my headers and footers could print out fully on all documents just as they always used to.

Expected results:

  1. The new print preview interface that is featured in FF for printing should not override the user’s previously set personal print.printer settings in about:config. The user’s settings should always have priority.

  2. If FF’s print preview interface has default unwriteable printer margin settings that it wants to use with its print preview preference, but the user changes those settings to accommodate the proper placement of headers and footers in consideration of their printers’ characteristics, the user’s preferences in about:config should take priority and hold.

  3. My hope was that by manually changing the top and bottom unwriteable margins back to 25 in about:config and shutting down FF to enable those changes to take place, that this action would permanently override FF's default setting of 17 for the unwriteable top and bottom margins so I could make use of the new print preview interface, but that is not the case. FF continues to override my personal print.printer settings in about:config.

Component: Untriaged → Printing: Output
Product: Firefox → Core

Two thoughts:

(1) On Windows, Firefox populates the unwriteable margin area from my printer settings into about:config in the expected places.

(2) The new Save to PDF printer doesn't correspond to a physical printer so Firefox assumes an unwriteable area of 0 and prints to the edges of the paper. To override this, you need to use a different set of preferences (for example, setting them to 20 or 25):

  • print.printer_Mozilla_Save_to_PDF.print_edge_bottom
  • print.printer_Mozilla_Save_to_PDF.print_edge_left
  • print.printer_Mozilla_Save_to_PDF.print_edge_right
  • print.printer_Mozilla_Save_to_PDF.print_edge_top

Perhaps adjusting those preferences for your other printers could be a workaround while the issue of why Firefox is not properly reading the unwritable area from your printers gets sorted out.

Should the reporter's bug 1688823 be marked as a duplicate of this bug?

(In reply to jscher2000 from comment #1)

Two thoughts:

(1) On Windows, Firefox populates the unwriteable margin area from my printer settings into about:config in the expected places.

(2) The new Save to PDF printer doesn't correspond to a physical printer so Firefox assumes an unwriteable area of 0 and prints to the edges of the paper. To override this, you need to use a different set of preferences (for example, setting them to 20 or 25):

  • print.printer_Mozilla_Save_to_PDF.print_edge_bottom
  • print.printer_Mozilla_Save_to_PDF.print_edge_left
  • print.printer_Mozilla_Save_to_PDF.print_edge_right
  • print.printer_Mozilla_Save_to_PDF.print_edge_top

Perhaps adjusting those preferences for your other printers could be a workaround while the issue of why Firefox is not properly reading the unwritable area from your printers gets sorted out.

Hi jscher2000, thank you for your feedback. As to your last reply, I'm the one who reported bug 1688823. I decided to report this issue as a new bug since my original bug report was confusing with the multiple results in FF's print preview interface, plus my own errors in attaching supporting documents and follow up comments. I thought it might be best to isolate and define the issue more clearly as a new bug, but if it was not appropriate to do that perhaps someone here could link them.

With regard to your suggestion to change the 4 settings for Mozilla Save to PDF print edges from 0 to 25, that would be a good thing to try. I disabled the print preview interface on both my computers as a workaround before getting your reply, so I will not be able to test your suggestion until I enable it again. Given all the trouble FF's print preview interface caused with my printer settings on both computers, I'm hesitant to do so.

(Followup reply to jscher2000 from comment #1)

Greetings jscher2000 - I enabled FF's print preview interface again and followed your workaround suggestion at Comment 1 to alter the four Mozilla_Save_to_PDF.print_edge default settings (bottom, left, right, and top) from 0 to 20 or 25 to see if that allows the headers and footers to print within the printable range of the printers. It worked, but only once. Test results confirm that FF's print preview interface overrides the revised Mozilla_Save_to_PDF.print_edge settings from 25 to back to 0 after one use.

  1. I went to about:config to print.printer to the Mozilla_Save_to_PDF.print_edge settings and changed the following settings from 0 to 25:
    print.printer_Mozilla_Save_to_PDF.print_edge_bottom
    print.printer_Mozilla_Save_to_PDF.print_edge_left
    print.printer_Mozilla_Save_to_PDF.print_edge_right
    print.printer_Mozilla_Save_to_PDF.print_edge_top
  2. Restarted FF so changes could take effect.
  3. Opened a webpage. Entered Command P on keyboard.
  4. FF's print preview interface launched.
  5. Saved a test PDF using FF's print preview interface. Headers and footers appeared to be within the printable range in Mac's print preview.
  6. Printed test PDF. Confirmed that headers and footers printed out properly 1/4 inch from all 4 sides of the paper. Success!
  7. Repeated this effort with another webpage expecting the same result with headers and footers printing 1/4 from all edges of the paper.
  8. Failure. Headers and footers were cut off the printed page.
  9. Went back to about:config to see if the above Mozilla_Save_to_PDF.print_edge_revised settings were still set at 25.
  10. No. All 4 Mozilla_Save_to_PDF.print_edge_settings (bottom, left, right, and top) automatically reverted back to 0 after one use of FF's interface.
  11. Conclusion: FF's print preview interface overrides various Mac user print.printer settings which causes the headers and footers to be outside the printable range of the printers. The interface revises the user Mozilla_Save_to_PDF.print_edge_ settings from 25 back to 0 after one use of the interface.
  12. As initially reported in this bug, FF's print preview interface also alters the user's unwriteable top and bottom margin printer settings immediately upon launching, changing the settings from 25 to 0 before a webpage is printed or saved as a pdf.
  13. To resolve this issue I disabled FF's print preview interface and had to restore all user print.printer settings for the unwriteable top and bottom margin printer settings back to 25 so headers and footers will print properly within the printable range of my printers.

Maybe the default print to pdf printer shouldn't hardcode defaults if they're specified by prefs?

Component: Printing: Output → Printing
Flags: needinfo?(mstriemer)
Product: Core → Toolkit
Duplicate of this bug: 1688823

Confirming this based on the response comment 1.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Anyone have a solution to this one?
Experiencing the same issue (FF87.0).
I have set print.tab_modal.enabled to false as a workaround.

This looks like the unwritable margins are no longer being overwritten in prefs when modified for Save to PDF

If this didn't fix the problem feel free to reopen, thanks!

Status: NEW → RESOLVED
Closed: 6 months ago
Flags: needinfo?(mstriemer)
Resolution: --- → FIXED

FF 98.0.2. This may have been resolved for Save to PDF, but the problem still happens for Canon MX920 printer. Changing the value of print.printer_Canon_MX920_series_Printer.print_unwriteable_margin_bottom_twips to a value that keeps footers inside the printer's printable area works when the system print dialog is used. However, as soon as the Firefox Print Preview UI is used to print, the value is set back to 286 twips again, causing the bottom half of footers to be cut off.

Can you file a separate bug? Does it happen on Windows or Linux? If on Linux, can you attach the ppd to the bug as well?

You need to log in before you can comment on or make changes to this bug.