Skip to content

Commit

Permalink
enable pdf version setting in xetex/dvipdfmx, test 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrike Fischer committed Feb 9, 2021
1 parent ecf51a8 commit d85a7ee
Show file tree
Hide file tree
Showing 7 changed files with 389 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog.txt
Expand Up @@ -10,6 +10,8 @@
package options.
* added a \lastnodetype test to distinguish explict 0pt vskip from no skip
in \Hy@SaveLastskip issue 167
* enable setting the pdfversion with the xetex/dvipdfm driver,
(related: issue 87)


2021-02-08 Ulrike Fischer/David Carlisle
Expand Down
8 changes: 7 additions & 1 deletion hyperref.dtx
Expand Up @@ -10246,7 +10246,13 @@
\endgroup}
%</xetex>
% \end{macrocode}
%
% set the pdf version
% \begin{macrocode}
%<*dvipdfm|xetex>
\special{pdf:majorversion \Hy@pdf@majorversion}
\special{pdf:minorversion \Hy@pdf@minorversion}
%</dvipdfm|xetex>
% \end{macrocode}
% \subsubsection{pdfmarkbase, dvipdfm, xetex}
%
% \begin{macrocode}
Expand Down
122 changes: 122 additions & 0 deletions 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
6 changes: 6 additions & 0 deletions testfiles-pvt/87-pdfversion.pvt
@@ -0,0 +1,6 @@
\input{regression-test}
\documentclass{article}
\usepackage[pdfversion=2.0]{hyperref}
\begin{document}
blub
\end{document}
138 changes: 138 additions & 0 deletions 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
6 changes: 6 additions & 0 deletions testfiles-xetex/87-pdfversion.pvt
@@ -0,0 +1,6 @@
\input{regression-test}
\documentclass{article}
\usepackage[pdfversion=2.0]{hyperref}
\begin{document}
blub
\end{document}

0 comments on commit d85a7ee

Please sign in to comment.