Closed Bug 1344992 Opened 7 years ago Closed 1 month ago

Lost printing content if specify the position:absolute and transform style.

Categories

(Core :: Printing: Output, defect)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: azlimited2017, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Whiteboard: [layout:print-triage:p1][frag2020])

Attachments

(1 file)

Attached file attached.zip
User Agent: Mozilla/5.0 (Windows NT 6.0; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20170125094131

Steps to reproduce:

1. Open Print Selected Documents(Cap 132).html
2. Generate Print Preview
3. Choose landscape mode and A4 size for printer



Actual results:

1. Remaining content cannot be displayed in second page of print preview when content exceeds page one capacity

2. Can only print out the content of page 1


Expected results:

1. Content should be able to display in second page of print preview when content exceeds page one capacity 

2. Should be able to print out full content
Group: core-security
I produce a similar behavior with the site :
https://remarkjs.com/

The site presents a javascript libary in order to make slides. The site is using its own js library. So when I try to print the site, the print-preview and the print have only the first page filled, the other pages are blank.

I have a wrong print/print-preview with :
- Firefox 56.0.1 (64 bits)
- Firefox Nightly 58.0a1 (2017-10-23) (64 bits)

I have a correct print/print-preview with :
- Chrome Version 62.0.3202.62 (Build officiel) (64 bits)
- Internet Explorer 11.
I looked into this a little.
A reported test-case of comment #0 uses "display:flex;" on first div element and inner div children. So this is same of bug 1089549. A second reported test-case of comment #1 uses "overflow: hidden;" and "position: absolute;" in each slides div elements. If remove this style, we can print this slide site correctly. I think that it is different from first report and second report.
(In reply to Mantaroh Yoshinaga[:mantaroh] from comment #2)
> I looked into this a little.
> A reported test-case of comment #0 uses "display:flex;" on first div element
> and inner div children. So this is same of bug 1089549. A second reported
> test-case of comment #1 uses "overflow: hidden;" and "position: absolute;"
> in each slides div elements. If remove this style, we can print this slide
> site correctly. I think that it is different from first report and second
> report.

Oh, sorry. This comment which mentioned to second report is wrong. This is weird phenomenon..
In my environment, I can print this remark.js site correctly, if I resize window size. Furthermore I can print correctly if I remove transform-origin style from this site.

I guess this is problem of absolution and translation when printing.
I'll look into this bug, if I can make the time.
Status: UNCONFIRMED → NEW
Depends on: 939897
Ever confirmed: true
Flags: needinfo?(mantaroh)
Summary: Print preview can only show one page / Can only print the first page → Lost printing content if specify the position:absolute and transform style.
Whiteboard: [layout:print-triage:p1]
Blocks: 1601429
Whiteboard: [layout:print-triage:p1] → [frag2020]
Whiteboard: [frag2020] → [layout:print-triage:p1][frag2020]
Severity: normal → S3

Clear a needinfo that is pending on an inactive user.

Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.

For more information, please visit BugBot documentation.

Flags: needinfo?(mantaroh)

Firefox and Chrome give the same results (only showing content on page 1) for the attached zipped-up testcase.

Looking at the styles involved, it looks like this behavior (clipping anything after the first page) is what the testcase is asking for, perhaps by accident -- it has the following print-specific CSS:

@media print {
  #PreviewWrapper {
    overflow: hidden;
    height: 100%;

The height ends up resolving to the page height in this case, I think. So this element (which wraps the tabular content here) is 1 page tall, and explicitly clips any content that extends beyond that.

If I remove overflow:hidden from that CSS rule there, then I see all of the content, in current Nightly at least.

So I think this isn't really a bug, and it's purely arising from that ^ above-quoted CSS.

Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: