-
Notifications
You must be signed in to change notification settings - Fork 313
0.1.12 regression: PdfDocument.TryGetForm doesn't find any forms #1208
Copy link
Copy link
Closed
Description
I found a regression in version 0.1.12. It seems like PdfDocument.TryGetForm never finds any forms (at least with the files that I tested).
Sample input files:
Input visible.pdf
Input invisible.pdf
(Note: I know that the digital signatures of those files are invalid. This is because they are only test signatures. They should be found anyway.)
Sample code:
using var pdf = PdfDocument.Open(InputFile);
if (!pdf.TryGetForm(out AcroForm form))
{
Console.WriteLine("ERROR: No AcroForm found");
return;
}
var signatureFields = form
.Fields
.Where(x => x.FieldType == AcroFieldType.Signature)
.ToArray();
if (signatureFields.Length == 0)
{
Console.WriteLine("ERROR: No Signature field found");
return;
}
foreach (var field in signatureFields)
{
Console.WriteLine("Signature field found: " + field.Information.PartialName);
}Expected output:
Signature field found: Signature1
Actual output:
ERROR: No AcroForm found
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels