PdfSaveOptions.PreserveFormFields
PdfSaveOptions.PreserveFormFields property
Specifies whether to preserve Microsoft Word form fields as form fields in PDF or convert them to text. Default is false
.
public bool PreserveFormFields { get; set; }
Remarks
Microsoft Word form fields include text input, drop down and check box controls.
When set to false
, these fields will be exported as text to PDF. When set to true
, these fields will be exported as PDF form fields.
When exporting form fields to PDF as form fields, some formatting loss might occur because PDF form fields do not support all features of Microsoft Word form fields.
Also, the output size depends on the content size because editable forms in Microsoft Word are inline objects.
Editable forms are prohibited by PDF/A compliance. false
value will be used automatically when saving to PDF/A.
Form fields are not supported when saving to PDF/UA. false
value will be used automatically.
Examples
Shows how to configure exporting form fields to PDF.
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.PreserveFormFields = true;
pdfSaveOptions.RenderChoiceFormFieldBorder = true;
pdfSaveOptions.UseSdtTagAsFormFieldName = true;
Converter.Create()
.From(MyDir + "Simple.docx")
.To(ArtifactsDir + "PdfSaveOptions.PreserveFormFields.pdf", pdfSaveOptions)
.Execute();
See Also
- class PdfSaveOptions
- namespace Wordize.Saving
- assembly Wordize