Export (0) Print
Expand All
14 out of 15 rated this helpful - Rate this topic

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_BaseLineScale

Retrieves an integer specifying the font size of the print template.

__IE_BrowseDocument

Retrieves the document object of the page being printed or print-previewed.

__IE_ContentDocumentUrl

Retrieves a string specifying the URL of a temporary copy of the source document for the print template.

__IE_ContentSelectionUrl

Retrieves a string specifying the URL of a temporary .htm file containing the current selection in the browser.

__IE_DisplayUrl

Retrieves a string that specifies the URL of the document.

__IE_FooterString

Retrieves a string specifying the footer string from the Page Setup dialog box.

__IE_HeaderString

Retrieves a string specifying the header string from the Page Setup dialog box.

__IE_OutlookHeader

Retrieves a string specifying the Microsoft Outlook header string.

__IE_PrinterCMD_Device

Retrieves a string specifying the printer device driver if one was specifcied by the caller.

__IE_PrinterCmd_DevMode

Retrieves a DEVMODE structure that contains information about the device initialization and environment of a printer.

__IE_PrinterCmd_DevNames

Retrieves a DEVNAMES structure that contains strings which identify the driver, device, and output port names for a printer.

__IE_PrinterCMD_Port

Retrieves a string specifying the printer port if one was specified by the caller.

__IE_PrinterCMD_Printer

Retrieves a string specifying the printer name.

__IE_PrintType

Retrieves 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_TemplateUrl

Retrieves a string specifying the URL of the print template.

__IE_TemporaryFiles

Retrieves a reference to a list of temporary file names saved from this document.

__IE_uPrintFlags

Retrieves a print flag value.

allLinkedDocuments

Sets or retrieves whether all documents linked to in the current document are printed with the current print job.

collate

Sets or retrieves whether the pages of a document are collated when printed.

contentDocument

Retrieves the document object of the page being printed or print-previewed.

contentOverflow

Retrieves a value that indicates whether the document contains additional content after processing the current LayoutRect object.

contentSrc

Sets or retrieves the content source for a LAYOUTRECT element in a print template.

copies

Sets or retrieves how many copies of the document to print.

currentPage

Sets or retrieves a Boolean value indicating whether the print current page option is checked.

currentPageAvail

Sets or retrieves a Boolean value indicating whether the print current page option should be enabled in the print dialog box.

dateLong

Sets or retrieves the current date in long format.

dateShort

Sets or retrieves the current date in short format.

duplex

Retrieves a Boolean value indicating whether double-sided printing is active.

font

This method gets or sets the font properties for the header and footer.

footer

Sets or retrieves the footer formatting string from the Page Setup dialog box.

frameActive

Sets 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.

frameActiveEnabled

Enables or disables the radio button labeled Only the selected frame in the Print frames section of the Print dialog box.

frameAsShown

Sets or retrieves whether the document's frames are printed exactly as they appear on the screen.

framesetDocument

Sets or retrieves whether all the documents in the frameset are printed.

header

Sets or retrieves the header formatting string from the Page Setup dialog box.

headerFooterFont

Sets or retrieves a combination of strings that define font properties of the header and footer.

honorPageBreaks

Not implemented.

honorPageRules

Not implemented.

htmlFoot

Retrieves the HTML representation of the footer, as specified by the footer formatting string entered in the textFoot property of the HeaderFooter behavior.

htmlHead

Retrieves the HTML representation of the header, as specified by the header formatting string entered in the textHead property of the HeaderFooter behavior.

marginBottom

Sets or retrieves the bottom margin of the document to be printed.

marginLeft

Sets or retrieves the left margin of the document to be printed.

Sets or retrieves the left margin of the document to be printed.marginRight

Sets or retrieves the right margin of the document to be printed.

marginTop

Sets or retrieves the top margin of the document to be printed.

MEDIA

Sets or retrieves whether the document will be printed at the highest possible resolution.

nextRect

Sets or retrieves the identifier of the next LayoutRect element used to format the document.

orientation

Sets or retrieves the printing orientation for the current printer.

page

Sets or retrieves the page number that the HeaderFooter behavior uses when generating HTML for headers and footers.

pageFrom

Sets or retrieves the first page in the document to be printed.

pageHeight

Retrieves the current height of a page on the printer.

pageTo

Sets or retrieves the last page in the document to be printed.

pageTotal

Sets or retrieves the page total that the HeaderFooter behavior uses when generating HTML for headers and footers.

pageWidth

Retrieves the current width of a page on the printer.

Retrieves the current width of a page on the printer.selectedPages

Sets or retrieves whether a selected range of pages is printed, rather than the whole document.

selection

Sets or retrieves whether the selected portion of the document is the only part to be printed.

selectionEnabled

Enables or disables the Selection radio button on the Print dialog box.

tableOfLinks

Sets or retrieves whether to print a table of links as part of the current print job.

textFoot

Sets or retrieves the control string used by the HeaderFooter behavior to generate HTML for the footer.

textHead

Sets or retrieves the control string used by the HeaderFooter behavior to generate HTML for the header.

timeLong

Sets or retrieves the current time in long format.

timeShort

Sets or retrieves the current time in short format.

title

Sets or retrieves the title of the document currently being printed or print-previewed.

unprintableBottom

Retrieves the size of the bottom unprintable margin for the current printer.

unprintableLeft

Retrieves the size of the left unprintable margin for the current printer.

unprintableRight

Retrieves the size of the right unprintable margin for the current printer.

unprintableTop

Retrieves the size of the top unprintable margin for the current printer.

url

Sets or retrieves the URL of the document currently being printed or print-previewed.

usePrinterCopyCollate

Sets or retrieves a value that indicates whether the printer copy/collate feature is enabled.

Methods

deviceSupports

Checks whether the printer supports a specified feature.

ensurePrintDialogDefaults

Not 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. getPageMarginTopImportant

Retrieves whether the top margin of the specified @page rule is marked as !important.

printBlankPage

Prints a blank page.

printNonNative

Sends a non-HTML document, such as a Microsoft Word document, to the printer.

printNonNativeFrames

Sends a non-HTML document, such as a Word document, to the printer from a page containing frames.

printPage

Sends a page, as defined by a DeviceRect, to the printer.

showPageSetupDialog

Displays the Page Setup dialog box.

showPrintDialog

Displays the Print dialog box.

startDoc

Uses the current print template to start a print job.

stopDoc

Ends the current print job.

updatePageStatus

Indicates the status of a print job.

Events

onlayoutcomplete

Fires 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

IHeaderFooter

Implements print template properties.

IHeaderFooter2

Extends IHeaderFooter.

ITemplatePrinter

Provides a print template with access to page setup and printer settings, as well as control over print jobs initiated from the template.

ITemplatePrinter2

Provides a print template with access to page setup and printer settings, as well as control over print jobs initiated from the template.

ITemplatePrinter3

Extends ITemplatePrinter2 to retrieve author-specified page margins and to modify the font used for page header and footer.

Objects

CTemplatePrinter

Provides access to the ITemplatePrinter2 interface.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.