we’ve tried to convert word form fields to pdf form fields.
we use the following code:
using (Stream inputDoc = new MemoryStream(bFile))
{
Aspose.Words.Document docword = new Document(inputDoc);
DocumentBuilder builder = new DocumentBuilder(docword);
builder.PageSetup.Orientation = Orientation.Landscape;
// do some formatting using the builder ...
docword.SaveOptions.PdfExportFormFieldsAsText = false;
MemoryStream docstream = new MemoryStream();
docword.Save(docstream, SaveFormat.AsposePdf);
Aspose.Pdf.Pdf docPdf = new Pdf();
docPdf.BindXML(docstream, null);
docPdf.CompressionLevel = 9;
docPdf.Security = new Security();
// default: all properties are true -> no need to set everything true
// if docPdf.Security == null everything works fine with formfields, but if I want to set my securities,
// formfields are converted to text despite correct settings
// docPdf.Security.IsDefaultAllAllowed = true;
// docPdf.Security.IsAnnotationsModifyingAllowed = true;
// docPdf.Security.IsContentsModifyingAllowed = true;
// docPdf.Security.IsCopyingAllowed = true;
// docPdf.Security.IsDegradedPrintingAllowed = true;
// docPdf.Security.IsDocumentAssemblyingAllowed = true;
// docPdf.Security.IsFormFillingAllowed = true;
// docPdf.Security.IsPrintingAllowed = true;
// docPdf.Security.IsScreenReadersAllowed = true;
docPdf.Save(outDir + "\\" + pdfname);
}
but after the conversion, the form fields are not accessible in the pdf document. this only happens when creating an pdf security object. why is this? without the pdf security the form fields are accessible in the pdf document.
I’ve attached the word document.
Thanks for help.