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

Free Support Forum - aspose.com

Border thickness and Text alignment seem wrong in PDF


i have an Excel-File that I convert to PDF (or PDF/A) using your products and some code along those lines:

private const string inputFile = @“c:\killme\input.xlsx”;
private const string outputFile = @“c:\killme\output.pdf”;

private static void Main(string[] args)
Program.ConvertToPDf(inputFile, outputFile);

<span style=“font-family: “Courier New”;”> private static void ConvertToPDf(string sourcePath, string targetPath)
Aspose.Cells.License cellsLicense = new Aspose.Cells.License();

Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook(sourcePath);

My cells are using a Font named “Gill Sans MT Light” and the text is aligned to be centered in the cell. Each cell has a thin border.

Now, looking at my output-file i see that:

1. the border is thicker than in the Excel-file
2. the text is no longer centered in the cell. Using different Fonds sometimes leads to less obvious results. MS Reference Sans Serif also works.

I hope you can help us to fix both those issues.

Thank you in advance,


Thanks for your posting and using Aspose.Cells.

We do not see alignment issue in your screenshot as well as in excel generated and aspose.cells generated pdf. I think, you meant, vertical alignment not horizontal alignment. We don’t find any issue in both of alignments.

We also don’t find the border thickness issue. We have opened your excel file and saved it as pdf and found that it is same as Aspose.Cells generated pdf.

I have attached both the MS-Excel generated pdf and Aspose.Cells generated pdf for your reference.


Thanks for your posting and using Aspose.Cells.

We have installed your font attached with this post on our system and regenerated the pdf. We found, there is a slight difference in vertical alignment of the cells but we did not find any border thickness issue.

We have logged the vertical alignment issue as

  • CELLSNET-45235 - Slight Vertical Alignment Difference between Excel and Aspose.Cells Pdfs


Please try our latest version/fix: Aspose.Cells for .NET v17.3.3.

Aspose.Cells for .NET v17.3.3 (.NET 2.0)
Aspose.Cells for .NET v17.3.3 (.NET 4.0)
(Note: please choose any of the fixes for your underlying .NET framework version)

Your issue should be fixed in it.

Let us know your feedback.

Thank you


looks like it’s done the trick.

Thank you!


Thanks for your feedback.

Good to know that your issue is sorted out by the new fix/version. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.

The issues you have found earlier (filed as CELLSNET-45235) have been fixed in Aspose.Cells for .NET 17.4.0.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.