generate and save pdf

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
stelioss
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2
Joined: Fri Jan 27, 2012 11:17 pm

generate and save pdf

Post by stelioss » Fri Jan 27, 2012 11:21 pm

Is there a way to generate a pdf file and save it in the app directory on iOs?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: generate and save pdf

Post by Mark » Sat Jan 28, 2012 1:58 am

Hi,

It is possible to create an external for this. It might also be possible to use Qartam's PDF library.

Kind rgards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

CALL-151
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 206
Joined: Wed Oct 20, 2010 11:00 am

Re: generate and save pdf

Post by CALL-151 » Wed Feb 01, 2012 12:20 am

Yes, the is supported directly in LC (no third party needed). In your standalone iOS settings, select PDF Printing.

Populate a card with the content you want in the PDF, set your destination folder, then use:

open printing to PDF "myPDF.pdf"
print this card
close printing

But, be aware that as of LC 5.0.2 there's a bug that will cause your app to fail silently if there are any Graphic Effects on the card.

stelioss
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2
Joined: Fri Jan 27, 2012 11:17 pm

Re: generate and save pdf

Post by stelioss » Wed Feb 01, 2012 7:33 pm

Thank you all for your reply.

I did figured out that the normal print to PDF works. Thanks again for the great tips

Post Reply