Skip to content

Commit

Permalink
feat: allow to set AcroForm
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Ammann committed Jun 2, 2022
1 parent 4c3bcbb commit bad9cc5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions PdfSharpCore/Pdf.Advanced/PdfCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,15 @@ internal PdfOutlineCollection Outlines
/// </summary>
public PdfAcroForm AcroForm
{
get
get { return (PdfAcroForm)Elements.GetValue(Keys.AcroForm); }
set
{
if (_acroForm == null)
_acroForm = (PdfAcroForm)Elements.GetValue(Keys.AcroForm);
return _acroForm;
if (Elements.ContainsKey(Keys.AcroForm))
Elements[Keys.AcroForm] = value;
else
Elements.Add(Keys.AcroForm, value);
}
}
PdfAcroForm _acroForm;

/// <summary>
/// Gets or sets the language identifier specifying the natural language for all text in the document.
Expand Down

0 comments on commit bad9cc5

Please sign in to comment.