[latex3-commits] [git/LaTeX3-latex3-hyperref] main: enable pdf version setting in xetex/dvipdfmx, test 2.0 (d85a7ee)

Ulrike Fischer fischer at troubleshooting-tex.de
Tue Feb 9 21:08:33 CET 2021


Repository : https://github.com/latex3/hyperref
On branch  : main
Link       : https://github.com/latex3/hyperref/commit/d85a7eead7616f2166498111f694777a8a72dafa

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

commit d85a7eead7616f2166498111f694777a8a72dafa
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Tue Feb 9 21:08:33 2021 +0100

    enable pdf version setting in xetex/dvipdfmx, test 2.0


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

d85a7eead7616f2166498111f694777a8a72dafa
 ChangeLog.txt                                      |   2 +
 hyperref.dtx                                       |   8 +-
 testfiles-pvt/87-pdfversion.luatex.tpf             | 122 ++++++++++++++++++
 testfiles-pvt/{latex2e.pvt => 87-pdfversion.pvt}   |   5 +-
 testfiles-pvt/87-pdfversion.tpf                    | 138 +++++++++++++++++++++
 .../87-pdfversion.pvt                              |   5 +-
 testfiles-xetex/87-pdfversion.tpf                  | 108 ++++++++++++++++
 7 files changed, 381 insertions(+), 7 deletions(-)

diff --git a/ChangeLog.txt b/ChangeLog.txt
index 7f70b4f..4db10d9 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -10,6 +10,8 @@
     package options.
     * added a \lastnodetype test to distinguish explict 0pt vskip from no skip
     in \Hy at SaveLastskip issue 167
+    * enable setting the pdfversion with the xetex/dvipdfm driver,
+    (related: issue 87)
 
 
 2021-02-08 Ulrike Fischer/David Carlisle
diff --git a/hyperref.dtx b/hyperref.dtx
index 4d48e1c..d93dcb8 100644
--- a/hyperref.dtx
+++ b/hyperref.dtx
@@ -10246,7 +10246,13 @@
   \endgroup}
 %</xetex>
 %    \end{macrocode}
-%
+% set the pdf version
+%    \begin{macrocode}
+%<*dvipdfm|xetex>
+\special{pdf:majorversion \Hy at pdf@majorversion}
+\special{pdf:minorversion \Hy at pdf@minorversion}
+%</dvipdfm|xetex>
+%    \end{macrocode}
 % \subsubsection{pdfmarkbase, dvipdfm, xetex}
 %
 %    \begin{macrocode}
diff --git a/testfiles-pvt/87-pdfversion.luatex.tpf b/testfiles-pvt/87-pdfversion.luatex.tpf
new file mode 100644
index 0000000..7c7c3bc
--- /dev/null
+++ b/testfiles-pvt/87-pdfversion.luatex.tpf
@@ -0,0 +1,122 @@
+%PDF-2.0
+%ÌÕÁÔÅØÐÄÆ
+1 0 obj
+<< /S /GoTo /D [ 2 0 R /Fit ] >>
+endobj
+4 0 obj
+<< /Length 109 >>        
+stream
+BT
+/F23 9.96264 Tf
+1 0 0 1 148.712 657.235 Tm [<00230048006D0023>]TJ
+1 0 0 1 303.133 89.365 Tm [<0052>]TJ
+ET
+endstream
+endobj
+2 0 obj
+<< /Type /Page /Contents 4 0 R /Resources 3 0 R /MediaBox [ 0 0 612 792 ] /Parent 8 0 R >>
+endobj
+5 0 obj
+<< /D [ 2 0 R /XYZ 132.768 705.06 null ] >>
+endobj
+6 0 obj
+<< /D [ 2 0 R /XYZ 133.768 667.198 null ] >>
+endobj
+3 0 obj
+<< /Font << /F23 7 0 R >> >>
+endobj
+9 0 obj
+[ 35 [ 556 ] 72 [ 278 ] 82 [ 500 ] 109 [ 556 ] ]
+endobj
+11 0 obj
+<< /Subtype /CIDFontType0C /Length 873 >>        
+[BINARY STREAM]
+endobj
+10 0 obj
+<< /Type /FontDescriptor /FontName /LREOIX+LMRoman10-Regular /Flags 4 /FontBBox [ -430 -290 1417 1127 ] /Ascent 1127 /CapHeight 683 /Descent -290 /ItalicAngle 0 /StemV 93 /XHeight 431 /FontFile3 11 0 R >>
+endobj
+12 0 obj
+<< /Length 734 >>        
+stream
+%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-LREOIX-LMRoman10-Regular-0)
+%%Title: (TeX-LREOIX-LMRoman10-Regular-0 TeX LREOIX-LMRoman10-Regular 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (LREOIX-LMRoman10-Regular)
+/Supplement 0
+>> def
+/CMapName /TeX-Identity-LREOIX-LMRoman10-Regular def
+/CMapType 2 def
+1 begincodespacerange
+<0000> <FFFF>
+endcodespacerange
+0 beginbfrange
+endbfrange
+4 beginbfchar
+<0023> <0062>
+<0048> <006C>
+<0052> <0031>
+<006D> <0075>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+endstream
+endobj
+7 0 obj
+<< /Type /Font /Subtype /Type0 /Encoding /Identity-H /BaseFont /LREOIX+LMRoman10-Regular /DescendantFonts [ 13 0 R ] /ToUnicode 12 0 R >>
+endobj
+13 0 obj
+<< /Type /Font /Subtype /CIDFontType0 /BaseFont /LREOIX+LMRoman10-Regular /FontDescriptor 10 0 R /W 9 0 R /CIDSystemInfo << /Registry (Adobe) /Ordering (Identity) /Supplement 0 >> >>
+endobj
+8 0 obj
+<< /Type /Pages  /Count 1 /Kids [ 2 0 R ] >>
+endobj
+14 0 obj
+<< /Names [ (Doc-Start) 6 0 R (page.1) 5 0 R ] /Limits [ (Doc-Start) (page.1) ] >>
+endobj
+15 0 obj
+<< /Dests 14 0 R >>
+endobj
+16 0 obj
+<< /Type /Catalog /Pages 8 0 R /Names 15 0 R /PageMode/UseOutlines /OpenAction 1 0 R >>
+endobj
+17 0 obj
+<< /Producer (LuaTeX)/Author()/Title()/Subject()/Creator(LaTeX with hyperref)/Keywords() /Trapped /False >>
+endobj
+xref
+0 18
+0000000000 65535 f 
+0000000020 00000 n 
+0000000236 00000 n 
+0000000461 00000 n 
+0000000068 00000 n 
+0000000342 00000 n 
+0000000401 00000 n 
+0000002541 00000 n 
+0000002893 00000 n 
+0000000505 00000 n 
+0000001526 00000 n 
+0000000569 00000 n 
+0000001747 00000 n 
+0000002694 00000 n 
+0000002953 00000 n 
+0000003052 00000 n 
+0000003088 00000 n 
+0000003192 00000 n 
+trailer
+<< /Size 18 /Root 16 0 R /Info 17 0 R >>
+startxref
+3316
+%%EOF
diff --git a/testfiles-pvt/latex2e.pvt b/testfiles-pvt/87-pdfversion.pvt
similarity index 53%
copy from testfiles-pvt/latex2e.pvt
copy to testfiles-pvt/87-pdfversion.pvt
index cb96216..4a5b0ef 100644
--- a/testfiles-pvt/latex2e.pvt
+++ b/testfiles-pvt/87-pdfversion.pvt
@@ -1,7 +1,6 @@
 \input{regression-test}
 \documentclass{article}
-\usepackage{hyperref}
-
+\usepackage[pdfversion=2.0]{hyperref}
 \begin{document}
-\section{LaTeXe}
+blub
 \end{document}
\ No newline at end of file
diff --git a/testfiles-pvt/87-pdfversion.tpf b/testfiles-pvt/87-pdfversion.tpf
new file mode 100644
index 0000000..afc7e1a
--- /dev/null
+++ b/testfiles-pvt/87-pdfversion.tpf
@@ -0,0 +1,138 @@
+%PDF-2.0
+%ÐÔÅØ
+1 0 obj
+<< /S /GoTo /D [2 0 R /Fit] >>
+endobj
+4 0 obj
+<<
+/Length 78        
+>>
+stream
+BT
+/F19 9.9626 Tf 148.712 657.235 Td [(blub)]TJ 154.421 -567.87 Td [(1)]TJ
+ET
+endstream
+endobj
+2 0 obj
+<<
+/Type /Page
+/Contents 4 0 R
+/Resources 3 0 R
+/MediaBox [0 0 612 792]
+/Parent 8 0 R
+>>
+endobj
+5 0 obj
+<<
+/D [2 0 R /XYZ 132.768 705.06 null]
+>>
+endobj
+6 0 obj
+<<
+/D [2 0 R /XYZ 133.768 667.198 null]
+>>
+endobj
+3 0 obj
+<<
+/Font << /F19 7 0 R >>
+/ProcSet [ /PDF /Text ]
+>>
+endobj
+9 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 555.6 444.4 305.6 500 555.6 277.8 305.6 527.8 277.8 833.3 555.6 500 555.6 527.8 391.7 394.4 388.9 555.6]
+endobj
+10 0 obj
+<<
+/Length1 1409
+/Length2 8171
+/Length3 0
+/Length 9580      
+>>
+[BINARY STREAM]
+endobj
+11 0 obj
+<<
+/Type /FontDescriptor
+/FontName /MIKGCD+CMR10
+/Flags 4
+/FontBBox [-40 -250 1009 750]
+/Ascent 694
+/CapHeight 683
+/Descent -194
+/ItalicAngle 0
+/StemV 69
+/XHeight 431
+/CharSet (/b/l/one/u)
+/FontFile 10 0 R
+>>
+endobj
+7 0 obj
+<<
+/Type /Font
+/Subtype /Type1
+/BaseFont /MIKGCD+CMR10
+/FontDescriptor 11 0 R
+/FirstChar 49
+/LastChar 117
+/Widths 9 0 R
+>>
+endobj
+8 0 obj
+<<
+/Type /Pages
+/Count 1
+/Kids [2 0 R]
+>>
+endobj
+12 0 obj
+<<
+/Names [(Doc-Start) 6 0 R (page.1) 5 0 R]
+/Limits [(Doc-Start) (page.1)]
+>>
+endobj
+13 0 obj
+<<
+/Dests 12 0 R
+>>
+endobj
+14 0 obj
+<<
+/Type /Catalog
+/Pages 8 0 R
+/Names 13 0 R
+/PageMode/UseOutlines
+/OpenAction 1 0 R
+>>
+endobj
+15 0 obj
+<<
+/Producer (pdfTeX)/Author()/Title()/Subject()/Creator(LaTeX with hyperref)/Keywords()
+/Trapped /False
+>>
+endobj
+xref
+0 16
+0000000000 65535 f 
+0000000015 00000 n 
+0000000197 00000 n 
+0000000416 00000 n 
+0000000061 00000 n 
+0000000301 00000 n 
+0000000358 00000 n 
+0000010775 00000 n 
+0000010913 00000 n 
+0000000484 00000 n 
+0000000872 00000 n 
+0000010550 00000 n 
+0000010970 00000 n 
+0000011065 00000 n 
+0000011101 00000 n 
+0000011205 00000 n 
+trailer
+<< /Size 16
+/Root 14 0 R
+/Info 15 0 R
+ >>
+startxref
+11329
+%%EOF
diff --git a/testfiles-pvt/latex2e.pvt b/testfiles-xetex/87-pdfversion.pvt
similarity index 53%
copy from testfiles-pvt/latex2e.pvt
copy to testfiles-xetex/87-pdfversion.pvt
index cb96216..4a5b0ef 100644
--- a/testfiles-pvt/latex2e.pvt
+++ b/testfiles-xetex/87-pdfversion.pvt
@@ -1,7 +1,6 @@
 \input{regression-test}
 \documentclass{article}
-\usepackage{hyperref}
-
+\usepackage[pdfversion=2.0]{hyperref}
 \begin{document}
-\section{LaTeXe}
+blub
 \end{document}
\ No newline at end of file
diff --git a/testfiles-xetex/87-pdfversion.tpf b/testfiles-xetex/87-pdfversion.tpf
new file mode 100644
index 0000000..e4a613a
--- /dev/null
+++ b/testfiles-xetex/87-pdfversion.tpf
@@ -0,0 +1,108 @@
+%PDF-2.0
+%äðíø
+6 0 obj
+<</Length 128>>
+stream
+ q 1 0 0 1 72 720 cm 0 G 0 g 0 g 0 G BT /F1 9.9626 Tf 76.712 -62.765 Td[<00230048006d0023>]TJ 154.421 -567.87 Td[<0052>]TJ ET Q
+endstream
+endobj
+7 0 obj
+<</Font<</F1 4 0 R>>/ProcSet[/PDF/Text/ImageC/ImageB/ImageI]>>
+endobj
+10 0 obj
+<</Names[(Doc-Start)8 0 R(page.1)9 0 R]>>
+endobj
+8 0 obj
+[3 0 R/XYZ 133.77 667.2 null]
+endobj
+9 0 obj
+[3 0 R/XYZ 132.77 705.06 null]
+endobj
+11 0 obj
+<</Dests 10 0 R>>
+endobj
+3 0 obj
+<</Resources 7 0 R/Type/Page/Parent 12 0 R/Contents[6 0 R]>>
+endobj
+12 0 obj
+<</Type/Pages/Count 1/Kids[3 0 R]/MediaBox[0 0 612 792]>>
+endobj
+2 0 obj
+<</Creator(TeX)/Producer(xdvipdfmx)/CreationDate(D:20160520090000-00'00')>>
+endobj
+1 0 obj
+<</OpenAction[3 0 R/Fit]/PageMode/UseOutlines/Names 11 0 R/Pages 12 0 R/Type/Catalog>>
+endobj
+13 0 obj
+<</Length 398>>
+stream
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CMapName /EXQIVM+LMRoman10-Regular-UTF16 def
+/CMapType 2 def
+/CIDSystemInfo <<
+  /Registry (Adobe)
+  /Ordering (UCS)
+  /Supplement 0
+>> def
+1 begincodespacerange
+<0000> <FFFF>
+endcodespacerange
+4 beginbfchar
+<0023> <0062>
+<0048> <006C>
+<0052> <0031>
+<006D> <0075>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+endstream
+endobj
+15 0 obj
+<</Subtype/CIDFontType0C/Length 852>>
+[BINARY STREAM]
+endobj
+16 0 obj
+[35[556]72[278]82[500]109[556]]
+endobj
+5 0 obj
+<</Type/Font/Subtype/CIDFontType0/BaseFont/EXQIVM+LMRoman10-Regular/CIDSystemInfo<</Registry(Adobe)/Ordering(Identity)/Supplement
+0>>/FontDescriptor 14 0 R/DW 280/W 16 0 R>>
+endobj
+14 0 obj
+<</Type/FontDescriptor/Ascent 806/Descent -194/StemV 69/CapHeight 806/AvgWidth 549/FontBBox[-430
+-290 1417 1127]/ItalicAngle 0/Flags 6/Style<</Panose<000000000500000000000000>>>/FontName/EXQIVM+LMRoman10-Regular/FontFile3
+15 0 R>>
+endobj
+4 0 obj
+<</Type/Font/Subtype/Type0/BaseFont/EXQIVM+LMRoman10-Regular-Identity-H/Encoding/Identity-H/DescendantFonts[5 0 R]/ToUnicode
+13 0 R>>
+endobj
+xref
+0 17
+0000000000 65535 f 
+0000000694 00000 n 
+0000000603 00000 n 
+0000000453 00000 n 
+0000002652 00000 n 
+0000002216 00000 n 
+0000000015 00000 n 
+0000000192 00000 n 
+0000000328 00000 n 
+0000000373 00000 n 
+0000000270 00000 n 
+0000000419 00000 n 
+0000000529 00000 n 
+0000000796 00000 n 
+0000002405 00000 n 
+0000001244 00000 n 
+0000002168 00000 n 
+trailer
+<</ID[<ID-STRING><ID-STRING>]/Root
+1 0 R/Info 2 0 R/Size 17>>
+startxref
+2801
+%%EOF





More information about the latex3-commits mailing list.