| Search Locate Previous Next | Contents |
As you build up your report, completed pages are saved to file. When the report is finished, you can run the leaf.Spool function, which adds header details (for example it enumerates the fonts used in the document) and closes the file, returning the name to your application. You can check the number of pages, or preview/print the file as normal:
splleaf.Spool '' © Retain default name
leaf.NumPages spl
47
This can be printed with the Print function in the PostScript namespace, or you might wish to preview it first with the View function:
PostScrp.View spl © View starting from the first page 5 PostScrp.View spl © Start at the 5th page PostScrp.Print spl © Entire report 3 4 5 101 PostScrp.Print spl © Selected pages
In general it makes sense to use Spool rather than Close for reports of more than 10 pages, as the time taken to read from file is less than the time to check the full report for a particular page. Also there is no danger of WS FULL!
If you need to retain the spool file for further processing (for example to make into booklets in a duplex layout) call leaf.Spool with a file name as right argument:
splleaf.Spool 'c:\temp\run1' © returns full name
By default, NewLeaf holds the spool file in the TEMP directory. If this causes problems, set the global spoolpath to the file path of your choice:
leafspoolpath's:\temp' © Spool on network drive
If you require system-generated unique names for the spool files, set:
leaf.spoolname''
... which will make the filename from the system time in the form ~1234567.spl.