Get rid of CID fonts

If I use Aspose.Cells to convert a workbook to a PDF, it does a fine job, but it creates a PDF with CID fonts. For technical reasons imposed by our document processign system, I need to have a PDF without CID fonts. Is there a way for me to use Aspose.PDF to identify the CID fonts and replace them with non-CID fonts?

Hi Jim,


Thanks for your inquiry. You may unembed fonts from PDF file using Aspose.Pdf as following. But please note all fonts in the document will be unembedded and file may be unreadable if appropriate font is not found on machine where file is opened. If issue persist then please share your PDF document then we will look into it and will guide you accordingly.

Document doc = new
Document(“35227.pdf”);<o:p></o:p>

Document.OptimizationOptions opt = new Document.OptimizationOptions();

opt.UnembedFonts = true;

doc.OptimizeResources(opt);

doc.Save("35227-out.pdf");

Please feel free to contact us for any further assistance.


Best Regards,

Hi Jim,


Adding more to Tilal’s comments, you can also replace CID fonts with standard fonts so that no issue appears while viewing the document over system which do not have CID/non-standard fonts.

Thanks. I’ll give this a try.


BTW: I posted this in the Cells forum, but it applies just as much here, so I’m reposting: In general, I’d like to say that I am consistently impressed by the quality and responsiveness of the support from the Aspose team. Regardless of which component I’m using, I get answers quickly in the forum when I have a question. It makes my job much easier, and it allows me to justify continued use of the Aspose components when I can talk about how dependable the product support is. Thanks for that.

Hi Jim,


Thanks for sharing the feedback.

Please continue using our API’s and in the event of any further query, please feel free to contact and we will be more than happy to assist you with all your queries.