Hi,
I am converting excel to PDF . I have an excel which has more than 60 columns but i am not able to convert that excel into pdf .I am getting blank pdf. Please find the below code i am using. With the same code I am able to generate convert excel which has around 20 to 30 columns into pdf.
Please Suggest me.
Worksheet sheet = workbook.getWorksheets().get(0);
PageSetup pageSetup = sheet.getPageSetup();
//Setting the orientation to Portrait
pageSetup.setOrientation(PageOrientationType.PORTRAIT);
pageSetup.setLeftMargin(HALF);
pageSetup.setRightMargin(HALF);
pageSetup.setTopMargin(ONE);
pageSetup.setZoom(ONETWENTY);
//Setting the printing order of the pages to over then down
pageSetup.setOrder(PrintOrderType.OVER_THEN_DOWN);
pageSetup.setPrintTitleColumns("$A:$A");
//Defining row numbers 1 - 2 as title rows
pageSetup.setPrintTitleRows("$1:$7");
pageSetup.setFooter (1, " &12 &B Page &P of &N");
PdfSaveOptions saveOpt = new PdfSaveOptions(SaveFormat.PDF);
saveOpt.setAllColumnsInOnePagePerSheet(true);
workbook.save(pdfOutputPath, saveOpt);