Spread.Sheets Documentation
paperSize Method
The paper size for printing.
value.width {number} The width, in hundredths of an inch.
value.height {number} The height, in hundredths of an inch.
Gets or sets the paper size for printing.
Syntax
var instance = new GC.Spread.Sheets.Print.PrintInfo();
var returnValue; // Type: any
returnValue = instance.paperSize(value);
function paperSize( 
   value : PaperSize
) : any;

Parameters

value
The paper size for printing.
value.width {number} The width, in hundredths of an inch.
value.height {number} The height, in hundredths of an inch.

Return Value

If no value is set, returns the paper size for printing; otherwise, returns the print setting information.
Example
The following examples set the paper size.
activeSheet.setRowCount(3, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setColumnCount(3, GC.Spread.Sheets.SheetArea.viewport);

activeSheet.suspendPaint();
            //set value
            for (var r = 0, rc = activeSheet.getRowCount(); r < rc; r++) {
                for (var c = 0, cc = activeSheet.getColumnCount(); c < cc; c++) {
                    activeSheet.setValue(r, c, r + c);
                }
            }
activeSheet.resumePaint();

$("#button1").click(function () {
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.headerLeft("Header Left");
printInfo.paperSize(new GC.Spread.Sheets.Print.PaperSize(GC.Spread.Sheets.Print.PaperKind.a4));
spread.print(0);
   });
activeSheet.setRowCount(3, GC.Spread.Sheets.SheetArea.viewport);
activeSheet.setColumnCount(3, GC.Spread.Sheets.SheetArea.viewport);

activeSheet.suspendPaint();
            //set value
            for (var r = 0, rc = activeSheet.getRowCount(); r < rc; r++) {
                for (var c = 0, cc = activeSheet.getColumnCount(); c < cc; c++) {
                    activeSheet.setValue(r, c, r + c);
                }
            }
activeSheet.resumePaint();

$("#button1").click(function () {
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.headerLeft("Header Left");
printInfo.paperSize(new GC.Spread.Sheets.Print.PaperSize(300, 300));
spread.print(0);
   });
See Also

Reference

PrintInfo type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.