Scripting PDF files

Alex Rice alex at
Wed Oct 29 15:19:55 EST 2003

On Oct 29, 2003, at 11:07 AM, J. Landman Gay wrote:

> Thanks for all the suggestions for scripting PDF conversions. They  
> each have their advantages and I'm saving them all for future use.
> Unfortunately, they all convert existing documents, and none of the  
> supported file formats provide for complex document structures. I have  
> a print layout stack with headers and footers, which remain static,  
> and variable body text in the middle. I need to print each page to a  
> PDF file with the headers and footers intact. The only way I can think  
> of to preserve header and footer spacing on the page, along with  
> pagination, is to intercept the printing outputs from Revolution just  
> as the "Save as PDF" option in the print dialog does.

In Mac OS X, the "Save as PDF", "Print as PDF" stuff appears to to the  
application as just as another printer- the graphics routines are the  
same. This is good because it means that one doesn't have to copy-  
Postscript or HTML into PDF. It just renders + prints right into PDF.

Tuviah- can we call this Carbon function from transcript? (see Carbon  
doc below)

Jaqueline- it would be a good & easy enhancement to request. In the  
meantime you might be able to do it with an external to call  
PMSessionSetDestination right before printing. It would be worth a try  
at least.

Saving a Document as a PDF File

This section provides information on what you need to do in your code  
to implement a command to save a document as a PDF file. In Mac OS X  
saving a document as a PDF file is simple. Your application needs to  
set the printing destination to a file location instead of to a  
printer. You set the destination by calling the function  


Alex Rice <alex at> | Mindlube Software |  

what a waste of thumbs that are opposable
to make machines that are disposable  -Ani DiFranco

More information about the Use-livecode mailing list