Open Bug 1061108 Opened 6 years ago Updated 6 years ago
PDF produced by Firefox has margin even when I set margin to zero
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 (Beta/Release) Build ID: 20140722162823 Steps to reproduce: I use Linux (Slackware 64 current firefox 31) I have created a very simple page using <body> and <div> without any margins. First I went to Print and clicked Page Setup and created a new custom size, with margins set to zero. I also Actual results: Margins of page number and other custom header and footer changed to zero, But The Page content still has margin. Expected results: Margins of content should change to zero too.
(In reply to mohammad.etemaddar from comment #0) > First I went to Print and clicked Page Setup and created a new custom size, > with margins set to zero. This is good, but it just determines the margins between the paper-edge and the printout's header/footer text. (page title / URL / page number) I understand that you've set these to be blank, but Firefox still reserves space for them. There's an additional layer of margin between the printout's header/footer text and the *actual* page content -- that's responsible for what you're seeing. If you search about:config for "print_margin", you'll see these settings. (I don't think they're exposed in the UI at all -- only in about:config.) These will probably be set to 0.5, but if you instead set them to 0, *and* print using your custom page-size with 0 margins, then you should get a PDF with really 0 margins.
(In my profile, these about:config settings are called "print.print_margin_top" etc, for the PDF printer -- you may have additional copies of these settings for physical printers that you've used.) Do you get what you're looking for if you set these about:config preferences to 0, *and* use your custom page-size?
(In reply to Daniel Holbert [:dholbert] from comment #2) > (In my profile, these about:config settings are called > "print.print_margin_top" etc, for the PDF printer -- you may have additional > copies of these settings for physical printers that you've used.) > > Do you get what you're looking for if you set these about:config preferences > to 0, *and* use your custom page-size? You are true, I could change margins of content to zero through about:config. Thank you. I think it would be much better to add UI for changing this; Changing margins of content is as important as changing margins of header/footer.
You need to log in before you can comment on or make changes to this bug.