How do I read and post the Actobat form data to a database?
We can read and send the Actobat form data to a database with the help of the PdfSubmitAction class. We can post data back to the database by creating the form''s submit action.
Then clicking on the submit button in the pdf document will submit the form contents to the server. Then we can read this request from the server and store the form-field data on to the database.
C#
//through which the PDF form should post data to the server.
PdfSubmitAction action = new PdfSubmitAction("http://websamples.syncfusion.com/samples/pdf.web/T285/PDFdemo/RequestForms.aspx");
action.DataFormat = SubmitDataFormat.Html;
//Reading Values
string username = Request.Form["username"];
string password = Request.Form["password"];
// Store the values in DataBase
OleDbConnection connection = new OleDbConnection(ConnString);
connection.Open();
// The insertSQL string contains a SQL statement that inserts a new row in the source table.
OleDbCommand command = new OleDbCommand(INSERT);
// Set the Connection to the new OleDbConnection.
command.Connection = connection;
command.ExecuteNonQuery();
VB
'through which the PDF form should post data to the server.
Dim action As PdfSubmitAction = New PdfSubmitAction("http://websamples.syncfusion.com/samples/pdf.web/T285/PDFdemo/RequestForms.aspx")action.DataFormat = SubmitDataFormat.Html
' Reading Values
Dim username As String = Request.Form("username")
Dim password As String = Request.Form("password")
' Store the values in DataBase
Dim connection As OleDbConnection = New OleDbConnection(ConnString)
connection.Open()
' The insertSQL string contains a SQL statement that
' inserts a new row in the source table.
Dim command As OleDbCommand = New OleDbCommand(INSERT)
' Set the Connection to the new OleDbConnection.
command.Connection = connection
command.ExecuteNonQuery()
Please do find the sample from the below specified location which demonstrates the above feature,
https://websamples.syncfusion.com/samples/pdf.web/T285/PDFdemo/main.html.
Conclusion:
I hope you enjoyed learning about how do I read and post the Actobat form data to a database.
You can refer to our Flutter PDF feature tour page to learn about its other groundbreaking features and documentation, and how to quickly get started with configuration specifications. You can also explore our Flutter PDF Flutter PDF examples to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to explore our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums or feedback portal. We are always happy to assist you!