PDF export
Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller
-
richmond62
- Livecode Opensource Backer

- Posts: 10544
- Joined: Fri Feb 19, 2010 10:17 am
PDF export
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.
I hope & suppose that export from a field to Windows (and Linux) is now possible.
Re: PDF export
We only have "open printing to PDF..." in LC right now.
Is that what you mean?
Is that what you mean?
-
richmond62
- Livecode Opensource Backer

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

- Posts: 10544
- Joined: Fri Feb 19, 2010 10:17 am
Re: PDF export
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
https://lessons.livecode.com/a/29177-ho ... g-livecode
Re: PDF export
Mabe there is a macOS SHELL command for this or maybe you used AppleScript?
-
richmond62
- Livecode Opensource Backer

- Posts: 10544
- Joined: Fri Feb 19, 2010 10:17 am
Re: PDF export
No: there is a relatively easy way in Mac:
The problem is how to do that with Windows and Linux.
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 mouseUpRe: PDF export
Ha, had to look up "printeroutput" 
According to the docs that should work on: mac, windows, linux.
But doesn't?
According to the docs that should work on: mac, windows, linux.
But doesn't?
-
richmond62
- Livecode Opensource Backer

- Posts: 10544
- Joined: Fri Feb 19, 2010 10:17 am
Re: PDF export
I don't think so, but I have not tested it since 2023.
-
scott_morrow
- VIP Livecode Opensource Backer

- Posts: 46
- Joined: Tue Jun 27, 2006 8:35 pm
- Contact:
Re: PDF export
open printing to pdf does in fact create normal pdf documents that can include text and images and it is NOT simply rendered as an image of a card. Text and hi-resolution graphics appear in the pdf as expected. There is a bug 22982 with using open printing to pdf which causes it to fail if an emoji is encountered while printing. In bugzilla there was some discussion about a possible workaround... place an effect (like a drop shadow) on the field with an emoji and it will then print. This workaround did allow it to print but was not actually very useful because adding the effect caused open printing to pdf to render the field as a (screen resolution) image. Perhaps you are remembering this conversation.richmond62 wrote: Wed Dec 02, 2026 1:18 pm 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
I use open printing to pdf on Mac, iOS and Android. The docs say it should work on Windows and Linux as well.
Elementary Software
...now with 20% less chalk dust!
...now with 20% less chalk dust!
Re: PDF export
I use "open to PDF" all the time on Mac without issue. Never tried to include an emoji. The resultant PDF's are ordinary in every way.
Craig
Craig