Hi Tvk,
sudo apt-get install ttf-mscorefonts-installer
// Set font folder path
String path = “/usr/share/fonts/truetype/msttcorefonts/”;
// Adding a single font directory
// com.aspose.pdf.Document.addLocalFontPath(path);
// seting the user list for standard font directories
java.util.List list = com.aspose.pdf.Document.getLocalFontPaths();
list.add(path);
com.aspose.pdf.Document.setLocalFontPaths(list);
Hi Ahmad,
Hi Tvk,
// Set font folder path<o:p></o:p>
String path = "/usr/share/fonts/truetype/msttcorefonts/";
// Adding a single font directory
// com.aspose.pdf.Document.addLocalFontPath(path);
// setting the user list for standard font directories
java.util.List list = com.aspose.pdf.Document.getLocalFontPaths();
list.add(path);
com.aspose.pdf.Document.setLocalFontPaths(list);
InputStream is = new ByteArrayInputStream(rawData);
com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(is);
ByteArrayOutputStream bout = new ByteArrayOutputStream(rawData.length);
Form pdfForm= new Form();
pdfForm.bindPdf(pdfDocument);
//Form pdfForm = new Form(new ByteArrayInputStream(rawData), bout);
pdfForm.fillField(fieldName, fieldValue);
pdfForm.save(bout);
return bout.toByteArray()
Please feel free to contact us for any further assistance.
Best Regards,
Hi Ahmed,

Hi Tvk,
Hi Ahmed,
Thanks for your inquiry. While testing the scenario with latest version of Aspose.Pdf for Java 9.7.0, we have managed to notice the font size issue and logged an investigation ticket PDFNEWJAVA-34632 in our issue tracking system for further investigation and resolution. We will notify you as soon as it is resolved.
We are sorry for the inconvenience caused.
Best Regards,