Print Template Reference
This section contains links that provide access to the object model exposed by the print preview behaviors.
Elements
DeviceRect
Provides a container for LAYOUTRECT elements and other content in a print template.
HeaderFooter
Provides a tool so that a print template can convert header and footer formatting strings to formatted HTML.
LayoutRect
Creates a container element for document content in a print or print preview template.
TemplatePrinter
Provides a print template with access to page setup and printer settings and control over print jobs initiated from the template.
Objects
dialogArguments
Provides a print template with access to the dialogArguments properties passed to the print preview dialog window.
Properties
__IE_ActiveFrame
Retrieves the index of the active frame in the frames collection.
Retrieves the index of the active frame in the frames collection.__IE_BaseLineScaleRetrieves an integer specifying the font size of the print template.
__IE_BrowseDocumentRetrieves the document object of the page being printed or print-previewed.
__IE_ContentDocumentUrlRetrieves a string specifying the URL of a temporary copy of the source document for the print template.
__IE_ContentSelectionUrlRetrieves a string specifying the URL of a temporary .htm file containing the current selection in the browser.
__IE_DisplayUrlRetrieves a string that specifies the URL of the document.
__IE_FooterStringRetrieves a string specifying the footer string from the Page Setup dialog box.
__IE_HeaderStringRetrieves a string specifying the header string from the Page Setup dialog box.
__IE_OutlookHeaderRetrieves a string specifying the Microsoft Outlook header string.
__IE_PrinterCMD_DeviceRetrieves a string specifying the printer device driver if one was specifcied by the caller.
__IE_PrinterCmd_DevModeRetrieves a DEVMODE structure that contains information about the device initialization and environment of a printer.
__IE_PrinterCmd_DevNamesRetrieves a DEVNAMES structure that contains strings which identify the driver, device, and output port names for a printer.
__IE_PrinterCMD_PortRetrieves a string specifying the printer port if one was specified by the caller.
__IE_PrinterCMD_PrinterRetrieves a string specifying the printer name.
__IE_PrintTypeRetrieves a string specifying whether a print template should prompt the user with the Print dialog box, with the Print Preview dialog box, or not prompt the user at all.
__IE_TemplateUrlRetrieves a string specifying the URL of the print template.
__IE_TemporaryFilesRetrieves a reference to a list of temporary file names saved from this document.
__IE_uPrintFlagsRetrieves a print flag value.
allLinkedDocumentsSets or retrieves whether all documents linked to in the current document are printed with the current print job.
collateSets or retrieves whether the pages of a document are collated when printed.
contentDocumentRetrieves the document object of the page being printed or print-previewed.
contentOverflowRetrieves a value that indicates whether the document contains additional content after processing the current LayoutRect object.
contentSrcSets or retrieves the content source for a LAYOUTRECT element in a print template.
copiesSets or retrieves how many copies of the document to print.
currentPageSets or retrieves a Boolean value indicating whether the print current page option is checked.
currentPageAvailSets or retrieves a Boolean value indicating whether the print current page option should be enabled in the print dialog box.
dateLongSets or retrieves the current date in long format.
dateShortSets or retrieves the current date in short format.
duplexRetrieves a Boolean value indicating whether double-sided printing is active.
fontThis method gets or sets the font properties for the header and footer.
footerSets or retrieves the footer formatting string from the Page Setup dialog box.
frameActiveSets or retrieves a value that indicates whether the option button labeled Only the selected frame in the Print frames section of the Print dialog box is selected.
frameActiveEnabledEnables or disables the radio button labeled Only the selected frame in the Print frames section of the Print dialog box.
frameAsShownSets or retrieves whether the document's frames are printed exactly as they appear on the screen.
framesetDocumentSets or retrieves whether all the documents in the frameset are printed.
headerSets or retrieves the header formatting string from the Page Setup dialog box.
headerFooterFontSets or retrieves a combination of strings that define font properties of the header and footer.
honorPageBreaksNot implemented.
honorPageRulesNot implemented.
htmlFootRetrieves the HTML representation of the footer, as specified by the footer formatting string entered in the textFoot property of the HeaderFooter behavior.
htmlHeadRetrieves the HTML representation of the header, as specified by the header formatting string entered in the textHead property of the HeaderFooter behavior.
marginBottomSets or retrieves the bottom margin of the document to be printed.
marginLeftSets or retrieves the left margin of the document to be printed.
Sets or retrieves the left margin of the document to be printed.marginRightSets or retrieves the right margin of the document to be printed.
marginTopSets or retrieves the top margin of the document to be printed.
MEDIASets or retrieves whether the document will be printed at the highest possible resolution.
nextRectSets or retrieves the identifier of the next LayoutRect element used to format the document.
orientationSets or retrieves the printing orientation for the current printer.
pageSets or retrieves the page number that the HeaderFooter behavior uses when generating HTML for headers and footers.
pageFromSets or retrieves the first page in the document to be printed.
pageHeightRetrieves the current height of a page on the printer.
pageToSets or retrieves the last page in the document to be printed.
pageTotalSets or retrieves the page total that the HeaderFooter behavior uses when generating HTML for headers and footers.
pageWidthRetrieves the current width of a page on the printer.
Retrieves the current width of a page on the printer.selectedPagesSets or retrieves whether a selected range of pages is printed, rather than the whole document.
selectionSets or retrieves whether the selected portion of the document is the only part to be printed.
selectionEnabledEnables or disables the Selection radio button on the Print dialog box.
tableOfLinksSets or retrieves whether to print a table of links as part of the current print job.
textFootSets or retrieves the control string used by the HeaderFooter behavior to generate HTML for the footer.
textHeadSets or retrieves the control string used by the HeaderFooter behavior to generate HTML for the header.
timeLongSets or retrieves the current time in long format.
timeShortSets or retrieves the current time in short format.
titleSets or retrieves the title of the document currently being printed or print-previewed.
unprintableBottomRetrieves the size of the bottom unprintable margin for the current printer.
unprintableLeftRetrieves the size of the left unprintable margin for the current printer.
unprintableRightRetrieves the size of the right unprintable margin for the current printer.
unprintableTopRetrieves the size of the top unprintable margin for the current printer.
urlSets or retrieves the URL of the document currently being printed or print-previewed.
usePrinterCopyCollateSets or retrieves a value that indicates whether the printer copy/collate feature is enabled.
Methods
deviceSupports
Checks whether the printer supports a specified feature.
ensurePrintDialogDefaultsNot supported.
getPageMarginBottom
Returns size of bottom margin from a specified @page rule and page dimensions.
getPageMarginBottomImportant
Retrieves whether the bottom margin of the specified @page rule is marked as !important.
getPageMarginLeft
Returns size of left margin from a specified @page rule and page dimensions.
getPageMarginLeftImportant
Retrieves whether the left margin of the specified @page rule is marked as !important.
getPageMarginRight
Returns size of right margin from a specified @page rule and page dimensions.
getPageMarginRightImportant
Retrieves whether the right margin of the specified @page rule is marked as !important.
getPageMarginTop
Returns size of top margin from a specified @page rule and page dimensions.
Returns size of top margin from a specified @page rule and page dimensions. getPageMarginTopImportantRetrieves whether the top margin of the specified @page rule is marked as !important.
printBlankPagePrints a blank page.
printNonNativeSends a non-HTML document, such as a Microsoft Word document, to the printer.
printNonNativeFramesSends a non-HTML document, such as a Word document, to the printer from a page containing frames.
printPageSends a page, as defined by a DeviceRect, to the printer.
showPageSetupDialogDisplays the Page Setup dialog box.
showPrintDialogDisplays the Print dialog box.
startDocUses the current print template to start a print job.
stopDocEnds the current print job.
updatePageStatusIndicates the status of a print job.
Events
onlayoutcompleteFires when the print or print preview layout process finishes filling the current LayoutRect object with content from the source document.
Print Template Interfaces
Additionally, interfaces are available to access print template functionality in C++.
Interfaces
IHeaderFooterImplements print template properties.
IHeaderFooter2Extends IHeaderFooter.
ITemplatePrinterProvides a print template with access to page setup and printer settings, as well as control over print jobs initiated from the template.
ITemplatePrinter2Provides a print template with access to page setup and printer settings, as well as control over print jobs initiated from the template.
ITemplatePrinter3Extends ITemplatePrinter2 to retrieve author-specified page margins and to modify the font used for page header and footer.
Objects
CTemplatePrinterProvides access to the ITemplatePrinter2 interface.