backandwhite-nda-merge (3).pdf (226.4 KB)
hi,
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.
image.png (34.3 KB)
Replacing the font to Times New Roman fixed the issue, my guess is this is font specific.
NDA-Non-Disclosure-Agreement.pdf (98.1 KB)
Steps tried to remedy this
- installing a list of supplied fonts for Ubuntu/Debian https://unix.stackexchange.com/questions/215848/how-to-install-many-fonts-at-once-on-linux/215853
- storing the textFragment font/size before replacement, and setting the style afterwards
textFragment.getTextState().setUnderline(flagUnderline);
textFragment.getTextState().setFontSize(fontSize);
if( backgroundColor != null ){
textFragment.getTextState().setBackgroundColor(backgroundColor);
}
if( font != null ){
textFragment.getTextState().setFont(font);
}
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?
Thanks and best wishes,
Ben