Hi people, I have used PDFSharp to populate form fields from and xml datasource. I then flattened the pdf.
The pdf look fine when viewed in Adobe but when printed using ghostscript the acrofields don't display values.
Any IDeas?
foreach (var pdfField in form.Fields) { string MetaValue; string CurrentField = form.Fields[i].Name.ToString(); if (metadata.TryGetValue(CurrentField, out MetaValue)) {
form.Fields[i].Value = new PdfString(MetaValue);
} i++; } if (form.Elements.ContainsKey("/NeedAppearances")) { form.Elements["/NeedAppearances"] = new PdfBoolean(true); } else { form.Elements.Add("/NeedAppearances", new PdfBoolean(true)); }
|