Aspose.Pdf.Facades.Form page overflow

I’m using a Aspose.Pdf.Facades.Form to fill fields using the FillFields method on a binded PDF file (BindPdf method). But I cannot find any way to know if page has overflow, if the text is too long. How is that done with this kind of object?

@baddaydaddy

There is no method in the API to determine if the provided text is too long to fit within the page boundaries. However, we will investigate its feasibility. Can you please share your sample PDF and sample code snippet for our reference?

Here is some example-code. It’s part of a bigger system, but hopefully I’ve got the important part:

        var pdfForm = new Aspose.Pdf.Facades.Form();
        pdfForm.BindPdf(GetInputFilePath(formId));

        SetupPrinterText(pdfForm);
        SetupLogo(pdfForm, formId);
        SetFont(pdfForm);

        MarriageRitual ritual = MarriageRitual.Get(ritualId.Value);
        
        pdfForm.FillField("KICustomMarriageText", ritural.Text.Replace("\t", string.Empty));

        return pdfForm;

Here is the PDF I’m binding to in the first lines of code: pro019.pdf (24.7 KB)

@baddaydaddy

We have tested the scenario and could not understand the issue clearly. While filling the text box i.e. KICustomMarriageText with the longest string value, we could not notice the page overflow. The complete value was filled within the boundary of text box and no new page was added in the PDF. Please check the attached output. Can you please share the sample problematic output and screenshot of the issue for our reference? filled.pdf (32.6 KB)

I’ve provided example of the actual text and the mapped pdf (couldn’t upload txt file, so both are in zip).

TextAndPdf.zip (193.5 KB)

@baddaydaddy

It looks like you are using quite old version of the API. Please check the attached file generated using 22.4 version and you can notice that complete value is filled in the text box which can be seen by scrolling down. filled.pdf (40.7 KB)