SubmitBtn Url not working in PDF

Hi Team,

I have added an submit button to an existing PDF with an submit url. Then I’m saving the PDF.
The code snippet is in c# and it is as follows.

        FormEditor form = new FormEditor();
        form.BindPdf(HostingEnvironment.MapPath(@"~\Pdf\64-8 Blank.pdf"));

        form.AddSubmitBtn("submitbutton", 2, "Submit","http://localhost:15673/HMRC/SavePdf", 1, 50, 100, 75);           
        form.Save(HostingEnvironment.MapPath(@"~\Pdf\Out.pdf"));

But after opening the saved file when I click the submit button it is showing
“This document is trying to connect to :
file:///C|/app/AG/6’%C2…” (C:/app/AG is the local path of the saved file)

After click on Allow, it is showing “Error opening Url to submit this form”.
Please Note : the submit url is an working MVC controller action.

@shankhadeepde

Thanks for contacting support.

I have tested the scenario in our environment while using Aspose.Pdf for .NET 17.9, with submit URL as http://www.aspose.com and was unable to notice the issue. On clicking the Submit button inside PDF, it asked me to allow connect SubmitURL.png (12.1 KB). After clicking Allow button, it asked me for permission to launch the saved HTML file AttemptToLaunch.png (7.2 KB) and when I clicked Yes, it opened a valid HTML file in the browser.openedURL.png (648.9 KB)

As it seems your environment specific issue, so please try to add your web application on IIS server in your local system and try again. In case if you still face any issue, please share a sample application, which demonstrates the issue. We will test the scenario in our environment and address it accordingly.