Open fedebona opened 5 months ago
If I open a PdfDocument PdfDocument inputPDFDocument = PdfReader.Open(pdfFile, PdfDocumentOpenMode.Import);
I'm not able to check if it has an AcroForm inside.
I should be able to check something like inputPDFDocument.AcroForm != null
inputPDFDocument.AcroForm raises an invalidoperation exception
bool hasForm = (inputPDFDocument.AcroForm != null && inputPDFDocument.AcroForm.Elements.Count > 0); //unwanted Exception raised
Reporting an Issue Here
If I open a PdfDocument PdfDocument inputPDFDocument = PdfReader.Open(pdfFile, PdfDocumentOpenMode.Import);
I'm not able to check if it has an AcroForm inside.
Expected Behavior
I should be able to check something like inputPDFDocument.AcroForm != null
Actual Behavior
inputPDFDocument.AcroForm raises an invalidoperation exception
Steps to Reproduce the Behavior
bool hasForm = (inputPDFDocument.AcroForm != null && inputPDFDocument.AcroForm.Elements.Count > 0); //unwanted Exception raised