Property

Method

Event

 

 

SetPaperSize

Sets the paper size for printing.The specified paper size is used for print-related features or when printing the content of Web Editor Control using the PrintFile method.

Syntax

    HRESULT SetPaperSize(
    long type
    );

Parameters

type

[in] Size of the paper.

1

A4

2

Letter

Return Values

0 (always)

Remark

The specified value of this method does not affect the size of the Edit window.

Sample Codes

VBScript

Dim fRef
Set fRef = document.editForm
fRef.wec.SetPaperSize 1 ' Sets the paper size to' A4' and prints the current document.
fRef.wec.PrintFile "" ' Starts printing.

JScript

var wec = document.wec;
wec.SetPaperSize(1); //Sets the paper size to' A4' and prints the current document.
wec.PrintFile(""); // Starts printing.