0

I want to convert HTML to PDF on an iOS Device...

However, I don't want to load my HTML in a UIWebView, take a snapshot, and generate an ugly PDF from this snapshot picture, because the text must be selectable for my purpose.

I wonder how apps like Save2PDF or Adobe® CreatePDF are able to convert multiple files into PDF and save them. My guess is they don't generate the PDF's on their own, but get them from Apple's Printing Framework.

How do these apps work?

cbay
  • 72
  • 7
Lindemann
  • 3,336
  • 3
  • 29
  • 27

1 Answers1

1

See my answer here: Generating a PDF using the new printing stuff in iOS 4.2

The good news: it's physically possible with the built-in print formatting/rendering classes and Core Graphics.

The bad news: it requires a little private API pokery, which restricts the trick to in-house ad hoc and enterprise apps only.

Community
  • 1
  • 1
rgeorge
  • 7,385
  • 2
  • 31
  • 41