Share via


getPageMarginBottom method

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

 

Syntax

var retval = TemplatePrinter.getPageMarginBottom(pageRule, pageWidth, pageHeight);

Parameters

  • pageRule [in]

    C++ Object pointer that specifies an IHTMLStyleSheetPage rule.
    JScript Object pointer that specifies an @page rule.
  • pageWidth [in]
    Type: LONG

    The page box width, in 1000ths of an inch.

  • pageHeight [in]
    Type: LONG

    The page box height, in 1000ths of an inch.

Return value

Type: Variant

The margin, in 1000ths of an inch, or null if the margin is not specified.

Remarks

getPageMarginBottom was introduced in Windows Internet Explorer 8.

If the page orientation is landscape, the pageWidth and 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

TemplatePrinter

pages