[webkit-dev] Using WebKit renderer to produce PDF output

Darin Adler darin at apple.com
Wed May 13 14:17:13 PDT 2009


On May 13, 2009, at 2:11 PM, Ben Harper wrote:

> I need to produce a tool that can generate PDFs from HTML. The best  
> solution I can think of is to use WebKit's layout engine, and plug  
> my own PDF generator in as a renderer backend. I don't want to  
> reinvent the wheel though - so I'm asking here has this been done  
> already, or are there other obvious solution out there that I'm  
> missing?

It depends what platform you’re talking about. The Mac OS X version of  
WebKit already offers this capability, since printing on Mac OS X is  
based on PDF. The PDFOperationWithView method of NSPrintOperation can  
work for this purpose.

     -- Darin



More information about the webkit-dev mailing list