Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Customize the location of print headers and footers?

  • 4 个回答
  • 1 人有此问题
  • 1 次查看
  • 最后回复者为 Rick216

more options

Hi. Is there a way to customize the order of Firefox headers and footers on printed pages (including print-to-pdf)?

I prefer the header to be url only, in the center. While the footer has page on left; title in the center, and date on the right.

This used to be easy to accomplish with print options in older versions, then -- as the print dialog changed (and actually improved a lot in most *other* ways) I had to turn to about:config modifications like those described in the 1/27/21 reply here: https://support.mozilla.org/en-US/questions/1323433. But now I can't seem to find any way to have any control over print headers besides "on" and "off."

One problem I find with having both page title and url on top is that these can be long, causing one or both to be truncated.

I'm using Firefox 115.3esr.

Hi. Is there a way to customize the order of Firefox headers and footers on printed pages (including print-to-pdf)? I prefer the header to be url only, in the center. While the footer has page on left; title in the center, and date on the right. This used to be easy to accomplish with print options in older versions, then -- as the print dialog changed (and actually improved a lot in most *other* ways) I had to turn to about:config modifications like those described in the 1/27/21 reply here: https://support.mozilla.org/en-US/questions/1323433. But now I can't seem to find any way to have any control over print headers besides "on" and "off." One problem I find with having both page title and url on top is that these can be long, causing one or both to be truncated. I'm using Firefox 115.3esr.

由Rick216于修改

被采纳的解决方案

Rick216 said

I prefer the header to be url only, in the center. While the footer has page on left; title in the center, and date on the right.

It works for me on 115.3.1esr with the following about:config settings (no printer connected):

print.print_footercenter = &T
print.print_footerleft = &PT
print.print_footerright = &D
print.print_headercenter = &U
print.print_headerleft =
print.print_headerright =
定位到答案原位置 👍 1

所有回复 (4)

more options

No suggestions?

more options

Thanks, but that answer wouldn't explain why Firefox's own print-to-pdf moved page title from the footer to the header (where url remains) when I updated from 102esr to 115esr, would it? Or why my physical Brother printer did exactly the same?

more options

选择的解决方案

Rick216 said

I prefer the header to be url only, in the center. While the footer has page on left; title in the center, and date on the right.

It works for me on 115.3.1esr with the following about:config settings (no printer connected):

print.print_footercenter = &T
print.print_footerleft = &PT
print.print_footerright = &D
print.print_headercenter = &U
print.print_headerleft =
print.print_headerright =
more options

EDIT TO ADD: It turns out that things only started "working" for me last night on *one particular* physical printer. When I used my laptop with a different physical printer today, it reverted back to the original, undesired, layout I described, with both page title and url in the header. And it turns out "Save to PDF" was likewise still putting both page title and url in the header.

I've discovered what appears to be a full solution. Perusing about:config I have discovered that all printers, including "Mozilla Save to PDF" have their own *separate* versions of the lines for print header and footer layout. I'm guessing that either those lines weren't present back in 102esr OR that in 102esr the strings assigned to them automatically changed to match the "master" (i.e., non-printer-specific) settings -- because I know I never had to make such modifications in 102esr. Examples of kinds of lines I am talking about are:

print.printer_Brother_MFC-J1010DW_Printer.print_footerleft and print.printer_Mozilla_Save_to_PDF.print_headercenter

Changing all of *these* lines to match the values used for the "master" (as described in zeroknight's post) makes everything print (or Save to PDF) with my desired header and footer layout.

I'll leave the originally marked solution, because, while there was actually more to the fix (at least for someone with physical printers beyond "Mozilla Save to PDF), it demonstrated that the same about:config header & footer values used in 102esr are still -- at minimum -- part of the solution with 115esr. (And this means Dropa's answer had some relevance in describing a printer-specific angle to this, although I can't imagine the printer software would assign Firefox-specific parameters.)

ORIGINAL POST: That's actually what I already had, but as of last night it's working properly -- looking just like your sample. Even though I haven't changed anything in the meantime. Odd. In any event, thanks for looking into it and confirming that that configuration should work.

由Rick216于修改