PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.com/

Acroform fields not showing with ghostscript
http://forum.pdfsharp.com/viewtopic.php?f=2&t=4335
Page 1 of 1

Author:  tcitrine [ Thu Mar 31, 2022 10:01 pm ]
Post subject:  Acroform fields not showing with ghostscript

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)); }

Author:  tcitrine [ Thu Apr 07, 2022 6:18 am ]
Post subject:  Re: Acroform fields not showing with ghostscript

I changed the PDFSharp dll to "FlatteningPDFSharp" and the program worked without changing any code!

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/