Free Support Forum - aspose.com

Possible Font embedding issue?

Hello,


I am using Aspose.Cells 7.2.2.0 (which we have purchased a full license to) to create a PDF file from an Excel template. The files include a lot of large pictures (maps) and thus the filesize is much larger than desired (around 18MB). I tried using Aspose to bring that down some but could only manage to get it to around 12-13MB. The client requires the filesize to be reduced to around 2MB. Because of this, I researched using another third-party library to compress the PDF. When doing this, the compression was at the desired level but I noticed something strange. At times certain characters were displayed as a hollow square. My first thought was to blame the compression library. To rule this out I generated a PDF directly from Excel 2010. I then ran that PDF through the third-party library and everything displayed correctly. This leads me to believe that something Aspose is doing when generating the PDF is preventing the next step from working correctly. Are there any options that I’m missing that I could be utilizing to embed fonts properly?

Thank you in advance.

Hi,

Thanks for using Aspose.Cells for .NET.

It seems your issue occurs because fonts are not embedded by Aspose.Cells. Rather fonts are linked and actually found on user machines.

It seems, Ms-Excel embeds the fonts in the pdf, when fonts are embedded inside the pdf, then these fonts does not need to be installed on user machine.

We have already added a New Feature Request for embedding fonts inside the PDF in our database with the issue id: CELLSNET-41131

However, this feature is not coming soon and could take much time (probably several weeks or months).

As a workaround, I would suggest you to reduce your image size and resolution, you might search on internet how to do this and then embed them in pdf so that you don’t need to use compression library.

Also, there is a huge size difference between BMP and JPG images. If you convert all of your images to JPG format, it could decrease your file size.

Hi again,


First of all, please accept our aplogies for the delayed response.

Please note, the recent revisions of Aspose.Cells APIs embed the font in the PDF by default. You do not need to set any particular properties to achieve this goal. Please download the latest version of Aspose.Cells for .NET 16.12.0, and give it a try on your end.