We have a pdf with a field set to multiline auto font size. When we use a viewer to type into it and the text is only on a single line the font is readable, if we type many lines the font shrinks. See shots below:
image.png (7.2 KB)
image.png (5.6 KB)
But if we write into the TextBoxField with Aspose v21.7.0 and only write a single line (no line breaks etc) the font comes out at the smallest size. See below:
image.png (5.5 KB)
The only way to fix this is to either set the font to a fixed size or disable the multiline - neither of which we wish to do.
How do we get the font to go to the default as per the viewer?
@michelleskothe
Could you kindly share your sample PDF document along with sample code snippet that you are using to fill the field? We will test the scenario in our environment and address it accordingly.
Hi @asad.ali Please see attached pdfs - one is the original template we are using, one is the generated pdf and one is the saved pdf using a pdf reader.
We are only updating the Borrower Legal Name field in our test (this is the one with the problem on auto font with multiline) though there are other similar fields. We are also updating the NAICS field (which has different font settings) for comparison only.
PPP Forgiveness Application 3508S (Revised 7_30_2021) (3)Generated File.pdf (326.3 KB)
PPP Forgiveness Application 3508S (Revised 7.30.2021) (3) Original Template.pdf (318.8 KB)
PPP Forgiveness Application 3508S (Revised 7.30.2021) (3) Saved from Reader.pdf (315.8 KB)
Attached below is the class we are using - this is nothing special as far as we can tell. The value set line in this code for both fields is line 389 in the SetPlaceholderText method. They are both TextBoxField types.
PdfGeneration.zip (5.4 KB)
The entry point for this particular generation in this class is the GenerateFilesInternalAsync method.
Please let me know if you need anything more. If there is a particular code fragment that can be used to do what we need and it can be supplied to me, I can modify our code to handle it.
@michelleskothe
We tried to change the font size while filling the form field but got no success. Therefore, an issue as PDFNET-50812 has been logged in our issue tracking system for further investigation. We will look into its details and let you know as soon as it is resolved. Please be patient and spare us some time.
We are sorry for the inconvenience.
@asad.ali Any update of the issue “PDFNET-50812” ?
@OceanX
Regretfully, the issue has not been yet resolved due to other pending issues in the queue logged prior to it. However, we will surely provide an update in this forum thread as soon as we make some progress towards its resolution. Please be patient and spare us some time.
We are sorry for the inconvenience.