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 ....
Created attachment 121044 [details] Additional sample inline PDF test cases to reproduce issue
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)?
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 .
Created attachment 121051 [details] Sample PDF examples for clipping issue
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.
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.
(Headers and footers should never be enabled when printing a PDF).
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.
Created attachment 121124 [details] proposed fix
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”.
<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>.
Excellent ! Verified fixed in Webkit NB r104114 running under mac OS X 10.7.2 ( Safari 5.1.1 )