Bug 12419 - -[WebHTMLView dataWithPDFInsideRect:] returns clipped results with -[WebHTMLView bounds]
Summary: -[WebHTMLView dataWithPDFInsideRect:] returns clipped results with -[WebHTMLV...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 418.x
Hardware: Mac (PowerPC) OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-26 10:48 PST by Erich Ocean
Modified: 2007-01-26 13:21 PST (History)
0 users

See Also:


Attachments
A tiny Mac OS X 10.4 Cocoa application demonstrating the bug. (35.32 KB, application/octet-stream)
2007-01-26 10:50 PST, Erich Ocean
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erich Ocean 2007-01-26 10:48:22 PST
There appears to be no way for a user to render the current web page to a single PDF file *exactly* as it appears on screen.

The value of [[[[webView mainFrame] frameView] documentView] bounds] is incorrect when used to specify the bounds for a subsequent dataWithPDFInsideRect: call on the documentView. The resulting PDF file on pages with lots of text, such as the sample page loaded in this app, are clipped at the very end.

In addition, WebKit does not respect the user's media style preferences when calling dataWithPDFInsideRect:. Apparently, a different text layout engine is being used, which is why the bounds result is incorrect.

To see a graphic example, build and run the attached application, follow the instructions, and examine the results.
Comment 1 Erich Ocean 2007-01-26 10:50:23 PST
Created attachment 12687 [details]
A tiny Mac OS X 10.4 Cocoa application demonstrating the bug.
Comment 2 David Kilzer (:ddkilzer) 2007-01-26 13:06:45 PST
Erich, thanks for the bug report!

Have you tested this against WebKit ToT (tip-of-tree)?  There have been numerous improvements in WebKit since the version that shipped with Tiger.

Info on checking out and building WebKit is here:  http://webkit.org/.

Comment 3 Erich Ocean 2007-01-26 13:21:09 PST
(In reply to comment #2)

Wow! Great! It looks like the bounds are correct in the latest nightly (1/26/2007). Also, the text looks identical, so it appears the correct typesetter is being used now, too. Fanstastic!