mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-04-05 20:55:01 +08:00
Reverted change of ModifiedDate (from string to DateTimeOffset) since
according to the PDF reference guide this field can contain anything.
This commit is contained in:
parent
9ff095c516
commit
048caedd64
@ -47,7 +47,7 @@
|
||||
/// The date and time the annotation was last modified, can be in any format. Optional.
|
||||
/// </summary>
|
||||
[CanBeNull]
|
||||
public DateTimeOffset ModifiedDate { get; }
|
||||
public string ModifiedDate { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Flags defining the appearance and behaviour of this annotation.
|
||||
@ -79,7 +79,7 @@
|
||||
/// <summary>
|
||||
/// Create a new <see cref="Annotation"/>.
|
||||
/// </summary>
|
||||
public Annotation(DictionaryToken annotationDictionary, AnnotationType type, PdfRectangle rectangle, string content, string name, DateTimeOffset modifiedDate,
|
||||
public Annotation(DictionaryToken annotationDictionary, AnnotationType type, PdfRectangle rectangle, string content, string name, string modifiedDate,
|
||||
AnnotationFlags flags, AnnotationBorder border, IReadOnlyList<QuadPointsQuadrilateral> quadPoints,
|
||||
StreamToken normalAppearanceStream, StreamToken rollOverAppearanceStream, StreamToken downAppearanceStream)
|
||||
{
|
||||
|
@ -44,8 +44,8 @@
|
||||
|
||||
var contents = GetNamedString(NameToken.Contents, annotationDictionary);
|
||||
var name = GetNamedString(NameToken.Nm, annotationDictionary);
|
||||
var modifiedDateAsString = GetNamedString(NameToken.M, annotationDictionary);
|
||||
if (!DateFormatHelper.TryParseDateTimeOffset(modifiedDateAsString, out var modifiedDate)) modifiedDate = default(DateTimeOffset);
|
||||
// As indicated in PDF reference 8.4.1, the modified date can be anything, but is usually a date formatted according to sec. 3.8.3
|
||||
var modifiedDate = GetNamedString(NameToken.M, annotationDictionary);
|
||||
|
||||
var flags = (AnnotationFlags)0;
|
||||
if (annotationDictionary.TryGet(NameToken.F, out var flagsToken) && DirectObjectFinder.TryGet(flagsToken, tokenScanner, out NumericToken flagsNumericToken))
|
||||
|
Loading…
Reference in New Issue
Block a user