Open an encrypted MDX form with LoadEncryptedForm and its key, then export the decrypted template to PDF.

Opening the protected template. The encrypted MDX file is loaded with its key, after which the form can be handled like any other definition.

Decryption and export. The entry point in Loading an Encrypted Form/Program.cs opens the protected file and exports the decrypted form to PDF:
var form = new StiForm();
form.LoadEncryptedForm(@"Data\SoftwareEvaluationSurvey.mdx", "secterKey");

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

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

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

Keeping the key separate. In a production application, the decryption key should come from protected configuration rather than being stored beside the template.

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