Q: I have this issue when filling a form from C# code - when I do
print - the filled values are not displayed.
The way I fill in the pdf form is:
For(int index = 0; index <annots.Size;index++) {
Annot currentAnnot = objPage.getAnnot(index);
Field field = currentAnnot.GetWidgetField();
field.SetValue("some string");
}
The filled values don`t show not even when I Raster the page using
PDFDraw (http://www.pdftron.com/pdfnet/samplecode.html#PDFDraw). What
am I doing wrong?
-----
A: After you set a form field value you need to refresh the
appearance. For example:
for(int index=0; index <annots.Size;index++) {
Annot currentAnnot = objPage.getAnnot(index);
Field field = currentAnnot.GetWidgetField();
field.SetValue("some string");
}
doc.RefreshFieldAppearances();
… print or save the doc? …