Excel to PDF conversion: lay-out problem

Hi,

It’s my first time using the Aspose.Excel and Aspose.Pdf components. I’m using the evaluation versions for now.

I need to convert an Excel document to PDF and I noticed some problems:

  • Images included in the Excel are not in the generated PDF
  • Text with right alignment in cells are left aligned in PDF
  • Not all borders from the cells are in the PDF
Are this known issues or am I doing something wrong?

I open an Excel file, save it to AsposePdf xml format and then build a PDF from that xml.

Kind regards, Stief

Dear Stief,

Thank you for considering Aspose.

I will contact the Aspose.Excel and then reply to you soon.

Images are not supported in Xls2Pdf conversion. Please check

For the other two issues, could you post your file and sample code here? We will check it soon.

I use this code to convert an Excel to PDF:

Excel excel = new Excel();
excel.Open(fileFullName);
excel.Save(tempXmlFile, FileFormatType.AsposePdf);

Pdf pdf = new Pdf();
pdf.TruetypeFontMapPath = saveLocation;
pdf.PageSetup.PageHeight = PageSize.A4Height;
pdf.PageSetup.PageWidth = PageSize.A4Width;
pdf.DestinationType = DestinationType.FitPage;

pdf.BindXML(tempXmlFile, null);
pdf.Save(saveLocation + fileName + “.pdf”);

You find the source Excel attached to this post. In the Excel document the word “Proefverslag” is aligned to the right but in the PDF it’s left aligned and part of it is lost because there is some other data in the cell beside it. Also the border below is not complete.

Is the support for images planned for future releases or not?

Thanks.
Stief