Bug 177841 - Printing a PDF from an iframe crops bottom of the PDF
Summary: Printing a PDF from an iframe crops bottom of the PDF
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: PDF (show other bugs)
Version: Safari 11
Hardware: Mac macOS 10.12.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-03 15:06 PDT by David Alan Hjelle
Modified: 2017-10-09 12:27 PDT (History)
2 users (show)

See Also:


Attachments
actual print preview (193.06 KB, image/png)
2017-10-03 15:06 PDT, David Alan Hjelle
no flags Details
expected print preview (174.39 KB, image/png)
2017-10-03 15:07 PDT, David Alan Hjelle
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Alan Hjelle 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.
Comment 1 David Alan Hjelle 2017-10-03 15:07:18 PDT
Created attachment 322588 [details]
expected print preview
Comment 2 David Alan Hjelle 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.
Comment 3 Alexey Proskuryakov 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.
Comment 4 David Alan Hjelle 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.
Comment 5 David Alan Hjelle 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.)
Comment 6 Alexey Proskuryakov 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.