We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com


I am using PDF.Kit to merge data from a webform into a simple PDF. One (text) field can vary in length (its a business name field) and I wanted to be able to accommodate for differing values.

If I set the fitFont value to true - it does seem to adjust the font - but the text is cut off on the left side.

The code being used:

form.FillField(“business_name”, txtBN.Text, True)

The PDF template is attached.

Is there any way to safely adjust for different string lengths?


Hi Bill,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the template file.

To update you, Aspose.Pdf.Kit for .NET has been merged into Aspose.Pdf for .NET and Aspose.Pdf.Kit has been discontinued. All the features of Aspose.Pdf.Kit for .NET can be found under Aspose.Pdf.Facades namespace in the merged component.

Please download and try the latest version of Aspose.Pdf for .NET and see if it works fine for you.

You may also check the following links for details regarding migrating from old versions to Aspose.Pdf for .NET v6.x.



Please try the latest version and in case you still face any issue, please feel free to contact support.

Thank You & Best Regards,

Hello Bill,

Thanks for using our products. Adding more to Nausherwan’s comments, I have tested the scenario where I have tried filling the Business Name field with large text string and as per my observations, the font size is automatically being adjusted and I am unable to see the text being truncated from left. Please take a look over the attached resultant PDF document that I have generated using Aspose.Pdf for .NET 6.5.0. I have used the following code snippet to test the scenario. We are really sorry for this inconvenience.

//open document
Aspose.Pdf.Facades.Form pdfForm = new Aspose.Pdf.Facades.Form(“d:/pdftest/BusinessCard_Form_1AA.pdf”, “d:/pdftest/BusinessCard_Form_1AA-output.pdf”);
//Fill the field “Name” with “Mike”.
pdfForm.FillField(“business_name”, “Large Value in Text Field to check the FitFont behavior and currently the text string is vary large and I don’t see any text being truncated from left”,true);
//save updated PDF

I have confirmed this works great w/ Aspose.PDF.

Now - one last issue - I’m using FillImageField to place an image on a button field. It works - but the image is stretched to fit. How does one constrain proportions on an image? Or do I need to use an alternate method for adding an image (I looked everywhere and seem to see conflicting documentation on this.)