TextBoxField height affects font size

Hi,

I noticed an issue with font size in textboxes in Aspose.PDF. I’m using version 24.9 with licence.

In my test file (input.pdf) there are 4 fields. All have font size set to Auto. The only difference between them is the height.
I run the following code:

var doc = new Document(@"D:\input.pdf");
foreach (var field in doc.Form.OfType<TextBoxField>())
{
    field.Value = "TestTestTestTestTestTestTestTestTestTestTestTestTest";
}
doc.Save(@"D:\output.pdf");

In the resulting document (output.pdf), for fields with small height, the displayed font size is consistent, both with each other and with expected.pdf. However, for larger height, the font size seems to be proportional to the field height.

When I edit the field value in Acrobat Reader, the displayed font size is the same for all fields.

Could you please advise?
expected.pdf (918.8 KB)

input.pdf (911.8 KB)

output.pdf (911.8 KB)

Please note that when I set those fields to be multiline, the results are even more inconsistent with what I get from Acrobat. Could you please investigate this as well?

@acturisaspose

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-58367

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.