Printing
Printing
Purpose: |
Print a specific page from this publication. |
||||
Category: |
Printing |
||||
Syntax: |
PrintPage "pages" "mode" page title A page title or group of titles separated with the pipe character “|”. Pages will be printed in the order listed. Use “All” instead of a page title to print the entire publication, or “Current” to print only the current page. mode One of the following:
|
||||
Example: |
PrintPage "Contents|Introduction|Help" "Final" |
Purpose: |
Print an image file (BMP/PCX/GIF/etc.). For more control over the image size, use PrintImageFileWH instead. |
Category: |
Printing |
Syntax: |
PrintImageFile "file name" "scale factor" file name The name of the image file to print. scale factor This number determines how large the image will appear when printed. You can use the scale factor to compensate for differences in resolution between the screen and the printer. To print an image 1:1 using its normal resolution enter "100%" as the scale factor. To enlarge the printout, enter a number greater than 100. To automatically stretch the image to fit the dimensions of the paper, set the scale factor to "-1". |
Example: |
PrintImageFile "c:\samples\map.bmp" "300%" |
Purpose: |
Print an image file (BMP/PCX/GIF/etc.) using a specific output size. This Action allows you to precisely control the size of the printed image regardless of the resolution of the destination printer. |
Category: |
Printing |
Syntax: |
PrintImageFileWH "file name" "output width" "output height" file name The name of the image file to print. output width, output height The desired output width and output height of the printed image in inches. You can optionally set either the output width or output height to 0 (zero) to automatically calculate that dimension based on the aspect ratio of the image. |
Example: |
PrintImageFileWH "c:\samples\map.bmp" "3.75" "2.5" |
Purpose: |
Print a plain text (ASCII/ANSI) or formatted Rich Text (RTF) file. |
||||||||||||
Category: |
Printing |
||||||||||||
Syntax: |
PrintTextFile "header" "footer" "file" header, footer The text to appear at the top (header) and bottom (footer) of each page. The following codes may be incorporated into the header and footer parameters:
file name The name of the file to print. |
||||||||||||
Example: |
PrintTextFile "Help" "Page &p" "c:\samples\intro.txt" |
Purpose: |
Print an external plain text (ASCII) data file (usually created with the FileWrite Action). |
||||||||||||
Category: |
Printing |
||||||||||||
Syntax: |
PrintDataFile "header" "footer" "file name" header, footer The text to appear at the top (header) and bottom (footer) of each page. The following codes may be incorporated into the header and footer parameters:
file name The name of the external text file to print. |
||||||||||||
Example: |
PrintDataFile "XYZ Corp. Parts List &t" "Page &p" "parts.dat" |
Setup
Purpose: |
Set the default printer orientation (Portrait or Landscape). |
Category: |
Printing |
Syntax: |
SetPrinterOrientation "orientation" orientation The paper orientation. Use “Portrait” to print vertically or “Landscape” to print horizontally. |
Example: |
SetPrinterOrientation "Landscape" |
Purpose: |
Display the Windows Printer Setup dialog box and allow the reader to OK or cancel a print request. |
Category: |
Printing |
Syntax: |
PrintSetup "variable" variable The name of the variable to store the reader’s response. If the reader clicks the dialog’s “OK” button, the variable will contain “True”, meaning it’s OK to go ahead an begin printing. If the reader clicks the dialog’s “Cancel” button, the variable will contain “False” meaning don’t print. Normally, print Actions (PrintPage, PrintTextFile, etc.) automatically display the Windows Printer Setup screen and ask the reader for confirmation before printing. There are times when a publication’s author may wish to control when the Printer Setup screen appears. For this purpose, VisualNEO Win provides the PrintSetup Action and an option under App Properties to disable the automatic display of the Print Setup screen. |
Example: |
The example below assumes that the Print Setup screen has been turned off in App Properties: PrintSetup "[Result]" |