[latex3-commits] [git/LaTeX3-latex3-latex3] main: Don't embed PDF files immediately to count pages (036ada670)
Marcel Fabian Krüger
tex at 2krueger.de
Fri Jun 24 13:50:23 CEST 2022
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/036ada6702980ca4e0daf97ef4427eb389636249
>---------------------------------------------------------------
commit 036ada6702980ca4e0daf97ef4427eb389636249
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Fri Jun 24 13:18:24 2022 +0200
Don't embed PDF files immediately to count pages
Fixes #1098.
>---------------------------------------------------------------
036ada6702980ca4e0daf97ef4427eb389636249
l3backend/CHANGELOG.md | 3 +++
l3backend/l3backend-graphics.dtx | 2 +-
l3experimental/l3graphics/testfiles/m3graphics002.tlg | 3 ---
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/l3backend/CHANGELOG.md b/l3backend/CHANGELOG.md
index 48187b02e..cf2c709e6 100644
--- a/l3backend/CHANGELOG.md
+++ b/l3backend/CHANGELOG.md
@@ -6,6 +6,9 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+#### Fixed
+- Do not include PDF file to count pages on pdfTeX
+
## [2022-04-20]
### Changed
diff --git a/l3backend/l3backend-graphics.dtx b/l3backend/l3backend-graphics.dtx
index 9d5b31faa..d6c6ab14d 100644
--- a/l3backend/l3backend-graphics.dtx
+++ b/l3backend/l3backend-graphics.dtx
@@ -352,7 +352,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_backend_get_pagecount:n #1
{
- \tex_immediate:D \tex_pdfximage:D {#1}
+ \tex_pdfximage:D {#1}
\int_const:cn { c_@@_ #1 _pages_int }
{ \int_use:N \tex_pdflastximagepages:D }
}
diff --git a/l3experimental/l3graphics/testfiles/m3graphics002.tlg b/l3experimental/l3graphics/testfiles/m3graphics002.tlg
index a82e1583e..a0078aa5e 100644
--- a/l3experimental/l3graphics/testfiles/m3graphics002.tlg
+++ b/l3experimental/l3graphics/testfiles/m3graphics002.tlg
@@ -3,15 +3,12 @@ Don't change this file in any respect.
============================================================
TEST 1: Getting the number of pages
============================================================
- <./miau.pdf>
> \l_tmpa_tl=1.
<recently read> }
l. ... }
- <./foo.bar.png>
> \l_tmpa_tl=1.
<recently read> }
l. ... }
- <./example-image-a4-numbered.pdf>
> \l_tmpa_tl=12.
<recently read> }
l. ... }
More information about the latex3-commits
mailing list.