We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Probleme while converting XLS file into PDF

Hello,

I am trying to convert an xls file generated through jasper report into pdf format using java and aspose.cells.
I am doing the following:

Workbook w = new Workbook();
try {
w.open(“C:\myfile.xls”);
} catch (IOException e) {
e.printStackTrace();
}
try {
w.save(“C:\myFile.pdf”,FileFormatType.PDF);
} catch (IOException e) {
e.printStackTrace();
}

It does create the pdf file but it does not take care of images and cells background.
If I open the xls file with my local excel and save it (without doing any changes), it converts correctly with barground cells an images.

Is there anything to do in order convert directly including images an background cells ?

Thanks for your help






Hi,

Well, for your information, if you set the sheet’s background, it won’t be displayed in Print Preview in MS Excel, the sheet’s background would not be rendered in the generated pdf file.

If you paste simple images into the cells, the images should be rendered fine. Could you post your template file here, we will check your issue soon.

Thank you.

Thanks for your answer.
Here are 2 files :
- the xls template (test.xls)
- the pdf result.

Thank you

Hi,

After an initial test using your template Excel file, I have found the issue. I have logged your issue into our issue tracking system with an id: CELLSJAVA-19894. Once we figure it out, we will update you here.

Thank you.

The original excel file has no meta tag set (not creation/last modification date, no author, no security)
Open the file with excel and save it set those meta tags

Maybe this can help…

Hi,


It seems that your template file was not created by MS Excel because there is some data in it that does not completely confirm to the specifications of xls file/format. Anyways, we have enhanced our component to process such kind of template file. Please try the fix V2.4.0.4 (attached).


Thank you.

The issues you have found earlier (filed as 19894) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.