Skip to content

Commit

Permalink
Merge pull request #248 from pamapa/allow-to-set-acroform
Browse files Browse the repository at this point in the history
allow to set AcroForm
  • Loading branch information
ststeiger authored Jun 2, 2022
2 parents 4c3bcbb + 85ee89f commit 24d4b28
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 24d4b28

Please sign in to comment.