WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
CLOSED FIXED
75514
First sentence is missing or clipped when printing a inline PDF
https://bugs.webkit.org/show_bug.cgi?id=75514
Summary
First sentence is missing or clipped when printing a inline PDF
Chris Petersen
Reported
2012-01-03 20:16:32 PST
First sentence is missing or clipped in printing a inline PDF 1) Launch Webkit TOT
r103998
under Mac OS X 10.7.2 and go to
http://www.cs.tut.fi/~jkorpela/html/iframe-pdf.html
2) Ctrl-click on a inline PDF and choose Print Frame 3) Notice clipping appears on the top Heading of the first page ( noticeable in the print preview ) 4) Click PDF --> Open PDF in Preview 5) Notice the first sentence on each page in the PDF generated is either missing or clipped 6) Compare this to the result you get if you ctrl-click on inline PDF and choose 'Open Frame in New Window'. Then choose Print --> Click PDF --> Open PDF in Preview. No clipping occurs under this condition so it seems to open happen when printing a PDF in a frame ....
Attachments
Additional sample inline PDF test cases to reproduce issue
(15.17 KB, application/zip)
2012-01-03 20:18 PST
,
Chris Petersen
no flags
Details
Sample PDF examples for clipping issue
(297.93 KB, application/zip)
2012-01-03 20:48 PST
,
Chris Petersen
no flags
Details
proposed fix
(1.88 KB, patch)
2012-01-04 10:51 PST
,
Alexey Proskuryakov
mitz: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Petersen
Comment 1
2012-01-03 20:18:47 PST
Created
attachment 121044
[details]
Additional sample inline PDF test cases to reproduce issue
mitz
Comment 2
2012-01-03 20:32:36 PST
Chris, do the PDFs print (or preview) for you with the Safari-generated headers and footers (timestamp at the top right, URL at the bottom left, page number at the bottom right)?
Chris Petersen
Comment 3
2012-01-03 20:47:57 PST
Yes, the heading ( timestamp ) and footings ( URL and page #) are displayed in both print thumbnail and PDF in Preview app. The clipping issue is present in both. See attachment. Clipping.pdf shows the problem. Compare to no_clipping_in_this_pdf .
Chris Petersen
Comment 4
2012-01-03 20:48:47 PST
Created
attachment 121051
[details]
Sample PDF examples for clipping issue
Chris Petersen
Comment 5
2012-01-03 21:02:44 PST
Hmm. I think I just go my own answer.. Both header and footer are enabled on a page so that is what I get and of course it clips the top portion of the page. When this is turned off, the clipping issue no longer occurs. Printing a PDF in a window doesn't have header/footer enabled so this doesn't happen like it mentioned above. So bottom line this isn't a frame issue like I thought. Sorry for jumping the gun.
mitz
Comment 6
2012-01-03 21:04:06 PST
This is a valid issue, and thanks for reporting it. Further investigation may lead to the conclusion that the issue needs to be fixed in Safari, though.
mitz
Comment 7
2012-01-03 21:05:00 PST
(Headers and footers should never be enabled when printing a PDF).
Chris Petersen
Comment 8
2012-01-03 21:31:27 PST
Interesting enough I upgraded to Safari 5.1.2 from 5.1.1. Now I don't get the "Print Frame" menu item when I ctrl click on the inline PDF ( mentioned in Step 2 ). This is a change in the app apparently.
Alexey Proskuryakov
Comment 9
2012-01-04 10:51:11 PST
Created
attachment 121124
[details]
proposed fix
mitz
Comment 10
2012-01-04 11:04:40 PST
Comment on
attachment 121124
[details]
proposed fix View in context:
https://bugs.webkit.org/attachment.cgi?id=121124&action=review
> Source/WebKit2/ChangeLog:14 > + Do not ask the embedder about headers and footers when printing a PDF.
Why use the term “embedder” here? In OS X, at least, frameworks and libraries have clients, not embedders. Moreover, the object being consulted here is called “the UI client”.
Alexey Proskuryakov
Comment 11
2012-01-04 11:26:57 PST
<
rdar://problem/10640680
> Committed <
http://trac.webkit.org/changeset/104049
>.
> Now I don't get the "Print Frame" menu item when I ctrl click on the inline PDF ( mentioned in Step 2 ). This is a change in the app apparently.
Tracking that as <
rdar://problem/10643191
>.
Chris Petersen
Comment 12
2012-01-04 21:09:21 PST
Excellent ! Verified fixed in Webkit NB
r104114
running under mac OS X 10.7.2 ( Safari 5.1.1 )
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug