Create and configure a PDF form in code, then pass it to the web component for display or editing.

Creating the form in memory. A form does not have to start as an MRT file. The API can create the page, place elements on it, and set their content entirely in application code.

The form builder. The controller method in Working with Forms from Code/Controllers/HomeController.cs assembles the definition that is passed to the web component:
public IActionResult Export()
        {
            var exporter = new StiPdfExporter();

            var pdfFileBytes = exporter.ExportForm(HomeController.Form);
            var pdfFileName = $"Forms\\Form_{DateTime.Now.ToString("yyyy-MM-dd_HH.mm.ss")}.pdf";
            System.IO.File.WriteAllBytes(pdfFileName, pdfFileBytes);

            ViewBag.FormMessage = $"The Form has been saved to a file '{pdfFileName}'";

            return View("Index");
        }
    }
}

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