There are two types of PDF forms – XFA and AcroForms.

An XFA form will always have a corresponding AcroForm.

When getting/setting XFA form fields – Debenu Quick PDF library only changes the XML description of the fields in the PDF.

When setting the AcroForm fields, and appearance stream can be generated for the form fields which will allow them to be rendered or printed.

So Debenu Quick PDF Library can be used to set XFA form fields and if the PDF is opened in Acrobat the new values will be shown.

But to print an XFA form field the only solution is to find the corresponding AcroForm fields and set the value there too.

Here’s some code to help you determine the types of form fields used in the PDF.

if (FormFieldCount() <> 0) and (GetXFAFormFieldCount() <> 0) then
// PDF contains both AcroForm and XFA form fields
else if FormFieldCount() <> 0 then
// PDF contains AcroForm form fields
else if GetXFAFormFieldCount() <> 0 then
// PDF contains XFA form fields

If both FormFieldCount and GetXFAFormFieldCount return values greater than zero then the PDF contains both XFA and AcroForm form fields and you should update both sets of form fields accordingly in order to ensure that the printing of the PDF form is successful.