ISO 19005-1:2005, 6.7.3
If a document information dictionary does appear at a document, then all of its entries that have analogous properties in predefined XMP schemas, shall also be embedded in the file in XMP form with equivalent values.
Running the document through one of the many online converter tools and looking at the differences, one outstanding difference is the format of the CreateDate and ModifyDate entries in the XMP metadata.
So instead of using the format string "o" the following should be used: "yyyy-MM-ddTHH:mm:ssK"
But this doesn't work, if the provided DateTime object doesn't specify a DateTimeKind. So setting DateTimeKind.Local if DateTimeKind.Unspecified resolves this problem (it doesn't really matter if it's Local or Utc, because none knows the original kind - but when creating the document from scratch with the test it matches local time).
I will provide a PR with this minimal changes, after that the validator doesn't complain anymore.
I'm looking into getting PDFsharp generate PDF/A compliant documents (my goal is PDF/A-3, but since PDF/A-1A is already included I start there).
I ran
PdfATests.Simple_PDF_A_document
and uploaded the file here: https://www.pdfforge.org/online/en/validate-pdfaResult:
Running the document through one of the many online converter tools and looking at the differences, one outstanding difference is the format of the
CreateDate
andModifyDate
entries in the XMP metadata.Wrong:
Right:
So instead of using the format string
"o"
the following should be used:"yyyy-MM-ddTHH:mm:ssK"
But this doesn't work, if the provided
DateTime
object doesn't specify aDateTimeKind
. So settingDateTimeKind.Local
ifDateTimeKind.Unspecified
resolves this problem (it doesn't really matter if it'sLocal
orUtc
, because none knows the original kind - but when creating the document from scratch with the test it matches local time).I will provide a PR with this minimal changes, after that the validator doesn't complain anymore.