Hi,
Using the aspose-cells and aspose version 22.12, and aspose-pdf 22.9, there seems to be bold issue for some text.
bold.pdf (171.8 KB)
I am using the below code.
def dataDir = "/Users/anil.maharjan/Documents/full_template/"
Document doc = new Document(dataDir + "bold.pdf");
TextFragmentAbsorber textFragmentAbsorber = new TextFragmentAbsorber();
doc.getPages().accept(textFragmentAbsorber);
Font arial_unicode_ms = FontRepository.findFont("Arial");
for (TextFragment textFragment : textFragmentAbsorber.getTextFragments())
{
TextFragmentState textState = textFragment.getTextState();
if ("Arial-BoldMT".equals(textState.getFont().getFontName()))
{
textState.setFont(arial_unicode_ms);
textState.setFontStyle(FontStyles.Bold);
}
}
DocSaveOptions saveOption = new DocSaveOptions();
saveOption.setFormat(DocSaveOptions.DocFormat.DocX);
doc.save(dataDir + "1.docx", saveOption);