Hide

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

Display
Print

Headers and Footers

SftPrintPreview/DLL offers built-in page formatting with its headers and footers, so an application only needs to provide the actual page contents. Left aligned, centered and right aligned headers and footers are available (see SFTPRINTPREVIEW_CONTROL, szHeaderLeft, szHeaderCenter, szHeaderRight, szFooterLeft, szFooterCenter, szFooterRight members). Each is optional and can contain one or multiple lines of text, formatted using the defined header and footer fonts (see SFTPRINTPREVIEW_CONTROL, hFontHeader, hFontFooter members). In addition, lines below the header and above the footer are individually definable (see SFTPRINTPREVIEW_CONTROL, fLineBelowHeader, fLineAboveFooter members).

Headers and footers can contain variable information, which is replaced as pages are previewed and printed. Variables and text can be mixed in each header and footer.

Applications can provide a table of custom variables (using SFTPRINTPREVIEW_CONTROL, lpCustomVars). The default lead-in character for variables (%) can be changed by an application (see SFTPRINTPREVIEW_CONTROL, chVarLeadin).

The following built-in variables are available:

VariableDescription
%date%Today's date - displayed using the short date format according to the user's current regional language settings.
%longdate%Today's date - displayed using the long date format according to the user's current regional language settings.
%output%The output name, as defined using SFTPRINTPREVIEW_CONTROL, szOutput.
%page%Current page number.
%printer%The printer name.
%time%The current time - displayed using the short form (without seconds) according to the user's current regional language settings.
%total%Total pages - If the total number of pages is requested using the %total% variable, the entire output needs to be formatted before the first page can be displayed, in order to determine the actual total number of pages. This is completely automatic, but may result in a slight delay displaying the first page.

If the product has been translated to another language using National Language Support, these variable names may have been translated also. Please make sure to use the language-specific variable names.


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