PDF generated with aspose doesnot apply FontStyle in Unix server

Hi,

I am working on a code where we are generating pdf document with Aspose and have some texts BOLD, ITALIC and UNDERLINED, which works fine when I generate the document from my local Windows machine. But when I deploy the same to unix Dev box in the generated document the FontStyles are missing. All text are plain, no BOLD, No ITALIC and no underlined.

We are currently using Aspose 16.12.0 version and JDK version is 1.7
here is the code snippet we are using for making FONT BOLD, ITALIC and UNDERLINE.

if(isBold && isItalic){
text.getTextState().setFontStyle(com.aspose.pdf.FontStyles.Bold | com.aspose.pdf.FontStyles.Italic);
} else if(isBold){
text.getTextState().setFontStyle(com.aspose.pdf.FontStyles.Bold);
}else if(isItalic){
text.getTextState().setFontStyle(com.aspose.pdf.FontStyles.Italic);
}

Thanks,
Venkat

@vvangala

Thanks for contacting support.

We have observed the same issue reported over this forum thread, and suggested to try the scenario with latest version of the API i.e Aspose.PDF for Java 17.12. You may please observe the discussion over the referred forum thread and in case you have different concerns to share, please feel free to let us know.