Viewing Forms and Parsing Submission Results
Our sample projects and report templates can help you learn the basics of working with our products.Display a published form in Angular and parse its submitted field values in ASP.NET Core.
From the browser to the controller. The Angular viewer posts the completed document to ASP.NET Core. The controller reads the request body before handing it to the PDF parser.
Reading the submitted fields. The request handler in
Available values. The parsed collection contains regular fields as well as choice, date, and table data, so the application can validate or store each value in its native shape.
From the browser to the controller. The Angular viewer posts the completed document to ASP.NET Core. The controller reads the request body before handing it to the PDF parser.
Reading the submitted fields. The request handler in
Viewing Forms and Parsing Submission Results/Controllers/FormsController.cs converts the uploaded PDF into form values:[HttpPost]
public IActionResult Action()
{
try
{
var data = JObject.Parse(this.HttpContext.Request.Form["data"]);
var action = data["action"].ToString();
switch (action)
{
case "Initialize":
var initData = StiWebForm.Initialize(data, Initialize(data));
return Json(initData.Content);
default:
var result = StiWebForm.ProcessRequest(data);
return result.ContentType switch
{
"application/pdf" => new FileContentResult(result.Content as byte[], result.ContentType),
_ => Json(result.Content),
};
}
}
catch (Exception e)
{
return new ContentResult { Content = e.Message, ContentType = "text/plain" };
}
}Available values. The parsed collection contains regular fields as well as choice, date, and table data, so the application can validate or store each value in its native shape.