PrintDoc

<< Click to Display Table of Contents >>

Navigation:  Printing Functions >

PrintDoc

Previous pageReturn to chapter overviewNext page

[Windows platform only; not supported by PHP and the Community Edition]

Prints the document. You may not close your application or the document until VPE has finished all print-jobs. Your application code will hold at the PrintDoc() call as long as all pages are printed.  But your application will still be able to receive window messages.

During printing, VPE will disable the parent window of the preview supplied as parameter in OpenDoc(). If the parent window is not the main window of your application, or if your application is in any other way able to receive and to respond to messages, it is your responsibility to disable your application, or to take care that your print-functions (for example a button or a menu entry that invokes printing) are stopped from being reentered.

method void VPE.PrintDoc(

boolean WithSetup

)

boolean WithSetup

Value

Description

True

show printer setup-dialog

False

do not show printer setup-dialog

Remarks:

After calling PrintDoc(), code execution is suspended until the document has been completely printed. So the following command sequence is absolutely valid:

Call Report.PrintDoc(True or False)

Call Report.CloseDoc

The document will be closed AFTER it has been printed (or, if the print has been aborted by the user, which can be realized with the "Print" event). But due to the event-driven mechanism of Windows,  your form is still "alive" and other actions can take place (like button clicks), and the related code will be executed.