Hide

SftPrintPreview/OCX 1.0 - ActiveX Print Preview Control

Display
Print

Application-Generated Output

SftPrintPreview/OCX can be used to display and print application-generated output.

Application generated output is output that the application creates by rendering a page directly into a device context, rather than using a control (such as a RichEdit or a SftTree/OCX control).

Visual Basic 6.0 does not allow use of the RenderContent event, which precludes the display of application-generated output. Application-generated output is not supported for Visual Basic 6.0. Application-generated output is supported for VB.NET and all other supported languages.

An application uses the ContentProviderCallback method to define its callback routine that renders the output. The RenderContent event is then called by SftPrintPreview/OCX to allow the application to render each page.

The PreviewPages sample demonstrates how an application can generate its own page output. The source code for this sample is available in the product directory \Program Files\Softelvdm\SftPrintPreview OCX 1.0\Samples.

The sample displays a bitmap, followed by 50 lines of text a total of 20 times. It uses techniques described in the topic Page Management to restart displaying a specific page, without the need to reformat all preceding pages.

When previewing/printing output, only TrueType or ClearType fonts should be used, to insure proper scaling and resizing of all generated output.


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.