Publishing Engine Programmer's Guide > PTC Arbortext Publishing > The Publishing Framework > Print and Print Preview > Print Preview
  
Print Preview
The preview command displays a document in a window in the format that it will appear in when it prints. The preview command has a number of options that are implemented entirely in Arbortext Editor; these options stop the Arbortext Formatting Engine, launch the Preview window on a previously-formatted document, and perform other minor housekeeping functions.
If you invoke the preview command for real processing (i.e., not for one of the housekeeping functions) then Arbortext Editor will invoke the ACL routine compose::compose_for_preview in the module comp_dvi.acl. It will invoke the ACL layer if any of the following conditions are true:
PE publishing is enabled
Arbortext Editor is running from a compact install tree
The document to be previewed is a DITA map or topic
the document type of the document to be previewed is configured to allow the user to choose the stylesheet to be used
the stylesheet being used is an XSL stylesheet, an PTC APP template, or a .style file that contains an XSL stylesheet or PTC APP template
set options that use of PTC APP rather than the Arbortext Formatting Engine
If Arbortext Editor is running from a compact install tree, then compose::compose_for_preview will call compose_pdf_preview() in the module comp_pdf.acl, which will translate the document into PDF and launch a PDF viewer. Otherwise compose::compose_for_preview will set some parameters and then call compose::compose_for_dvi(), is part of the outer layer of the publishing framework; this routine will either use the Arbortext Formatting Engine to translate the document to the DVI format and then use the preview noformat to launch the Preview window or use the PTC Advanced Print Publisher to translate the document to PDF and then launch a PDF viewer.