[latex3-commits] [git/LaTeX3-latex3-pdfresources] develop: correct pdfcreationdate and pdfmoddate key with xml (b0d5ada)

Ulrike Fischer fischer at troubleshooting-tex.de
Tue Jan 10 19:57:28 CET 2023


Repository : https://github.com/latex3/pdfresources
On branch  : develop
Link       : https://github.com/latex3/pdfresources/commit/b0d5adab78d971077de05648e35562c7f0009220

>---------------------------------------------------------------

commit b0d5adab78d971077de05648e35562c7f0009220
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Tue Jan 10 19:57:28 2023 +0100

    correct pdfcreationdate and pdfmoddate key with xml


>---------------------------------------------------------------

b0d5adab78d971077de05648e35562c7f0009220
 hyperref-generic.dtx                               |   2 +-
 l3pdfmeta.dtx                                      |   4 +-
 testfiles-pdftex/metadata-dates.pvt                |  15 +++
 .../metadata-dates.tpf                             | 118 ++++++++++-----------
 4 files changed, 75 insertions(+), 64 deletions(-)

diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index f8f939c..20f47e4 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -3940,7 +3940,7 @@
                 \pdfmanagement_add:nnx {Info}{#2}{(##1)}
               }
              \@@_store_metadata:nn {pdf#1}{##1}
-             \AddToDocumentProperties[document]{#1}{#2}
+             \AddToDocumentProperties[document]{#1}{##1}
           }
       }
     \keys_define:nn { hyp / info }
diff --git a/l3pdfmeta.dtx b/l3pdfmeta.dtx
index 2a46d97..278813a 100644
--- a/l3pdfmeta.dtx
+++ b/l3pdfmeta.dtx
@@ -2156,14 +2156,14 @@
 % CreationDate
 %    \begin{macrocode}
     \@@_xmp_date_get:nNN
-      {document/pdfcreationdate}\l_@@_tmpa_tl\l_@@_tmpa_seq
+      {document/creationdate}\l_@@_tmpa_tl\l_@@_tmpa_seq
     \@@_xmp_add_packet_line:nne{xmp}{CreateDate}{\@@_xmp_print_date:N\l_@@_tmpa_seq}
     \pdfmanagement_add:nnx{Info}{CreationDate}{(\l_@@_tmpa_tl)}
 %    \end{macrocode}
 % ModifyDate
 %    \begin{macrocode}
     \@@_xmp_date_get:nNN
-      {document/pdfmoddate}\l_@@_tmpa_tl\l_@@_tmpa_seq
+      {document/moddate}\l_@@_tmpa_tl\l_@@_tmpa_seq
     \@@_xmp_add_packet_line:nne{xmp}{ModifyDate}{\@@_xmp_print_date:N\l_@@_tmpa_seq}
     \pdfmanagement_add:nnx{Info}{ModDate}{(\l_@@_tmpa_tl)}
 %    \end{macrocode}
diff --git a/testfiles-pdftex/metadata-dates.pvt b/testfiles-pdftex/metadata-dates.pvt
new file mode 100644
index 0000000..c957030
--- /dev/null
+++ b/testfiles-pdftex/metadata-dates.pvt
@@ -0,0 +1,15 @@
+\DocumentMetadata{uncompress}
+\input{regression-test}
+\documentclass{article}
+\usepackage{hyperref}
+\hypersetup{
+  pdfcreationdate=D:20200110193920+01'00',
+  pdfmoddate=D:20200110193920+01'00',
+    }
+\begin{document}
+
+\START 
+\GetDocumentProperties{document/creationdate} 
+\GetDocumentProperties{document/modedate} 
+blabla
+\end{document}
diff --git a/testfiles/viewerpreferences.tpf b/testfiles-pdftex/metadata-dates.tpf
similarity index 88%
copy from testfiles/viewerpreferences.tpf
copy to testfiles-pdftex/metadata-dates.tpf
index f257939..843b5ca 100644
--- a/testfiles/viewerpreferences.tpf
+++ b/testfiles-pdftex/metadata-dates.tpf
@@ -1,9 +1,9 @@
-%PDF-1.7
+%PDF-1.5
 %ÐÔÅØ
 6 0 obj
 <<
 /Type /Metadata /Subtype /XML
-/Length 10309     
+/Length 10306     
 >>
 stream
 <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
@@ -178,7 +178,7 @@ stream
     </rdf:Bag>
    </pdfaExtension:schemas>
    <pdf:Producer>pdftex-1.4.24</pdf:Producer>
-   <pdf:PDFVersion>1.7</pdf:PDFVersion>
+   <pdf:PDFVersion>1.5</pdf:PDFVersion>
    <dc:type>
     <rdf:Bag>
      <rdf:li>Text</rdf:li>
@@ -186,7 +186,7 @@ stream
    </dc:type>
    <dc:language>
     <rdf:Bag>
-     <rdf:li>de-DE</rdf:li>
+     <rdf:li>en-US</rdf:li>
     </rdf:Bag>
    </dc:language>
    <dc:date>
@@ -195,12 +195,12 @@ stream
     </rdf:Seq>
    </dc:date>
    <dc:format>application/pdf</dc:format>
-   <dc:source>viewerpreferences.tex</dc:source>
+   <dc:source>metadata-dates.tex</dc:source>
    <xmp:CreatorTool>LaTeX with hyperref</xmp:CreatorTool>
-   <xmp:CreateDate>2001-01-01T20:59:59-00:00</xmp:CreateDate>
-   <xmp:ModifyDate>2001-01-01T20:59:59-00:00</xmp:ModifyDate>
+   <xmp:CreateDate>2020-01-10T19:39:20+01:00</xmp:CreateDate>
+   <xmp:ModifyDate>2020-01-10T19:39:20+01:00</xmp:ModifyDate>
    <xmp:MetadataDate>2001-01-01T20:59:59-00:00</xmp:MetadataDate>
-   <xmpMM:DocumentID>uuid:ad43cec1-3b99-4a78-89d0-d39bf74cd78f</xmpMM:DocumentID>
+   <xmpMM:DocumentID>uuid:66dd2fec-7e27-4093-8093-0b9602ee26ba</xmpMM:DocumentID>
    <xmpMM:InstanceID>uuid:0a57c455-157a-4141-8c19-6237d832fc80</xmpMM:InstanceID>
    <prism:complianceProfile>three</prism:complianceProfile>
    <prism:pageCount>1</prism:pageCount>
@@ -212,12 +212,12 @@ endstream
 endobj
 8 0 obj
 <<
-/Length 95        
+/Length 122       
 >>
 stream
 /opacity1 gs
 BT
-/F24 9.9626 Tf 148.712 707.125 Td [(ab)-28(c)]TJ 154.421 -567.87 Td [(1)]TJ
+/F24 9.9626 Tf 148.712 657.235 Td [(D:20200110193920+01'00')-667(blabla)]TJ 154.421 -567.87 Td [(1)]TJ
 ET
 endstream
 endobj
@@ -226,18 +226,18 @@ endobj
 /Type /Page
 /Contents 8 0 R
 /Resources 7 0 R
-/MediaBox [0 0 595.276 841.89]
+/MediaBox [0 0 612 792]
 /Parent 12 0 R
 >>
 endobj
 9 0 obj
 <<
-/D [5 0 R /XYZ 132.768 754.95 null]
+/D [5 0 R /XYZ 132.768 705.06 null]
 >>
 endobj
 10 0 obj
 <<
-/D [5 0 R /XYZ 133.768 717.088 null]
+/D [5 0 R /XYZ 133.768 667.198 null]
 >>
 endobj
 7 0 obj
@@ -251,24 +251,21 @@ endobj
 << /opacity1 <</ca 1/CA 1>>  >>
 endobj
 13 0 obj
-<< /HideToolbar true /NonFullScreenPageMode /UseNone /NumCopies 4  >>
+[277.8 388.9 388.9 500 777.8 277.8 333.3 277.8 500 500 500 500 500 500 500 500 500 500 500 277.8 277.8 277.8 777.8 472.2 472.2 777.8 750 708.3 722.2 763.9 680.6 652.8 784.7 750 361.1 513.9 777.8 625 916.7 750 777.8 680.6 777.8 736.1 555.6 722.2 750 750 1027.8 750 750 611.1 277.8 500 277.8 500 277.8 277.8 500 555.6 444.4 555.6 444.4 305.6 500 555.6 277.8 305.6 527.8 277.8]
 endobj
 14 0 obj
-[500 500 500 500 500 500 500 500 500 277.8 277.8 277.8 777.8 472.2 472.2 777.8 750 708.3 722.2 763.9 680.6 652.8 784.7 750 361.1 513.9 777.8 625 916.7 750 777.8 680.6 777.8 736.1 555.6 722.2 750 750 1027.8 750 750 611.1 277.8 500 277.8 500 277.8 277.8 500 555.6 444.4]
-endobj
-15 0 obj
 <<
-/Length1 1407
-/Length2 7801
+/Length1 1548
+/Length2 9644
 /Length3 0
-/Length 9208      
+/Length 11192     
 >>
 [BINARY STREAM]
 endobj
-16 0 obj
+15 0 obj
 <<
 /Type /FontDescriptor
-/FontName /EVYFYC+CMR10
+/FontName /PZKKSN+CMR10
 /Flags 4
 /FontBBox [-40 -250 1009 750]
 /Ascent 694
@@ -277,11 +274,11 @@ endobj
 /ItalicAngle 0
 /StemV 69
 /XHeight 431
-/CharSet (/a/b/c/one)
-/FontFile 15 0 R
+/CharSet (/D/a/b/colon/l/nine/one/plus/quoteright/three/two/zero)
+/FontFile 14 0 R
 >>
 endobj
-17 0 obj
+16 0 obj
 <<
 /Length 1724      
 >>
@@ -407,12 +404,12 @@ endobj
 <<
 /Type /Font
 /Subtype /Type1
-/BaseFont /EVYFYC+CMR10
-/FontDescriptor 16 0 R
-/FirstChar 49
-/LastChar 99
-/Widths 14 0 R
-/ToUnicode 17 0 R
+/BaseFont /PZKKSN+CMR10
+/FontDescriptor 15 0 R
+/FirstChar 39
+/LastChar 108
+/Widths 13 0 R
+/ToUnicode 16 0 R
 >>
 endobj
 12 0 obj
@@ -422,60 +419,59 @@ endobj
 /Kids [5 0 R]
 >>
 endobj
-18 0 obj
+17 0 obj
 <<
 /Names [(Doc-Start) 10 0 R (page.1) 9 0 R]
 /Limits [(Doc-Start) (page.1)]
 >>
 endobj
-19 0 obj
+18 0 obj
 <<
-/Dests 18 0 R
+/Dests 17 0 R
 >>
 endobj
-20 0 obj
+19 0 obj
 <<
 /Type /Catalog
 /Pages 12 0 R
-/Names 19 0 R
-/ViewerPreferences 13 0 R/Lang (de-DE)/PageMode /UseOutlines/OpenAction [5 0 R /Fit]/PageLayout /SinglePage/PageLabels <</Nums[0<</S/D>>]>>/Metadata 6 0 R
+/Names 18 0 R
+/Lang (en-US)/PageMode /UseOutlines/OpenAction [5 0 R /Fit]/PageLabels <</Nums[0<</S/D>>]>>/Metadata 6 0 R
 >>
 endobj
-21 0 obj
+20 0 obj
 <<
-/Producer (pdfTeX)/Creator <FEFF004C006100540065005800200077006900740068002000680079007000650072007200650066>/CreationDate (D:20010101205959-00'00')/ModDate (D:20010101205959-00'00')
+/Producer (pdfTeX)/Creator <FEFF004C006100540065005800200077006900740068002000680079007000650072007200650066>/CreationDate (D:20200110193920+01'00')/ModDate (D:20200110193920+01'00')
 /Trapped /False
 >>
 endobj
 xref
-0 22
+0 21
 0000000002 65535 f 
-0000010880 00000 n 
+0000010897 00000 n 
 0000000003 00000 f 
 0000000004 00000 f 
 0000000000 00000 f 
-0000010565 00000 n 
+0000010589 00000 n 
 0000000015 00000 n 
-0000010793 00000 n 
-0000010412 00000 n 
-0000010677 00000 n 
-0000010734 00000 n 
-0000022612 00000 n 
-0000022769 00000 n 
-0000010927 00000 n 
-0000011013 00000 n 
-0000011298 00000 n 
-0000020604 00000 n 
-0000020829 00000 n 
-0000022827 00000 n 
-0000022923 00000 n 
-0000022959 00000 n 
-0000023179 00000 n 
+0000010810 00000 n 
+0000010409 00000 n 
+0000010694 00000 n 
+0000010751 00000 n 
+0000024677 00000 n 
+0000024835 00000 n 
+0000010944 00000 n 
+0000011335 00000 n 
+0000022625 00000 n 
+0000022894 00000 n 
+0000024893 00000 n 
+0000024989 00000 n 
+0000025025 00000 n 
+0000025197 00000 n 
 trailer
-<< /Size 22
-/Root 20 0 R
-/Info 21 0 R
+<< /Size 21
+/Root 19 0 R
+/Info 20 0 R
 /ID [<9BD18DF3359C1216B83ADB4AA401CC9A> <9BD18DF3359C1216B83ADB4AA401CC9A>] >>
 startxref
-23400
+25418
 %%EOF





More information about the latex3-commits mailing list.