NEW 177841
Printing a PDF from an iframe crops bottom of the PDF
https://bugs.webkit.org/show_bug.cgi?id=177841
Summary Printing a PDF from an iframe crops bottom of the PDF
David Alan Hjelle
Reported 2017-10-03 15:06:44 PDT
Created attachment 322587 [details] actual print preview # Steps to Reproduce 1. Go to https://dahjelle.github.io/pdf-test/ 2. Look at the print preview dialog. # Expected Behavior The bottom line of the PDF should not be cropped off. (See attached expected.png, taken from opening the PDF in its own tab instead of an iframe.) # Actual Behavior The bottom line of the PDF is cropped off. # Notes This does not happen if you open the PDF at https://dahjelle.github.io/pdf-test/sample.pdf directly and print from there.
Attachments
actual print preview (193.06 KB, image/png)
2017-10-03 15:06 PDT, David Alan Hjelle
no flags
expected print preview (174.39 KB, image/png)
2017-10-03 15:07 PDT, David Alan Hjelle
no flags
David Alan Hjelle
Comment 1 2017-10-03 15:07:18 PDT
Created attachment 322588 [details] expected print preview
David Alan Hjelle
Comment 2 2017-10-03 15:10:11 PDT
This sounds similar to https://bugs.webkit.org/show_bug.cgi?id=57747, but I'm not sure it is related.
Alexey Proskuryakov
Comment 3 2017-10-03 19:34:31 PDT
In Safari 10.1.2 on macOS 10.12.6, the print preview I get is just all black.
David Alan Hjelle
Comment 4 2017-10-04 06:03:05 PDT
To be more clear than the drop-down menus let me be, I can reproduce this in: Safari Version 11.0 (12604.1.38.1.7) on macOS 10.12.6 Safari Technology Preview Release 40 (Safari 11.1, WebKit 12605.1.6.0.1) on macOS 10.12.6 We originally ran across this on Safari 10, if I recall, but I don't have a copy of that handy to test.
David Alan Hjelle
Comment 5 2017-10-04 07:26:18 PDT
I get a similar-but-different issue on iOS. (iOS 11 on an iPhone X simulator) Then, the output is not cropped, but instead it is shrunk and a footer placed on the bottom of the page. There, too, printing the PDF from a tab of it's own works as I'd expect. (Please let me know if I should open a separate issue for that.)
Alexey Proskuryakov
Comment 6 2017-10-09 12:27:59 PDT
The black preview happens when I open the link in a background tab by Cmd-clicking it, so it's a separate unrelated issue. I can reproduce the behavior that you describe, testing Safari 11 on High Sierra.
Note You need to log in before you can comment on or make changes to this bug.