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

Free Support Forum - aspose.com

setFontName crash

Hi support,

Please note that the method setFontName() throws :
java.lang.NoClassDefFoundError: com.aspose.pdf.elements.BasicImage
at com.aspose.pdf.elements.dh.class$(Unknown Source)
at com.aspose.pdf.elements.dh.a(Unknown Source)
at com.aspose.pdf.elements.dh.if(Unknown Source)
at com.aspose.pdf.elements.ft.u(Unknown Source)
at com.aspose.pdf.elements.ft.a(Unknown Source)
at com.aspose.pdf.elements.dh.a(Unknown Source)
at com.aspose.pdf.elements.dh.a(Unknown Source)
at com.aspose.pdf.elements.bv.a(Unknown Source)
at com.aspose.pdf.elements.bv.a(Unknown Source)
at com.aspose.pdf.elements.Segment.u(Unknown Source)
at com.aspose.pdf.elements.Text.a(Unknown Source)
at com.aspose.pdf.elements.Section.a(Unknown Source)
at com.aspose.pdf.elements.Pdf.if(Unknown Source)
at com.aspose.pdf.elements.Pdf.a(Unknown Source)
at com.aspose.pdf.elements.Pdf.save(Unknown Source)

I’ve used this code:

Pdf pdf = new Pdf();
Section sec1 = pdf.getSections().add();

Text text1 = new Text(sec1,“Para1”);

pdf.save(new FileOutputStream(new File(“C:/Temp/FontCrash.pdf”)));

This occurs with the jar provided here Pdf not saved when handling hyperlinks

Please take a look,

Hello Milan,

I've tested the scenario and I'm able to notice that setFontName(...) is not working when using Aspose.Pdf for Java For the sake of correction, I've logged it in our issue tracking system as PDFJAVA-10936. We'll look into this matter and will update you with the status of correction.

We apologize for your inconvenience.


Can you please make an estimation about the time of this fix ?

Thank you,

Hello Milan,

The issue has been resolved in the hotfix shared in this post. Please try using it and in case you face any problem, please feel free to contact.