Purpose |
Display a replica of a printed document on the screen. | |
Syntax |
XPRINT PREVIEW hWin, ID [, CALL xxx] XPRINT PREVIEW CLOSE | |
Remarks |
Print Preview is a powerful concept which should be considered in most application programs which provide printed reports. Briefly, the idea involves displaying a printed report on the screen before it is committed to printing on paper. XPRINT PREVIEW allows you to redirect output from
XPRINT PREVIEW selects the graphic target, and should be executed directly after the printer is selected with XPRINT ATTACH. The target is identified by the handle and ID given when it was created. You can optionally specify a callback function which is called upon every execution of an XPRINT FORMFEED or XPRINT CLOSE.
If you include the CallBack option, the callback procedure must be a simple SUB with no parameters and no return value. It is called automatically by the XPRINT engine at the completion of each preview page (upon execution of XPRINT FORMFEED or XPRINT PREVIEW CLOSE. This Sub can perform all sorts of housekeeping help, such as copying the preview bitmap for separate storage, counting pages in the report, or most anything else needed by your program. Copying the bitmap is important in multi-page reports as XPRINT FORMFEED erases the graphic target for preview of the next page. | |
See also |