Is there a way to create PDF from an iOS app?
I believe that the underlying Apple APIs make this pretty easy just by giving a different context for drawing (I could be wrong).
I need to draw out a really pleasing PDF for my users to print, and I’d prefer to generate it in the app, but I can do it server-side if needed.
That is exactly how it is done… (3 addtional lines in Swift)… but alas… Xojo doesn’t expose that without perhaps resorting to declares (and I’m thinking that won’t work either)
If generating the PDF from an HTML source is suitable for you, I have an easy solution.
Basically, instead of drawing all elements as you would do in a Canvas, you set up an HTML template and just replace what needs to be set in the HTML.
Then just pass the HTML to the xcHTML2PDF class.
[quote=471469:@Jeremie Leroy]If generating the PDF from an HTML source is suitable for you I have an easy solution.
Basically, instead of drawing all elements as you would do in a Canvas, you set up an HTML template and just replace what needs to be set in the HTML.
Then just pass the HTML to the xcHTML2PDF class.