Aspose Cell (.NET): PDF export issues

Hi Team,

We are observing below issues in pdf out put of excel file using Aspose Cell library.

  1. Font size is not matching with excel sheet in exported PDF document.

Check font size in source excel and Aspose generated pdf. Compare any cell

  1. Alignment and spacing is incorrect in exported PDF document.

Check header section alignment and spacing in generated PDF.

  1. Image added in header section of excel document is blur and not properly aligned in exported PDF document.

Check image added in Header section in source excel and Aspose generated PDF.

You can compare the Manually Generated Excel sheet and its out put as PDF from MS-Excel with

Aspose generated excel sheet with exported PDF programmatically.

Please find attached documents for reference.

We are using below code over the excel file.

Aspose.Cells.Workbook wb = new Workbook();

wb.Worksheets.Clear();

Worksheet ws = wb.Worksheets.Add("Test");

byte[] headerImage = File.ReadAllBytes("141119261548.wmf");

ws.PageSetup.SetHeaderPicture(1, headerImage); <?xml:namespace prefix = "o" ns = "urn:schemas-microsoft-com:office:office" />

for (int row = 0; row <= 10; row++)

for (int col = 0; col <= 10; col++)

ws.Cells[row, col].Value = string.Format("Cell_{0}_{1}", row, col);

wb.Save("Test.xlsx");

wb.Save("test.pdf", SaveFormat.Pdf);

Hope it is clear.

Thanks and Regards,

Nakul

Hi Nakul,

Thanks for your posting and using Aspose.Cells.

We have generated the output PDF using the latest version: Aspose.Cells for .NET 8.2.2.

We generated the output PDF by converting your source Excel file namely (Manual_Book1.xlsx) into PDF using the following code. I have attached the output PDF for your reference.

Please download the attached output PDF and add comments inside it highlighting all the issues and save it and attach it again. We will then log all of your issues based on these comments.

C#


String filePath = @“F:\Shak-Data-RW\Downloads\Docs\Manual_Book1.xlsx”;


Workbook workbook = new Workbook(filePath);

workbook.Save(filePath + “.out.pdf”, SaveFormat.Pdf);

Hi Shakeel.


Please find attached image(PDF_Issues.png) with issues highlighted.

Compare the generated PDF with excel file.

Thanks and Regards,
Nakul

Hi Nakul,

Thanks for your posting and using Aspose.Cells.

We were able to observe two of the issues you mentioned. However, we were not able to observe column mismatch issue. The Pdf generated with Aspose.Cells and Pdf generated with Excel looks same in that case. I have attached the Excel generated Pdf for your reference.

We have logged the rest of two issues. We will look into them and fix these issues. Once, these issues are resolved or we have some other update for you, we will let you know asap.

These issues have been logged as

  • CELLSNET-43129 - Font is different than excel sheet
  • CELLSNET-43130 - Image alignment and image is blur

Hi Nakul,

Thanks for using Aspose.Cells.

For your issue

  • CELLSNET-43129 - Font is different than excel sheet

We have evaluated this issue further and found it is not an issue of Aspose.Cells. Please compare Aspose.Cells generated pdf (Manual_Book1.xlsx.out.pdf) and the Excel generated pdf (Manual_Book1.pdf, generated by Excel) not the Excel Sheet.

We have some scale in horizontal and vertical direction. So the font size in pdf will not be same with font size in Excel sheet. Excel generated pdf also do that. Please see attached images for your reference.

Hi Nakul,

Thanks for using Aspose.Cells.

For your issue

  • CELLSNET-43130 - Image alignment and image is blur

We have evaluated this issue further and found it is not an issue of Aspose.Cells. Please compare Aspose.Cells generated pdf (Manual_Book1.xlsx.out.pdf) and the Excel generated pdf (Manual_Book1.pdf, generated by Excel) not the Excel Sheet.

We don‘t think it is a problem. the picture alignment is same and the picture in the Excel generated pdf is also somewhat blur.