Skip to content

Commit 80cdf02

Browse files
committed
properly add signature field to acroform array
so that PDF readers can properly detect the signature
1 parent 7c055f6 commit 80cdf02

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/foundation/src/PDFsharp/src/PdfSharp/Pdf.AcroForms/PdfAcroField.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ public PdfAcroFieldCollection Fields
267267
/// </summary>
268268
public sealed class PdfAcroFieldCollection : PdfArray
269269
{
270-
PdfAcroFieldCollection(PdfArray array)
270+
internal PdfAcroFieldCollection(PdfArray array)
271271
: base(array)
272272
{ }
273273

src/foundation/src/PDFsharp/src/PdfSharp/Pdf.Signatures/PdfSignatureHandler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// PDFsharp - A .NET library for processing PDF
1+
// PDFsharp - A .NET library for processing PDF
22
// See the LICENSE file in the solution root for more information.
33

44
using PdfSharp.Drawing;
@@ -129,7 +129,7 @@ private void AddSignatureComponents(object sender, EventArgs e)
129129
}
130130

131131
if (catalog.AcroForm.Elements.GetValue(PdfAcroForm.Keys.Fields) == null)
132-
catalog.AcroForm.Elements.SetValue(PdfAcroForm.Keys.Fields, new PdfArray());
132+
catalog.AcroForm.Elements.SetValue(PdfAcroForm.Keys.Fields, new PdfAcroField.PdfAcroFieldCollection(new PdfArray()));
133133
catalog.AcroForm.Fields.Elements.Add(signatureField);
134134
}
135135

0 commit comments

Comments
 (0)