2

What I'd like to be able to do is download any web page, and be able to view it offline.

It seems like html WebKit views cannot be converted to PDFs (on the Mac, you could 'print' a PDF, but that isn't possible on iPhone?).

So, the only way is to save the actual resources - save the html, the step thru each image, css, js file and save it locally. Then maybe alter the urls within the code so they point to the right place...etc ...etc...

Is there a standard way to do this?

Or, is there an open source project (in any programming lang) which does this kind of thing?

cannyboy
  • 24,180
  • 40
  • 146
  • 252

1 Answers1

2

There's an excellent webkit html to pdf converter appropriately called wkhtmltopdf. Given the reources available on the iphone and its toolkits, I think it'd be easy to compile a version for the i-Phone ('think' being the operative word). We've managed to use the tool in a Windows, Linux and Solaris environment with absolutely no bugs. Here's the link:

http://code.google.com/p/wkhtmltopdf/

btelles
  • 5,390
  • 7
  • 46
  • 78
  • Unfortunately, it requires the Qt framework, which doesn't work on iPhone. There is also http://plessl.github.com/wkpdf ... but this requires Ruby I think. – cannyboy Dec 10 '09 at 12:18
  • Gotchya...it was worth a try, I guess :-) – btelles Dec 10 '09 at 17:42
  • were you able to compile wkhtmltopdf for Solaris? If so, do you have any advice/instructions for how to do it. Better yet, do you happen to have the binary available? – Yevgeniy Brikman Dec 05 '10 at 00:25