vcl/source/pdf/XmpMetadata.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 3a20c691ab1d6a16ad0fc144926b22c098552be4
Author:     Sarper Akdemir <sarper.akdemir.ext...@allotropia.de>
AuthorDate: Mon Jan 22 18:24:41 2024 +0300
Commit:     Sarper Akdemir <sarper.akdemir.ext...@allotropia.de>
CommitDate: Tue Jan 23 13:45:27 2024 +0100

    tdf#138792: PDF export: export metadata dc:date
    
    Dublin Core attribute dc:date wasn't exported so far in the
    current implementation. Looking at the information pointed
    by http://purl.org/dc/elements/1.1/date, dc:date is a
    vaguely defined field.
    
    Now creation date is exported there, as I've came across
    the note of "Typically, Date will be associated with the
    creation or availability of the resource" in the resource
    linked below.
    
https://www.dublincore.org/specifications/dublin-core/dcmi-terms/2005-06-13/#:~:text=Typically%2C%20Date%20will%20be%20associated%20with%20the%20creation%20or%20availability%20of%20the%20resource
    
    Change-Id: I0b5f37058f64e3d6d08cb46045a27ccde54ee434
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162404
    Tested-by: Jenkins
    Reviewed-by: Sarper Akdemir <sarper.akdemir.ext...@allotropia.de>

diff --git a/vcl/source/pdf/XmpMetadata.cxx b/vcl/source/pdf/XmpMetadata.cxx
index ddd638551bd5..47d76f187d02 100644
--- a/vcl/source/pdf/XmpMetadata.cxx
+++ b/vcl/source/pdf/XmpMetadata.cxx
@@ -83,6 +83,14 @@ void XmpMetadata::write()
             aXmlWriter.content("application/pdf"_ostr);
             aXmlWriter.endElement();
 
+            aXmlWriter.startElement("dc:date");
+            aXmlWriter.startElement("rdf:Seq");
+            aXmlWriter.startElement("rdf:li");
+            aXmlWriter.content(m_sCreateDate);
+            aXmlWriter.endElement();
+            aXmlWriter.endElement();
+            aXmlWriter.endElement();
+
             if (!msTitle.isEmpty())
             {
                 // this is according to PDF/A-1, technical corrigendum 1 
(2007-04-01)

Reply via email to