mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-04-05 20:55:01 +08:00
Possibility to set CreationDate and ModifiedDate in DocumentInformationBuilder
This commit is contained in:
parent
bd4eedfcac
commit
2e0622b652
@ -992,6 +992,16 @@ namespace UglyToad.PdfPig.Writer
|
||||
/// </summary>
|
||||
public string Producer { get; set; } = "PdfPig";
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="DocumentInformation.CreationDate"/>.
|
||||
/// </summary>
|
||||
public string CreationDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="DocumentInformation.ModifiedDate"/>.
|
||||
/// </summary>
|
||||
public string ModifiedDate { get; set; }
|
||||
|
||||
internal Dictionary<NameToken, IToken> ToDictionary()
|
||||
{
|
||||
var result = new Dictionary<NameToken, IToken>();
|
||||
@ -1026,6 +1036,16 @@ namespace UglyToad.PdfPig.Writer
|
||||
result[NameToken.Producer] = new StringToken(Producer);
|
||||
}
|
||||
|
||||
if (CreationDate != null)
|
||||
{
|
||||
result[NameToken.CreationDate] = new StringToken(CreationDate);
|
||||
}
|
||||
|
||||
if (ModifiedDate != null)
|
||||
{
|
||||
result[NameToken.ModDate] = new StringToken(ModifiedDate);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user