Search Locate Previous Next Contents

nlClose – return completed report

As you build up your report, each page is held internally in the NewLeaf namespace as a simple text vector of PostScript code. When the report is complete, you should run the nlClose function, which adds header details (for example it enumerates the fonts used in the document), to have the complete report returned to your application:

     rpt„nlClose
     ½rpt
21453

This can be printed with the PostScript .Print function, or you might wish to preview it first with psView:

psView rpt      © View starting from the first page
5 psView rpt    © Start at the 5th page
psPrint rpt     © Write to the default Windows printer
'file' psWriteEPS rpt  © Output as file.EPS

Note that the right-mouse menu on the viewer allows you to print the report or save it to file as EPS.

If you use CausewayPro for your application programming, there is a PostScript viewer object which takes as its data the current page, and as its reference a PostScript definition such as rpt. If you make a simple form definition (probably including a VCR control to set the page number) which includes this you have a very simple and effective print-preview mechanism with full pan and zoom already built in. There are some examples in the CausewayPro Tutor namespace which you can copy and adapt.

See also Using the PostScript Viewer.



Continue to: nlCopyFit – copy fitting
© Copyright Causeway Graphical Systems Ltd 2001