summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSarper Akdemir <sarper.akdemir.extern@allotropia.de>2024-01-22 18:24:41 +0300
committerSarper Akdemir <sarper.akdemir.extern@allotropia.de>2024-01-23 13:45:27 +0100
commit3a20c691ab1d6a16ad0fc144926b22c098552be4 (patch)
treeee0b4be6120c7134521743cedaba62505bb8186c
parent07b26af18d45ad7ecacc30c2c4cb2c23033e9f2d (diff)
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.extern@allotropia.de>
-rw-r--r--vcl/source/pdf/XmpMetadata.cxx8
1 files changed, 8 insertions, 0 deletions
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)