[latex3-commits] [git/LaTeX3-latex3-pdfresources] develop: don't output pages if empty, fixes problem with distiller (02c3d88)

Ulrike Fischer fischer at troubleshooting-tex.de
Mon Jun 14 11:54:22 CEST 2021


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

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

commit 02c3d8839cab5ca63cf643eb4b65463e63dfaba1
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Mon Jun 14 11:54:22 2021 +0200

    don't output pages if empty, fixes problem with distiller


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

02c3d8839cab5ca63cf643eb4b65463e63dfaba1
 l3pdfmanagement.dtx                 | 7 +++++--
 testfiles-dvips/annot-last.tlg      | 1 -
 testfiles-dvips/dict_if_empty.tlg   | 1 -
 testfiles-dvips/pagelabels-log.tlg  | 1 -
 testfiles-dvips/show.tlg            | 1 -
 testfiles-dvips/version-compare.tlg | 1 -
 testfiles/annot-last.xetex.tlg      | 1 -
 testfiles/dict_if_empty.xetex.tlg   | 1 -
 testfiles/pagelabels-log.xetex.tlg  | 1 -
 testfiles/show.xetex.tlg            | 1 -
 testfiles/version-compare.xetex.tlg | 1 -
 11 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/l3pdfmanagement.dtx b/l3pdfmanagement.dtx
index 9383c03..4dbecb5 100644
--- a/l3pdfmanagement.dtx
+++ b/l3pdfmanagement.dtx
@@ -914,9 +914,12 @@
 % push to the register command / issue the special
 \cs_new_protected:Npn \@@_Pages_gpush:
   {
-    \exp_args:Nx \__pdf_backend_Pages_primitive:n
+    \pdfdict_if_empty:nF { g__pdf_Core/Pages}
       {
-        \pdfdict_use:n { g__pdf_Core/Pages}
+        \exp_args:Nx \__pdf_backend_Pages_primitive:n
+          {
+            \pdfdict_use:n { g__pdf_Core/Pages}
+          }
       }
   }
 
diff --git a/testfiles-dvips/annot-last.tlg b/testfiles-dvips/annot-last.tlg
index 5162a4c..8b82367 100644
--- a/testfiles-dvips/annot-last.tlg
+++ b/testfiles-dvips/annot-last.tlg
@@ -141,7 +141,6 @@ Completed box being shipped out [1]
 .\kern 0.0
 .\kern -633.0
 .\hbox(0.0+0.0)x0.0
-..\special{ps: [ /PAGES pdfmark}
 ..\special{ps:SDict begin mark/Creator (TeX)/DOCINFO pdfmark end}
 ..\special{ps:SDict begin mark/CreationDate (D:20010101205959-00'00')/DOCINFO pd\ETC.}
 ..\special{ps:SDict begin mark/ModDate (D:20010101205959-00'00')/DOCINFO pdfmark\ETC.}
diff --git a/testfiles-dvips/dict_if_empty.tlg b/testfiles-dvips/dict_if_empty.tlg
index 833e2d2..3408963 100644
--- a/testfiles-dvips/dict_if_empty.tlg
+++ b/testfiles-dvips/dict_if_empty.tlg
@@ -112,7 +112,6 @@ Completed box being shipped out [1]
 .\kern 0.0
 .\kern -633.0
 .\hbox(0.0+0.0)x0.0
-..\special{ps: [ /PAGES pdfmark}
 ..\special{ps:SDict begin mark/Creator (TeX)/DOCINFO pdfmark end}
 ..\special{ps:SDict begin mark/CreationDate (D:20010101205959-00'00')/DOCINFO pd\ETC.}
 ..\special{ps:SDict begin mark/ModDate (D:20010101205959-00'00')/DOCINFO pdfmark\ETC.}
diff --git a/testfiles-dvips/pagelabels-log.tlg b/testfiles-dvips/pagelabels-log.tlg
index 5f5fd98..612f15f 100644
--- a/testfiles-dvips/pagelabels-log.tlg
+++ b/testfiles-dvips/pagelabels-log.tlg
@@ -321,7 +321,6 @@ Completed box being shipped out [5]
 .\kern -633.0
 .\hbox(0.0+0.0)x0.0
 ..\special{PSfile=pagelabels-log.out.ps}
-..\special{ps: [ /PAGES pdfmark}
 ..\special{ps:SDict begin mark/Creator <FEFF004C00610054006500580020007700690074\ETC.}
 ..\special{ps:SDict begin mark/CreationDate (D:20010101205959-00'00')/DOCINFO pd\ETC.}
 ..\special{ps:SDict begin mark/ModDate (D:20010101205959-00'00')/DOCINFO pdfmark\ETC.}
diff --git a/testfiles-dvips/show.tlg b/testfiles-dvips/show.tlg
index 64199cb..c146395 100644
--- a/testfiles-dvips/show.tlg
+++ b/testfiles-dvips/show.tlg
@@ -105,7 +105,6 @@ Completed box being shipped out [1]
 .\kern -633.0
 .\hbox(0.0+0.0)x0.0
 ..\special{PSfile=show.out.ps}
-..\special{ps: [ /PAGES pdfmark}
 ..\special{ps:SDict begin mark/Creator <FEFF004C00610054006500580020007700690074\ETC.}
 ..\special{ps:SDict begin mark/CreationDate (D:20010101205959-00'00')/DOCINFO pd\ETC.}
 ..\special{ps:SDict begin mark/ModDate (D:20010101205959-00'00')/DOCINFO pdfmark\ETC.}
diff --git a/testfiles-dvips/version-compare.tlg b/testfiles-dvips/version-compare.tlg
index b339400..0131623 100644
--- a/testfiles-dvips/version-compare.tlg
+++ b/testfiles-dvips/version-compare.tlg
@@ -174,7 +174,6 @@ Completed box being shipped out [1]
 .\kern 0.0
 .\kern -633.0
 .\hbox(0.0+0.0)x0.0
-..\special{ps: [ /PAGES pdfmark}
 ..\special{ps:SDict begin mark/Creator (TeX)/DOCINFO pdfmark end}
 ..\special{ps:SDict begin mark/CreationDate (D:20010101205959-00'00')/DOCINFO pd\ETC.}
 ..\special{ps:SDict begin mark/ModDate (D:20010101205959-00'00')/DOCINFO pdfmark\ETC.}
diff --git a/testfiles/annot-last.xetex.tlg b/testfiles/annot-last.xetex.tlg
index eabf053..ba9ad43 100644
--- a/testfiles/annot-last.xetex.tlg
+++ b/testfiles/annot-last.xetex.tlg
@@ -82,7 +82,6 @@ Completed box being shipped out [1]
 .\kern 0.0
 .\kern -633.0
 .\hbox(0.0+0.0)x0.0
-..\special{pdf:put @pages <<>>}
 ..\special{pdf:docinfo<</Creator (TeX)>>}
 ..\special{pdf:docinfo<</Producer (xetex)>>}
 ..\special{pdf:docinfo<</CreationDate (D:20010101194934+01'00')>>}
diff --git a/testfiles/dict_if_empty.xetex.tlg b/testfiles/dict_if_empty.xetex.tlg
index 93b249a..a585896 100644
--- a/testfiles/dict_if_empty.xetex.tlg
+++ b/testfiles/dict_if_empty.xetex.tlg
@@ -92,7 +92,6 @@ Completed box being shipped out [1]
 .\kern 0.0
 .\kern -633.0
 .\hbox(0.0+0.0)x0.0
-..\special{pdf:put @pages <<>>}
 ..\special{pdf:docinfo<</Creator (TeX)>>}
 ..\special{pdf:docinfo<</Producer (xetex)>>}
 ..\special{pdf:docinfo<</CreationDate (D:20010101194934+01'00')>>}
diff --git a/testfiles/pagelabels-log.xetex.tlg b/testfiles/pagelabels-log.xetex.tlg
index ebe3c5b..c672316 100644
--- a/testfiles/pagelabels-log.xetex.tlg
+++ b/testfiles/pagelabels-log.xetex.tlg
@@ -297,7 +297,6 @@ Completed box being shipped out [5]
 .\kern 0.0
 .\kern -633.21999
 .\hbox(0.0+0.0)x0.0
-..\special{pdf:put @pages <<>>}
 ..\special{pdf:docinfo<</Creator <FEFF004C00610054006500580020007700690074006800\ETC.}
 ..\special{pdf:docinfo<</Producer (xetex)>>}
 ..\special{pdf:docinfo<</CreationDate (D:20010101194934+01'00')>>}
diff --git a/testfiles/show.xetex.tlg b/testfiles/show.xetex.tlg
index 0cfd78e..16900f0 100644
--- a/testfiles/show.xetex.tlg
+++ b/testfiles/show.xetex.tlg
@@ -101,7 +101,6 @@ Completed box being shipped out [1]
 .\kern 0.0
 .\kern -633.0
 .\hbox(0.0+0.0)x0.0
-..\special{pdf:put @pages <<>>}
 ..\special{pdf:docinfo<</Creator <FEFF004C00610054006500580020007700690074006800\ETC.}
 ..\special{pdf:docinfo<</Producer (xetex)>>}
 ..\special{pdf:docinfo<</CreationDate (D:20010101194934+01'00')>>}
diff --git a/testfiles/version-compare.xetex.tlg b/testfiles/version-compare.xetex.tlg
index 911d761..49bff16 100644
--- a/testfiles/version-compare.xetex.tlg
+++ b/testfiles/version-compare.xetex.tlg
@@ -146,7 +146,6 @@ Completed box being shipped out [1]
 .\kern 0.0
 .\kern -633.0
 .\hbox(0.0+0.0)x0.0
-..\special{pdf:put @pages <<>>}
 ..\special{pdf:docinfo<</Creator (TeX)>>}
 ..\special{pdf:docinfo<</Producer (xetex)>>}
 ..\special{pdf:docinfo<</CreationDate (D:20010101194934+01'00')>>}





More information about the latex3-commits mailing list.