ITemplatePrinter3::getPageMarginBottom Method

Returns size of bottom margin from a specified @page rule and page dimensions.

Syntax


HRESULT getPageMarginBottom(
    IDispatch *pageRule,
    LONG pageWidth,
    LONG pageHeight,
    VARIANT *pMargin
);

Parameters

pageRule
[in] IDispatch pointer that specifies an IHTMLStyleSheetPage rule.
pageWidth
[in] The page box width, in 1000ths of an inch.
pageHeight
[in] The page box height, in 1000ths of an inch.
pMargin
[out, retval] The margin, in 1000ths of an inch, or NULL if the margin is not specified.

Return Value

Returns S_OK if successful, or E_ACCESSDENIED if the current document is not a print template.

Remarks

ITemplatePrinter3::getPageMarginBottom was introduced in Windows Internet Explorer 8.

If the page ITemplatePrinter2::orientation is landscape, the ITemplatePrinter::pageWidth and ITemplatePrinter::pageHeight should be reversed. For example, the following script correctly sets the page box dimensions.


if (Printer.orientation == "portrait")
{
    pageBoxWidth  = Printer.pageWidth  * 10;
    pageBoxHeight = Printer.pageHeight * 10;
}
else
{
    pageBoxWidth  = Printer.pageHeight * 10;
    pageBoxHeight = Printer.pageWidth  * 10;
}

See Also

IHTMLStyleSheet2::pages
Show: