I use Java Aspose.Pdf library to place the text stamp onto the pdf document. I’ve faced with issue using italic font style.
I create the TextStamp and fill respective TextState with font (Courier), font size (190) and font style (Italic) properties.
So, this is the problems I need to solve
TextState.measureString(String str) should calculate the width of the string represented with this text state. But it doesn’t take into account the font properties from the text state. The size of the text stays the same for different fonts.
Not sure whether this is a bug or desired behavior from development team.
I place the word “Preview” with the font size (190), font (Courier), font size (190) and font style (Italic) and it appeared to be cut off. The last letter “w” is cut off, but there’s still free space on the page. If I change this ending “w” to double “v”, means “vv”, it displayed correctly. I guess it happens due to the last one is individual letter representation and “w” is too wide symbol. This problem happens only for Italic font style. And could be solved with smaller font size = 170. But it’s not the solution and not the great workaround.
Could you help me with that, please?