Hi there!
I try to write data on PDFForm, and the values of checkboxes that I set to true by program don't display.
Note: It will DISPLAY if there IS NO TextboxField, but it will NOT DISPLAY if there IS a TextBoxField on the page.
How do I force the PDF display (I did check and all the checkboxField.checked = true)
I am using Syncfusion.Pdf.Base version 8.103.0.30.
Thanks!
~~~~~~~~~~~~~~~
I got three PDF forms and the checkbox value only show when I use CheckBoxValues_new5.pdf which does not have any TextBoxField)
private void CreatePdf()
{
PdfLoadedDocument loadedDocument = new PdfLoadedDocument(this._pdfInputPath);
PdfLoadedForm form = loadedDocument.Form;
int count =1;
foreach (object obj in form.Fields)
{
PdfLoadedTextBoxField textField = obj as PdfLoadedTextBoxField;
if (textField != null)
{
textField.Text = textField.Name;
}
else
{
PdfLoadedCheckBoxField checkBoxField = obj as PdfLoadedCheckBoxField;
if (checkBoxField != null)
{
checkBoxField.Checked = true;
}
}
count++;
}
//loadedDocument.Form.Flatten = true;
loadedDocument.Save(this._pdfOutputPath);
loadedDocument.Close(true);
System.Diagnostics.Process.Start(this._pdfOutputPath);
}
CheckBox PDFForm_c3599e8d.rar