Bug in Aspose: the following Japanese words do not display correctly in Adobe Acrobat when using MarkupAnnotation or TextAnnotation

I can successfully setContents of a MarkupAnnotation or TextAnnotation (in .NET and Java) with the following 2 words. I can even the getContents, but when I open the PDF in Adobe Acrobat the words do not show correctly:

Word 1: 医師
Word 2: 工夫

I even tried setting with the unicode equivalents and that doesn’t work either.

@adecatur

Would you kindly share your sample code snippet and the generated output for our reference? We will test the scenario in our environment and address it accordingly.

public class Main {
    public static void main(String[] args) {

        System.out.println("Hello world!");



        Document document = new Document("/Users/adam.decatur/projects/scripts/testPdf.pdf");
        Page page = document.getPages().get_Item(4);

        com.aspose.pdf.Rectangle muRect = new com.aspose.pdf.Rectangle(
                500.011,
                550.011,
                18.011,
                100.011);

        MarkupAnnotation muAnnot = burnInTextFields(page, muRect);

        page.getAnnotations().add(muAnnot);
        document.save();
        document.close();
    }

    protected static MarkupAnnotation burnInTextFields(Page curPage, com.aspose.pdf.Rectangle markupRectangle) {

        // create our PDF annotation object
        TextAnnotation annotationObject = new TextAnnotation(curPage, markupRectangle);
        //annotationObject.setContents("\u533b\u5e2b");
        annotationObject.setContents("医師");

        return annotationObject;
    }
}

testPdf.pdf (1.2 MB)

@adecatur

We tested using 24.4 and we could see the annotation in the output file:
image.png (38.6 KB)

Can you please make sure that all fonts are properly installed in your system?

The 2nd character is not correct in your .png.

@adecatur

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFJAVA-43935

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.