SpreadJS Documentation
zoomFactor Method
The zoom factor used for printing.
Gets or sets the zoom factor used for printing.
Syntax
var instance = new GcSpread.Sheets.PrintInfo();
var returnValue; // Type: number
returnValue = instance.zoomFactor(value);
function zoomFactor( 
   value : number
) : number;

Parameters

value
The zoom factor used for printing.

Return Value

A value that specifies the amount to enlarge or reduce the printed worksheet. The default value is 1. Specify the value as a number between 0.1 (10% zoom) and 4 (400% zoom).
Example
This example uses the zoomFactor method.
activeSheet.setRowCount(5, GcSpread.Sheets.SheetArea.viewport);
activeSheet.setColumnCount(5, GcSpread.Sheets.SheetArea.viewport);

activeSheet.isPaintSuspended(true);
            //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.isPaintSuspended(false);

$("#button1").click(function () {
var printInfo = activeSheet.printInfo();
printInfo.zoomFactor(2);
spread.print(0);
   });
See Also

Reference

PrintInfo type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.