Using 3.7beta2 but the same problem exists with 3.6.2
When I enter text into an annotation text box on a PDF the text displays as squares when the edit box goes away.
Annotations populated in other software (ie Acrobat on PC) display correctly.
When I change text in a field that displays correctly it displays as squares in the PDF afterward.
Attached is an example. The first field was filled in using Acrobat on PC. The second field was filled in using SetEditText(). It displays with squares on PC until edited, then it's corrected.
I've added all the fonts listed in the PDF using Global.Init(), fontFileMapping() calls to map them to Arimo without success.
Calling Annotation.SetEditFont(Document.NewFontCID("Arimo", 0)) on the appropriate annotation and document instance crashes with the following exception:
java.lang.UnsatisfiedLinkError: No implementation found for boolean com.radaee.pdf.Page.setAnnotEditFont(long, long, long) (tried Java_com_radaee_pdf_Page_setAnnotEditFont and Java_com_radaee_pdf_Page_setAnnotEditFont__JJJ)
I'm not actually trying to embed any font
Checking the PDF in Acrobat provides the following list of fonts used in the document:
so I added the line to Global.java
and changed nothing else. The code snippet you provided appears at line 643 of my Global.java.
Arimo appears to be included in the build (at least when I do a file existence check it's there)
first of all please check if fontfileMapping returns true.
Are you sure that the full characteristic of SegoeUI are in the truetype font Arimo?
If not, you should follow
to import the SegoeUI font and then setAnnotFont as suggested before.
fontFileMapping does return true.
I think I've discovered the problem, though. My usual test device was unavailable and when I tried the app on another device the problem wasn't there.
I guess the DroidSansFallback font on my test device doesn't contain Latin characters, so when I replaced the line