We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to format PdfSubmitAction URL

Hi folks,

The web documentation for the PDF control has the following example on how to create a Submit button:

Dim document As New PdfDocument()
'Add a new page
Dim page As PdfPage = document.Pages.Add()
' Create a Button field.
Dim submitButton As New PdfButtonField(page, "Submit data")
submitButton.Bounds = New RectangleF(100, 60, 50, 20)
submitButton.ToolTip = "Submit"
' Create a submit action. It submit the data of the form fields to the mentioned URL
Dim submitAction As New PdfSubmitAction("http:// www.example.com/Submit.aspx")
submitAction.DataFormat = SubmitDataFormat.Html
submitButton.Actions.GotFocus = submitAction
'Save and close the PDF document

My problem is that, naturally, you need a username and password to write to a URL.  So, how can we specify the appropriate login info?


7 Replies

SK Sasi Kumar Sekar Syncfusion Team February 14, 2017 01:50 PM UTC

Hi Michel, 
Thank you for contacting Syncfusion support, 
Currently, we do not have support to specify login information in the PdfFormSubmitAction. 
Please find the created simple sample with the some PdfFormActions. 
Please let us know if you need further assistance. 
Sasi Kumar S. 

WI WindChaser February 14, 2017 02:20 PM UTC

Thanks for your reply Sasi.

Even in the attached sample that you provided, the following code appears:

PdfSubmitAction submitAction = new PdfSubmitAction("http://stevex.net/dump.php");

submitAction.DataFormat = SubmitDataFormat.Html;

The problem is no http site is without login credentials.  Otherwise, anyone could submit to http://google.com for instance and dump stuff on their site.  Surely there must be a workaround otherwise I can't understand in what type of circumstance the PDFSubmitAction action might be useful.


SK Sasi Kumar Sekar Syncfusion Team February 15, 2017 11:17 AM UTC

Hi Michel, 
Thank you for your update, 
At present, we do support only submit/post action with the URL and it is not possible to perform Form/Windows authentication (login credentials) with PDF submit action.  
We will be consider this as a feature request, and will implement in one of our upcoming releases. We request you to visit our website periodically for feature updates.  
Sasi Kumar S. 

WI WindChaser February 15, 2017 01:28 PM UTC

Thanks for your reply Sasi,

Very well.  But, for my own understanding, can you explain what the PDFSubmitAction was designed to do and how it is meant to be used, keeping in mind that all web site URL uploads require credentials?  If I can get a better sense of what the function can do, as opposed to what it cannot do, I would help me.  Thanks!


SK Sasi Kumar Sekar Syncfusion Team February 16, 2017 12:12 PM UTC

Hi Michel, 
Thank you for your update, 
A Submit-form action transmits the interacting form fields to a specified Uniform Resource Locator(URL), presumably the address of the Web server that will process then and send back a response. 
As per the Adobe standard (IS0 32000) specification, did not have support to login credentials in Submit-form action in the PDF file format itself. 
Sasi Kumar S. 

WI WindChaser February 16, 2017 01:15 PM UTC

Hi Sasi,

- Can you provide any code sample which has been tested to be functional with the library as it is today i.e. is the library currently functional to send to a HTTP URL? 
- Would using a HTTPS URL be helpful?

SK Sasi Kumar Sekar Syncfusion Team February 17, 2017 02:35 PM UTC

Hi Michel, 
We have created the sample to submit the form field to the server. 
As per the Submit-form Action transmit the form field input data values to specified URL and the server process the input data and send back response in the HTML format. 
PdfSubmitAction submitAction = new PdfSubmitAction("http://localhost:51912/Submit.aspx"); 
submitAction.DataFormat = SubmitDataFormat.Html; 
submitButton.Actions.GotFocus = submitAction; 
Please change the URL as per your local host to check the sample successfully and make sure to available the URL when submitting the form fields. 
The sample project is attached for your reference. 
Currently we do not support to HTTPS URL. 
Please let us know if you need further assistance. 
With Regards, 
Sasi Kumar S. 

Live Chat Icon For mobile
Up arrow icon