Printing options lost when file converted from xls to pdf

Hello,

I have the following problem :
I set up the paper size & the page orientation on an excel file with aspose.cells.
When I save the excel file into pdf format, the page size and the orientation are lost

Workbook w = new Workbook();
try {
w.open(“C:\test.xls”);
} catch (IOException e) {
e.printStackTrace();
}
w.getWorksheets().getSheet(0).getPageSetup().setPaperSize(PaperSizeType.PAGE_A3); w.getWorksheets().getSheet(0).getPageSetup().setOrientation(PageOrientationType.LANDSCAPE);
try {
w.save(“C:\test.xls.pdf” ,FileFormatType.PDF);
} catch (IOException e) {
e.printStackTrace();
}


Thanks for your help


Hi,

Please post your sample files (Excel file and PDF file) here, we will will check your issue soon.

Also, which version of the product you are using?

Thank you.

I am using Aspose.cells v2.4.0.4for java (JDK 5.0)

Here is the sample file

Hi,

After using your template Excel file, I can find the issue as you have described. I have logged your issue into our issue tracking system with an id: CELLSJAVA-19976. We will figure it out soon.

Thank you.

Hi,

After further investigation, I think it works fine with MS Excel 2003 and MS Excel 2007. Please open your template file “text.xls” and take the Print preview of the sheet, now generate the pdf file using Aspose.Cells for Java api (by just opening and saving it to pdf file), the resultant file is same. Could you post your generated pdf file, also give us the screen shot of the print preview of the Excel sheet in MS Excel. Moreover, give us the version number of MS Excel you are using? We will check it soon.

Thank you.