Replacing text within a document is mutating the text to an incorrect font. Please see the first paragraph, “50 Sterndale Drive”.
The text seems to change size/font automatically. This behavior is replicable when changing starting the replacement text with a numeric instead of a character. See the send image below, where the 2nd field is begins with a character instead, no impact is found.
There are other tickets similar to this correct? Is this an expected issue for various fonts, if so, would there be a list that could be provided for end users, that are stable?
As for your previously logged ticket “PDFJAVA-39910”, the issue was related to specific font and was investigated accordingly. We already had shared our findings and solution with you in respective forum thread.
For your recently shared scenario, we have logged an investigation ticket as PDFJAVA-40053 in our issue tracking system in order to analyze it further and check if we can come up with some specifications of the fonts. Meanwhile, could you please provide the complete sample code snippet that you are using at your side for text replacement. It would help us investigating the scenario accordingly.
Regretfully, the ticket is not yet resolved as its investigation is not yet completed. As soon as we complete the analysis, we will be able to share some updates with you.
Additionally, please note that we recommend installing all Microsoft Essential Fonts in the system like Arial, Times New Roman, etc. as they are basic fonts and they support a large set of characters. Yes, you can also use any custom font while processing the PDF document but that font should be present in the system in order to get properly consumed by the API.
Along with the above, some custom fonts require a valid license in order to consume them. So, they should also be installed and their usage should also be licensed. We hope that shared information would be helpful for you to integrate font related functionality in your application using the Aspose.PDF.
We have different sets of environments which we use for development and testing purposes. We are afraid that we would not be able to share any image or installation details about them. However, we are looking into your request and will surely try to share some information that would help you creating an environment in order to prevent font related issues.
We have created a docker container that you can use for testing. Command to run docker with Ubuntu + jdk1.8+ pre-installed Microsoft TrueType Fonts pack.
docker run -t -i --rm cerrbeer/ubuntu-java:latest bash