[]
• new PrintInfo()
Represents the information to use when printing a Worksheet.
▸ bestFitColumns(value?
): any
Gets or sets whether column widths are adjusted to fit the longest text width for printing.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.bestFitColumns(true);
printInfo.orientation(GC.Spread.Sheets.Print.PrintPageOrientation.landscape);
printInfo.pageHeaderFooter({
normal: {
footer: {
center: "SpreadJS"
}
}
});
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
boolean |
any
If no value is set, returns whether column widths are adjusted to fit the longest text width for printing; otherwise, returns the print setting information.
▸ bestFitRows(value?
): any
Gets or sets whether row heights are adjusted to fit the tallest text height for printing.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.bestFitRows(true);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
boolean |
any
If no value is set, returns whether row heights are adjusted to fit the tallest text height for printing; otherwise, returns the print setting information.
▸ blackAndWhite(value?
): any
Gets or sets whether to print in black and white.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.blackAndWhite(true);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
boolean |
any
If no value is set, returns whether to print in black and white; otherwise, returns the print setting information.
▸ centering(value?
): any
Gets or sets how the printed page is centered.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.columnStart(0);
printInfo.columnEnd(2);
printInfo.centering(GC.Spread.Sheets.Print.PrintCentering.horizontal);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
PrintCentering |
any
If no value is set, returns how the printed page is centered; otherwise, returns the print setting information.
▸ columnEnd(value?
): any
Gets or sets the last column to print when printing a cell range.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.columnStart(0);
printInfo.columnEnd(2);
printInfo.centering(GC.Spread.Sheets.Print.PrintCentering.horizontal);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
number |
any
If no value is set, returns the last column to print when printing a cell range; otherwise, returns the print setting information.
▸ columnStart(value?
): any
Gets or sets the first column to print when printing a cell range.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.columnStart(0);
printInfo.columnEnd(2);
printInfo.centering(GC.Spread.Sheets.Print.PrintCentering.horizontal);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
number |
any
If no value is set, returns the first column to print when printing a cell range; otherwise, returns the print setting information.
▸ differentFirstPage(value?
): any
Gets or sets whether to print the different text and format of the header/footer on first page.
example
var printInfo = activeSheet.printInfo();
printInfo.differentFirstPage(true);
printInfo.pageHeaderFooter({
first: {
header: {
left: "It is &T.",
center: "&SThis is text.",
right: "&BHeader"
}
}
});
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
boolean |
any
If no value is set, returns whether to print the different text and format of the header/footer on first page; otherwise, returns the print setting information.
▸ differentOddAndEvenPages(value?
): any
Gets or sets whether to print the different text and format of the header/footer on odd and even pages.
example
var printInfo = activeSheet.printInfo();
printInfo.differentOddAndEvenPages(true);
printInfo.pageHeaderFooter({
odd: {
header: {
left: "It is &T.",
center: "&SThis is text.",
right: "&BHeader"
}
},
even: {
header: {
left: "It is &T.",
center: "&SThis is text.",
right: "&BHeader"
}
}
});
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
boolean |
any
If no value is set, returns whether to print the different text and format of the header/footer on odd and even pages; otherwise, returns the print setting information.
▸ firstPageNumber(value?
): any
Gets or sets the page number to print on the even pages.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.firstPageNumber(1);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
number |
any
If no value is set, returns the page number to print on the even pages; otherwise, returns the print setting information.
▸ fitPagesTall(value?
): any
Gets or sets the number of vertical pages to check when optimizing printing.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.fitPagesTall(1);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
number |
any
If no value is set, returns the number of vertical pages to check; otherwise, returns the print setting information.
▸ fitPagesWide(value?
): any
Gets or sets the number of horizontal pages to check when optimizing the printing.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.fitPagesWide(1);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
number |
any
If no value is set, returns the number of horizontal pages to check; otherwise, returns the print setting information.
▸ margin(value?
): any
Gets or sets the margins for printing, in hundredths of an inch.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.pageHeaderFooter({
normal: {
header: {
left: "Header Left",
right: "Header Right"
},
footer: {
left: "Footer Left",
center: "Footer Center",
right: "Footer Right"
}
}
});
printInfo.margin({top:75, bottom:75, left:20, right:20, header:10, footer:20});
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
PrintMargins |
any
If no value is set, returns the margins for printing; otherwise, returns the print setting information.
▸ orientation(value?
): any
Gets or sets the page orientation used for printing.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.bestFitColumns(true);
printInfo.orientation(GC.Spread.Sheets.Print.PrintPageOrientation.landscape);
printInfo.pageHeaderFooter({
normal: {
footer: {
center: "SpreadJS"
}
}
});
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
PrintPageOrientation |
any
If no value is set, returns the page orientation used for printing; otherwise, returns the print setting information.
▸ pageHeaderFooter(value?
): any
Gets or sets options to print the text and format of the custom header/footer on the page.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.pageHeaderFooter({
normal: {
header: {
left: "It is &T.",
center: "&SThis is text.",
right: "&BHeader"
}
}
});
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
IPageCustomHeaderFooterOptions |
any
If no value is set, returns the options to print the text and format of the custom header/footer on the page; otherwise, returns the print setting information.
▸ pageOrder(value?
): any
Gets or sets the order in which pages print.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.pageOrder(GC.Spread.Sheets.Print.PrintPageOrder.auto);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
PrintPageOrder |
any
If no value is set, returns a value that specifies the order in which pages print; otherwise, returns the print setting information.
▸ pageRange(value?
): any
Gets or sets the page range for printing.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.pageRange("1-3");
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
string |
any
If no value is set, returns a string that provides page numbers or page ranges; otherwise, returns the print setting information.}
▸ paperSize(value?
): any
Gets or sets the paper size for printing.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.pageHeaderFooter({
normal: {
header: {
left: "Header Left"
}
}
});
printInfo.paperSize(new GC.Spread.Sheets.Print.PaperSize(300, 300));
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
PaperSize |
any
▸ qualityFactor(value?
): any
Gets or sets the quality factor for printing.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.pageHeaderFooter({
normal: {
header: {
left: "Header Left"
}
}
});
printInfo.qualityFactor(6);
activeSheet.printInfo(printInfo);
spread.print();
Name | Type |
---|---|
value? |
number |
any
If no value is set, returns the quality factor for printing; otherwise, returns the print setting information.
▸ repeatColumnEnd(value?
): any
Gets or sets the last column of a range of columns to print on the left of each page.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.pageHeaderFooter({
normal: {
header: {
left: "Header Left"
}
}
});
printInfo.repeatColumnStart(0);
printInfo.repeatColumnEnd(2);
printInfo.repeatRowStart(0);
printInfo.repeatRowEnd(2);
activeSheet.printInfo(printInfo);
spread.print();
Name | Type |
---|---|
value? |
number |
any
If no value is set, returns the last column of a range of columns to print on the left of each page; otherwise, returns the print setting information.
▸ repeatColumnStart(value?
): any
Gets or sets the first column of a range of columns to print on the left of each page.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.pageHeaderFooter({
normal: {
header: {
left: "Header Left"
}
}
});
printInfo.repeatColumnStart(0);
printInfo.repeatColumnEnd(2);
printInfo.repeatRowStart(0);
printInfo.repeatRowEnd(2);
activeSheet.printInfo(printInfo);
spread.print();
Name | Type |
---|---|
value? |
number |
any
If no value is set, returns the first column of a range of columns to print on the left of each page; otherwise, returns the print setting information.
▸ repeatRowEnd(value?
): any
Gets or sets the last row of a range of rows to print at the top of each page.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.pageHeaderFooter({
normal: {
header: {
left: "Header Left"
}
}
});
printInfo.repeatColumnStart(0);
printInfo.repeatColumnEnd(2);
printInfo.repeatRowStart(0);
printInfo.repeatRowEnd(2);
activeSheet.printInfo(printInfo);
spread.print();
Name | Type |
---|---|
value? |
number |
any
If no value is set, returns the last row of a range of rows to print at the top of each page; otherwise, returns the print setting information.
▸ repeatRowStart(value?
): any
Gets or sets the first row of a range of rows to print at the top of each page.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.pageHeaderFooter({
normal: {
header: {
left: "Header Left"
}
}
});
printInfo.repeatColumnStart(0);
printInfo.repeatColumnEnd(2);
printInfo.repeatRowStart(0);
printInfo.repeatRowEnd(2);
activeSheet.printInfo(printInfo);
spread.print();
Name | Type |
---|---|
value? |
number |
any
If no value is set, returns the first row of a range of rows to print at the top of each page; otherwise, returns the print setting information.
▸ rowEnd(value?
): any
Gets or sets the last row to print when printing a cell range.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.pageHeaderFooter({
normal: {
header: {
left: "Header Left"
}
}
});
printInfo.rowStart(0);
printInfo.rowEnd(2);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
number |
any
If no value is set, returns the last row to print when printing a cell range; otherwise, returns the print setting information.
▸ rowStart(value?
): any
Gets or sets the first row to print when printing a cell range.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.pageHeaderFooter({
normal: {
header: {
left: "Header Left"
}
}
});
printInfo.rowStart(0);
printInfo.rowEnd(2);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
number |
any
If no value is set, returns the first row to print when printing a cell range; otherwise, returns the print setting information.
▸ showBorder(value?
): any
Gets or sets whether to print an outline border around the entire control.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.showBorder(false);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
boolean |
any
If no value is set, returns whether to print an outline border around the entire control; otherwise, returns the print setting information.
▸ showColumnHeader(value?
): any
Gets or sets whether to print the column header.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.showColumnHeader(GC.Spread.Sheets.Print.PrintVisibilityType.hide);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
PrintVisibilityType |
any
If no value is set, returns whether to print the column header; otherwise, returns the print setting information.
▸ showGridLine(value?
): any
Gets or sets whether to print the grid lines.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.showGridLine(false);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
boolean |
any
If no value is set, returns whether to print the grid lines; otherwise, returns the print setting information.
▸ showRowHeader(value?
): any
Gets or sets whether to print the row header.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.showRowHeader(GC.Spread.Sheets.Print.PrintVisibilityType.hide);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
PrintVisibilityType |
any
If no value is set, returns whether to print the row header; otherwise, returns the print setting information.
▸ useMax(value?
): any
Gets or sets whether to print only rows and columns that contain data.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.useMax(true);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
boolean |
any
If no value is set, returns whether to print only rows and columns that contain data; otherwise, returns the print setting information.
▸ watermark(value?
): IWatermarkItem
Gets or set all watermark.
example
// This example shows how to set watermark.
var printInfo = activeSheet.printInfo();
printInfo.watermark([{x:0, y:0, width:100, height:100, imageSrc:".image/watermark.jpg", page:"all"}]);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
IWatermarkItem [] |
The watermark item.
▸ zoomFactor(value?
): any
Gets or sets the zoom factor used for printing.
example
var printInfo = new GC.Spread.Sheets.Print.PrintInfo();
printInfo.zoomFactor(2);
activeSheet.printInfo(printInfo);
spread.print(0);
Name | Type |
---|---|
value? |
number |
any
If no value is set, returns a value that specifies the amount to enlarge or reduce the printed worksheet; otherwise, returns the print setting information.