Dim caption As String = "Example: RemoveXFAFormFieldsData"
Dim gdpicturePDF As GdPicturePDF = New GdPicturePDF()
If gdpicturePDF.LoadFromFile("forms.pdf", False) = GdPictureStatus.OK Then
Dim hasXFA As Boolean = gdpicturePDF.HasXFAFormFields()
If gdpicturePDF.GetStat() = GdPictureStatus.OK Then
If hasXFA Then
If gdpicturePDF.RemoveXFAFormFieldsData() = GdPictureStatus.OK Then
MessageBox.Show("XFA form fields data has been successfully remove from the document.", caption)
Else
MessageBox.Show("The RemoveXFAFormFieldsData() method has failed with the status: " + gdpicturePDF.GetStat().ToString(), caption)
End If
Else
MessageBox.Show("This PDF document contains NO XFA forms.", caption)
End If
Else
MessageBox.Show("The HasXFAFormFields() method has failed with the status: " + gdpicturePDF.GetStat().ToString(), caption)
End If
Else
MessageBox.Show("The file can't be loaded. Status: " + gdpicturePDF.GetStat().ToString(), caption)
End If
gdpicturePDF.Dispose()
string caption = "Example: RemoveXFAFormFieldsData";
GdPicturePDF gdpicturePDF = new GdPicturePDF();
if (gdpicturePDF.LoadFromFile("forms.pdf", false) == GdPictureStatus.OK)
{
bool hasXFA = gdpicturePDF.HasXFAFormFields();
if (gdpicturePDF.GetStat() == GdPictureStatus.OK)
{
if (hasXFA)
{
if(gdpicturePDF.RemoveXFAFormFieldsData() == == GdPictureStatus.OK)
{
MessageBox.Show("XFA form fields data has been successfully remove from the document.", caption)
}
else
{
MessageBox.Show("The RemoveXFAFormFieldsData() method has failed with the status: " + gdpicturePDF.GetStat().ToString(), caption);
}
}
else
{
MessageBox.Show("This PDF document contains NO XFA forms.", caption);
}
}
else
MessageBox.Show("The HasXFAFormFields() method has failed with the status: " + gdpicturePDF.GetStat().ToString(), caption);
}
else
MessageBox.Show("The file can't be loaded. Status: " + gdpicturePDF.GetStat().ToString(), caption);
gdpicturePDF.Dispose();