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

Free Support Forum - aspose.com

Textboxfield Inserted in All Pages When only One Is Specified

I am trying to insert a textboxfield on a specific page in a PDF document, for some reason the textboxfield is been inserted in all the pages although I specify the page number where I need the textboxfield inserted.

Here’s a sample of the code I am using to do this.

    int iSignaturePageNumber = 2;
    Page objSignaturePage = objPDFDocument.Pages[iSignaturePageNumber];
    Rectangle newRectangle = new Rectangle(350, 550, 450, 650);
    TextBoxField newTextBoxField = new TextBoxField(objSignaturePage, newRectangle);
    objPDFDocument.Form.Add(newTextBoxField, iSignaturePageNumber);

Attached you’ll find a couple of files (before and after inserting the textboxfield). As you can see it has been inserted to to page number 1 and 2.

Note: This only happens with a few documents.
FileBeforeTextBoxFieldInserted.PDF (28.2 KB)

We are currently using version 18.6.0.0 of ASPOSE.PDF.
FileAfterTextBoxFieldInserted.PDF (28.9 KB)

Thanks for your help!

@david.mainz

Thank you for contacting support.

We have worked with the data shared by you and have been able to reproduce the issue in our environment. A ticket with ID PDFNET-45381 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved.

We are sorry for the inconvenience.

Thank you, Farhan. Have you checked to see if the problem exists in the current version?
Do you think there might be a workaround?

@david.mainz

Please note that we have logged the issue after reproducing it with latest version in our environment. About workaround, we have already tried to set Name and PartialName properties to check if we can avoid this problem but this did not work either. So we are afraid there may not be any workaround currently available. We will be able to update you once the logged ticket is further investigated.