Reconstruct a form from its serialized string, export it to PDF, and open the generated document.

Restoring the definition. A serialized MRT definition can come from a database, an API, or another application layer without first being written to disk.

Using the serialized value. The console code in Loading a Form from String/Program.cs passes the string to StiForm and continues with an ordinary PDF export:
// formStr holds the serialized MRT definition (from a database, an API, or another layer)
var form = new StiForm();
form.LoadFromString(formStr);

var exporter = new StiPdfExporter();
var pdf = exporter.ExportForm(form);

string path = "form.pdf";
File.WriteAllBytes(path, pdf);

Process.Start(new ProcessStartInfo(path) { UseShellExecute = true });

By using this website, you agree to the use of cookies for analytics and personalized content. Cookies store useful information on your computer to help us improve efficiency and usability. For more information, please read the privacy policy and cookie policy.