PDF export

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10544
Joined: Fri Feb 19, 2010 10:17 am

PDF export

Post by richmond62 »

I implemented PDF export from a field in my Devawriter Pro about 100 years ago, and that was only possible, then, to Mac.

I hope & suppose that export from a field to Windows (and Linux) is now possible.
Klaus
Posts: 14371
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: PDF export

Post by Klaus »

We only have "open printing to PDF..." in LC right now.
Is that what you mean?
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10544
Joined: Fri Feb 19, 2010 10:17 am

Re: PDF export

Post by richmond62 »

Is that what you mean?
Possibly: I'll go and try. Thanks.
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10544
Joined: Fri Feb 19, 2010 10:17 am

Re: PDF export

Post by richmond62 »

No, No, No: that prints an image of a card, when what I am looking for is a PDF of the contents of a field.

https://lessons.livecode.com/a/29177-ho ... g-livecode
Klaus
Posts: 14371
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: PDF export

Post by Klaus »

Mabe there is a macOS SHELL command for this or maybe you used AppleScript?
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10544
Joined: Fri Feb 19, 2010 10:17 am

Re: PDF export

Post by richmond62 »

No: there is a relatively easy way in Mac:

Code: Select all

on mouseUp
   ask file "Save as:" with "Print.pdf"
   put it into tFileName
   if tFileName is empty then exit to top
   set the printerOutput to "file:" & tFileName
   revShowPrintDialog false, false
   revPrintField the long name of fld "GUFF"
end mouseUp
The problem is how to do that with Windows and Linux.
Klaus
Posts: 14371
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: PDF export

Post by Klaus »

Ha, had to look up "printeroutput" :-D
According to the docs that should work on: mac, windows, linux.
But doesn't?
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10544
Joined: Fri Feb 19, 2010 10:17 am

Re: PDF export

Post by richmond62 »

I don't think so, but I have not tested it since 2023.
Post Reply