Free Support Forum - aspose.com

FormEditor.AddSubmitBtn disables save option in PDF Reader

Hi,


I am trying to use the function FormEditor.AddSubmitBtn() to add a button to a PDFwhich will submit form field values to a URL. I have been able to do this successfully, however whenever this function is used the resultant PDF can no longer be saved in the PDF Reader.

My goal is to create a PDF form which can be filled in by the user and then submitted. This means that they will need to be able to fill in the form and save it. And then later submit it using the submit button.

The line of code which causes the problem is:
formEditor.AddSubmitBtn(“Submit”, pdf.PageCount, “Save Form”, url, 500, 400, 550, 425);

Having analysed the output PDF it seems as though the AddSubmitBtn() function also places a password on the PDF which prevents it being modified/saved. I have tried to remove this using PdfFileSecurity.ChangePassword() however given that I don not know the password that has been set on the file, I am unable to alter it.

Can you please advise either:
1) What password is being set, in order that I can remove it
2) How to use the AddSubmitBtn() function without setting a password
3) An alternative way to add a submit button which still allows form field values to be saved through the PDF Reader.

Regards.

P.S. I am using the most up do date version of the software (Aspose.Pdf v7.6)

Hi Kevin,


Thanks for using our products and sorry for the delayed response.

skyboy:
1) What password is being set, in order that I can remove it
Aspose.Pdf for .NET does not add/set any password while adding any control/button to PDF file.
skyboy:
2) How to use the AddSubmitBtn() function without setting a password
As per my understanding, your source PDF file contains extended rights features so that user can open the PDF file in Adobe Reader, update the information and save the document. However when Submit button is added, the extended rights feature gets lost and once cannot save the copy of PDF form using Adobe Reader.
skyboy:
3) An alternative way to add a submit button which still allows form field values to be saved through the PDF Reader.
Can you please try following the instructions specified over following link Preserve Extended Rights feature while working with Forms

In case the problem still persists, can you please share the sample PDF form along with the code snippet that you are using so that we can test the scenario at our end. We are sorry for your inconvenience.