New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 766000 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Support true edge-to-edge when printing to PDF (including headers/footers)

Reported by rjvber...@gmail.com, Sep 17 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36

Steps to reproduce the problem:
1. Trigger the print dialog for any page
2. Select "Print headers and footers"
3. Set margin to None or minimum

What is the expected behavior?
Headers and footers are positioned at the "paper" top and bottom, content is sized to maintain a reasonable distance

What went wrong?
Headers and footers remain stuck at a fixed location. When the top and bottom margins are decreased beyond a certain limit the headers and footers disappear.

Did this work before? N/A 

Chrome version: 61.0.3163.91  Channel: stable
OS Version: 
Flash Version: Shockwave Flash 27.0 r0
 
Labels: Needs-Triage-M61
Cc: keerthan...@techmahindra.com
Labels: M-63 Triaged-ET OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Considering it as a feature request and marking it as untriaged for further inputs.

Thanks!

Comment 3 by rjvber...@gmail.com, Sep 18 2017

I intended to mark this as a feature request myself, did I forget or misclick?

To give some more feedback myself: please also take the zoom feature into consideration.

I often use print-to-pdf combined with margins=none and some level of zooming to print things like recipes for future offline perusal, always trying to get them to fill a single page as fully as possible. If I do want to print them later I rely on the PDF reader to take care of whatever margins the target printer imposes.

R.
Components: Internals>Printing
Labels: -Pri-2 -Type-Feature -M-63 -Needs-Triage-M61 OS-Chrome Pri-3 Type-Bug
Owner: rbpotter@chromium.org
Status: Assigned (was: Untriaged)
The interaction between the margin and header/footers setting can definitely use a bit of polish.

re: comment 3 - for "zooming" there exists the scaling option, which is  bug 96456  and that's fixed. If that's not sufficient in some way, please file a new bug. One issue for bug report please.
Cc: hwi@chromium.org
Looked into this a bit and I think the biggest problem is that the header/footer behavior is different for different margin values.
1. For default margins, we position the header/footer just outside the margin.
2. For minimum margins, turning on headers/footers actually causes the rendering code to add extra margin to fit the header and footer. However it seems we always position the header/footer at a location just outside the default margins and the extra margin added in this case is not actually large enough, so for many printers this has the effect of increasing the margin and not actually showing the header and footer, which seems like a bug.
3. For "none" margins, header/footer option is removed.
4. For custom margins, header/footer option is removed if the top and bottom margins are small enough that the default header/footer location would be hidden by the content. If the margins are large enough, the option is available and the header/footer displays in the default margins location.

It seems like we should make the behavior consistent across margin types. This would mean either:
1. Always position header/footer just inside the margins and resize the content area when the option is turned on. This would mean the option would be available for all cases. This would look like a (non-buggy) version of the current "minimum" margins behavior.
2. Always position header/footer just outside the margins, leave the content area alone when the option is toggled, and remove the option when the margins are too small to fit the header/footer in the page area. This would look like the current "Default"/"None"/"Custom" behavior, but the minimum margin value to allow the header/footer could be lower than it is currently if we allow the header/footer location to change based on the margins.

cc hwi@ for input on what might make the most sense here.

Comment 7 by rjvber...@gmail.com, Oct 25 2017

That sounds like it would already be an improvement. If I understand correctly, you're proposing something where setting (moving) custom margins would "push" the header/footer up (or down) until it no longer fits on the page?

Comment 8 by hwi@chromium.org, Oct 30 2017

re: c6

IMO, the option #1 would feel more comfortable than #2. #1 guarantees to show header/footer without 
accidentally losing header/footer while hand-adjusting the margins. Header/footer checkbox can be unchecked if the maximum content space is needed. 

Sign in to add a comment