Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

getPageMarginTop method

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

Internet Explorer 8



VARIANT retVal = object.getPageMarginTop(pageRule, pageWidth, pageHeight);


pageRule [in]
C++IDispatch pointer that specifies an IHTMLStyleSheetPage rule.
JavaScriptIDispatch 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.


getPageMarginRight 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;
    pageBoxWidth  = Printer.pageHeight * 10;
    pageBoxHeight = Printer.pageWidth  * 10;

See also




Community Additions

© 2015 Microsoft