Hello,
I am using Aspose.words to generate pdf.
I have the following method that adds a header stamp to my documents when we download them:
private TextStamp createHeaderStamp(String headerStamp) {
TextStamp textStamp = new TextStamp(String.format("%s", headerStamp));
textStamp.getTextState().setFontSize(8);
textStamp.getTextState().setFontStyle(FontStyles.Regular);
textStamp.getTextState().setForegroundColor(Color.getGray());
textStamp.setOpacity(0.5);
textStamp.setVerticalAlignment(VerticalAlignment.Top);
textStamp.setHorizontalAlignment(HorizontalAlignment.Left);
textStamp.setLeftMargin(5);
textStamp.setTopMargin(5);
LOGGER.info("Header text stamp {}", textStamp.getValue());
return textStamp;
}
As you can see, we set the color of the text to grey.
I am now facing a strange bug:
When the text contains contains special characters (for example važeća in Croatian), the textStamp is added in color white and seams invisible.
I’ll truly appreciate your review.
Thank you.