PrtPreviewOpen Method (PANEL)


PLBCMP GUI Only, 9.4D

 

The PrtPreviewOpen method creates an Advanced Print Preview window on the PANEL object window. This method uses the following format:

 

[label]

{object}.PrtPreviewOpen

[GIVING {return}]:

USING [*SpoolFile=]{spoolfile}[:

[*PrinterName=]{printername}][:

[*StartPage=]{startpage}][:

[*GotoPage=]{gotopage}][:

[*EndPage=]{endpage}][:

[*Zoom=]{zoom}

 

Where:

label

Optional. A Program Execution Label.

object

Required. A Panel that is created.

return

Optional. A Numeric Variable that indicates the success or failure of the method.

spoolfile

Required. A Character String Variable or literal that specifies the file name that contains the spool file to be used when creating the print preview window in the {object}.

printername

Optional. A previously defined Character String Variable or literal that contains a printer name that determines the print characteristics for the print preview window.

startpage

Optional. A Numeric Variable or decimal value the specifies the beginning physical page that is page one in the Print Preview presentation.

gotopage

Optional. A Numeric Variable or decimal value that specifies the first page presented from the print preview page set being used.

endpage

Optional. A Numeric Variable or decimal value that specifies the ending physical page that is the last page in the Print Preview presentation.

zoom

Optional. A Numeric Variable or decimal value that specifies the initial zoomed state for the Print Preview window that is created on the PANEL window.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The {spoolfile} must have been previously created as the output from an Advance Print operation.

  2. If the {startpage} option is not specified, page one defaults to the first physical page generated from the spool file.

  3. The {gotopage} value should be between one and the last logical page being reviewed.

  4. If the {endpage} option is not specified, the last page defaults to the last paged generated from the spool file.

  5. The {zoom} value can be specified as a value equal to or greater than zero. If the {zoom} value is specified as zero, the Print Preview window is created to best fit within the PANEL window. If the {zoom} value is greater than zero, the numeric value specifies a percentage used to zoom the Print Preview window. The {zoom} value can be specified as a value of zero or as a value in the range of 10 to 400 percent inclusive.

  6. If the autofit zoom mode is specified, the Advanced Print Preview window is automatically scaled to give the best fit in the PANEL window when the PANEL window is resized.

  7. If the PANEL object is created with scrollbars, the operation of the scrollbars is taken over by the Advanced Print Preview window to control the scrolling of the print page that is being viewed within the PANEL object.

  8. The returned value is zero if the method was executed successfully.

  9. If the value returned is zero, the ZERO Condition Flag is set.

  10. The EOS Condition Flag is always cleared.

  11. The OVER Condition Flag is set if the {return} variable it too small to receive the method result without truncation.

  12. This method is not available when using the PL/B Web Server.

 

 

See Also: Panel Methods, Method Syntax

 



PL/B Language Reference PrtPreviewClose Method (PANEL)