Interesting idea. I see two downsides to that though. Firstly I think need some kind of PDF library since only Mac's have native support and when the user needs to change the layout of the page (margins, portrait/landscape) I would need to re-create the PDF again?
Sverrir On Wed, May 27, 2009 at 1:03 PM, David Hyatt <hy...@apple.com> wrote: > 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 > (hy...@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@lists.webkit.org > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev > > >
_______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev