Posted 22 November 2021, 10:30 am EST - Updated 3 October 2022, 12:31 am EST
Hi,
I would like to print a particular selection in a worksheet all in one page and I have gone through the demo posted here https://www.grapecity.com/spreadjs/demos/features/print/custom-print/angular .
I am trying to print the selected rows and columns all on one page while in landscape orientation, but anytime I try to set the columnEnd property to 10 or more, the excess columns are put on other pages like in the first screenshot.
How do I ensure that no matter how many columns I intend to add to the print region, when I decide to print, all the columns (or rows) fit into one page?
I also tried printing a worksheet in my demo app and it is showing blank pages. Below is a snippet of my code and screenshots of what I have on my spread control vs what is printing.
rowStart = 62;
rowEnd = -90;
columnStart = 10;
columnEnd = 18;
// printInfo['rowStart'](rowStart);
// printInfo['rowEnd'](rowEnd);
// printInfo['columnStart'](columnStart);
// printInfo['columnEnd'](columnEnd);
printInfo.showBorder(true);
printInfo.showGridLine(true);
printInfo.showColumnHeader(
GC.Spread.Sheets.Print.PrintVisibilityType.show
);
printInfo.showRowHeader(
GC.Spread.Sheets.Print.PrintVisibilityType.show
);
printInfo.bestFitColumns(true);
printInfo.bestFitRows(true);
printInfo.fitPagesWide(1);
printInfo.fitPagesTall(1);
sheet.printInfo(printInfo);
Thank you for your help.