Omnis Technical Note TNPR0008 May 2007
Save a report as PDF
For Omnis Studio 4
By Götz Krija
When you are developing with Omnis Studio on the Mac platform you have got one great advantage: you can print directly to a PDF file.
Under Mac OS X you can use the property $osxdesttype to set the print destination to kPDF, rather than the default printer. You must assign a valid path to the $osxdestname property and the report will be saved directly to a PDF file. For example, the following code could be used to create a PDF report:
; set destination and path
Do FileOps.$putfilename(path,'Save PDF file')
; print report
Do $reports.MyReport.$open() Returns reportRef
; add pdf extension if necessary
If you are looking for a cross-platform solution for printing to PDF from Omnis, then you may be able to find a third-party plug-in to do this.