| 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 nlSpool 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:
splnlSpool '' © Retain default name
nlNumPages 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:
psView spl © View starting from the first page 5 psView spl © Start at the 5th page psPrint spl © Entire report 3 4 5 101 psPrint 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 nlSpool with a file name as right argument:
splnlSpool '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:
nlspoolname''
... which will make the filename from the system time in the form ~1234567.spl.