Unable to add text in different fonts other than mentioned in FontStyle

Hi,

I am using latest Aspose PDF Kit jar to test below. Below is the sample code given for FormattedText which is not working. Attached inout and ouput PDF files. My requirement is to add text in "Arial Narrow" font to a PDF, i tried changing the font name and it is same issue.

//create PdfFileMend object to add text
PdfFileMend mender = new PdfFileMend("input.pdf", "output.pdf");

//create FormattedText object with required text
FormattedText ft = new FormattedText(
"Hello World!",
new Color(0, 0, 0),
"Frutiger LT 45 Light",
EncodingType.Identity_H,
true,
10);

//add formatted text to PDF
mender.addText(ft, 1, 400, 500, 450, 650);
mender.close();

HI Madan,

We need to investigate this issue in detail at our end. Please spare us some time and you’ll be updated with the results the earliest possible.

We’re sorry for the inconvenience.
Regards,

Hi Madan,

Please specify the font name using full path of the font file as shown in the code snippet given below:


FormattedText ft = new FormattedText(

“Hello World!”,

new Color(0, 0, 0),

“C:\Windows\fonts\ARIALN.ttf”,

EncodingType.Identity_H,

true,

10);


I hope this resolves your issue. If you still find any problem, please do let us know.
Regards,