| Search Locate Previous | Contents |
The Adobe Portable Document Format is an ideal way to format printed output so that it can be distributed electronically, and viewed or printed on any computer, whether Unix, Mac or Windows. NewLeaf can be used to create PDFs in two ways:
You will need to use Distiller if your document contains any pictures in Windows Metafile or EPS format, or if you have used any fonts apart from Times, Arial, Courier and Symbol. Simply save the result of a NewLeaf report to any file in Distillers inbound directory with:
filename PostScrp.WritePDF PG
... and Distiller will do the rest.
Writing PDFs directly
If your document is composed entirely in the base fonts, and you only have RainPro charts and bitmap pictures, you can create the PDF directly with the functions supplied in the MakePDF workspace. You will need to copy this into your application in addition to the normal NewLeaf code, then you can use it as follows:
'mydoc.pdf' pdf.PS PG
This will take a NewLeaf document, or the name of a spool file, on the right and the name of the output file on the left. If you omit the left argument, the PDF document is returned as a simple text vector.
For either method of PDF production, you may use leaf.Bookmark or the TOC property to create an outline tree in the PDF document.