[webkit-dev] Duplicate page: Implementing Print Preview

David Hyatt hyatt at apple.com
Wed May 27 10:03:24 PDT 2009


Can you render the page to PDF and display the PDF?  Maybe you could  
render the page into bitmaps if you aren't able to support PDF.

dave
(hyatt at apple.com)

On May 27, 2009, at 11:53 AM, Sverrir Á. Berg wrote:

> Hi all,
> I'm working on Google Chrome and trying to come up with a way to  
> implement print preview.  To be able to display it in a separate tab  
> we need to be able to duplicate the current page in memory so the  
> user can continue to interact with the original page.  Javacript,  
> animations etc should continue on the original page but be frozen in  
> the print preview version.
> What I've tried so far is to select everything on the page  
> (Frame::selection()->SelectAll()) and Frame::GetSelection(true) but  
> the HTML does not fully describe the page and this has the downside  
> of modifying the users selection on the page.
> I've poked around in WebKit a bit and as far as I can tell the  
> document, rendertree and the views are fairly integrated and not  
> easy to take a snapshot of the full state of the document.  I would  
> appreciate any insights on this though since I might have missed  
> something obvious.
>
> If nothing existing can be reused then adding this functionality  
> should benefit all ports.  But again I need your insights on how  
> this can be done (if at all).
>
> Sverrir
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090527/9e0b8646/attachment.html>


More information about the webkit-dev mailing list