Hide

SftPrintPreview/DLL 2.0 - Print Preview Control for C/C++

Display
Print

Application-Generated Output

SftPrintPreview/DLL 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/DLL control).

An application written in C provides a drawing callback routine of type SFTPRINTPREVIEW_DRAWINFOPROC to implement page rendering and other functions necessary for page management.

An application written in C++ with MFC can use the CSftPrintPreview_View class to implement a complete Print Preview view and can override the OnPrintOnePage, OnPrintInitialize, OnPrintTerminate and OnPrintClearCache member functions to implement page rendering.

The PreviewPages sample demonstrates how an application can generate its own page output. The source code for this sample is included for both C and C++/MFC and is available in the product directory \Program Files\Softelvdm\SftPrintPreview DLL 2.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.