[]
        
(Showing Draft Content)

GC.Spread.Sheets.Print.PaperSize

Class: PaperSize

Sheets.Print.PaperSize

Table of contents

Constructors

Methods

Constructors

constructor

new PaperSize(widthOrKind?, height?)

Specifies the paper size. The constructor has 3 modes. If there are 2 parameters, the parameters are width and height with a type of number; If there is 1 parameter, the parameter is kind which is a GC.Spread.Sheets.Print.PaperKind type; If there is no parameter, the result is the same as the second mode and the kind option is GC.Spread.Sheets.Print.PaperKind.letter.

example

var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.pageHeaderFooter({
     normal: {
         header: {
             left: "Header Left"
         }
     }
});
printInfo.paperSize(new GC.Spread.Sheets.Print.PaperSize(GC.Spread.Sheets.Print.PaperKind.a4));
spread.print(0);

Parameters

Name Type
widthOrKind? number
height? number

Methods

getPageSize

getPageSize(kind): PrintSize

Gets the paper size, in hundredths of an inch.

Parameters

Name Type Description
kind PaperKind The kind of the paper.

Returns

PrintSize

The size which contains width and height of the paper.
size.width The width of the size, in hundredths of an inch.
size.height The height of the size, in hundredths of an inch.


height

height(value?): any

Gets or sets the height of the paper, in hundredths of an inch.

Parameters

Name Type
value? number

Returns

any

If no value is set, returns the height of the paper; otherwise, returns the paper size.


kind

kind(value?): any

Gets or sets the kind of the paper.

Parameters

Name Type
value? PaperKind

Returns

any

If no value is set, returns the kind of the paper; otherwise, returns the paper size.


width

width(value?): any

Gets or sets the width of the paper, in hundredths of an inch.

Parameters

Name Type Description
value? number The width of the paper.

Returns

any

If no value is set, returns the width of the paper; otherwise, returns the paper size.