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 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.

Используя этот сайт, вы соглашаетесь на использование файлов Cookie для аналитики и персонализированного контента. Файлы Cookie хранят полезную информацию на вашем компьютере, чтобы помочь нам повысить эффективность и удобство использования. Для получения дополнительной информации, пожалуйста, прочтите Конфиденциальность и Использование Cookie.