[latex3-commits] [git/LaTeX3-latex3-pdfresources] testlinkstuff: more pdfpagesattr stuff (5eadd62)
Ulrike Fischer
fischer at troubleshooting-tex.de
Fri May 10 17:44:27 CEST 2019
Repository : https://github.com/latex3/pdfresources
On branch : testlinkstuff
Link : https://github.com/latex3/pdfresources/commit/5eadd629f74b0dc31d7b46a470bb975ded0f122b
>---------------------------------------------------------------
commit 5eadd629f74b0dc31d7b46a470bb975ded0f122b
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Fri May 10 17:44:27 2019 +0200
more pdfpagesattr stuff
>---------------------------------------------------------------
5eadd629f74b0dc31d7b46a470bb975ded0f122b
hluatex-experimental.def | 19 +++++--------------
pdfresources.dtx | 4 ++--
test-pdfresources.tex | 17 +++++++++--------
3 files changed, 16 insertions(+), 24 deletions(-)
diff --git a/hluatex-experimental.def b/hluatex-experimental.def
index 8dee08d..1f2684d 100644
--- a/hluatex-experimental.def
+++ b/hluatex-experimental.def
@@ -172,7 +172,7 @@
\protected\edef\pdfpageattr {\pdfvariable pageattr}
\protected\edef\pdfpageresources {\pdfvariable pageresources}
-\protected\edef\pdfpagesattr {\pdfvariable pagesattr}
+%\protected\edef\pdfpagesattr {\pdfvariable pagesattr}
%\protected\def\pdfstartlink {\pdfextension startlink }
@@ -684,19 +684,10 @@
%this needs central management in the kernel
\def\PDF at SetupDoc{
- \ifx\@pdfpagescrop\@empty
- \else
- \edef\process at me{
- \pdfpagesattr={
- /CropBox[\@pdfpagescrop]%
- \expandafter\ifx\expandafter\\\the\pdfpagesattr\\%
- \else
- ^^J\the\pdfpagesattr
- \fi
- }%
- }%
- \process at me
- \fi
+ \tl_if_empty:NF\@pdfpagescrop
+ {
+ \pdf_pagesattr_gput:nn {CropBox}{[\@pdfpagescrop]}
+ }
\Hy at pstringdef\Hy at pstringB{\@baseurl}%
\pdf_catalog_gput:nn {PageMode}{/\@pdfpagemode}
\tl_if_empty:NF \@baseurl
diff --git a/pdfresources.dtx b/pdfresources.dtx
index df85a89..4e00da2 100644
--- a/pdfresources.dtx
+++ b/pdfresources.dtx
@@ -361,13 +361,13 @@
% \subsection{The info dictionary}
% The info dictionary is filled by e.g. \cs{pdfinfo}. Multiple appearances of
% \cs{pdfinfo} are concatenated, so one could end with multiple /Title or /Author entries.
-% It is then viewer dependant which one is showed, so it is better to avoid them.
+% It is then viewer dependant which one is showed, so it is better to avoid this.
% We therefore setup a property which is filled and written to the info
% directory in one go. According to hyperref a few odd drivers (hvtex, dvipsone, dviwind)
% don't support arbitrary keys, but this should be handle elsewhere. Most entries are
% strings so there is a special command for this, as entries with empty content
% should be ommited we add a test. The string command should perhaps escape the argument???
-% hyperref write the info dictionary as the shipout of the first page --
+% hyperref write the info dictionary at the shipout of the first page --
% probably to catch the case that \cs{title} is issued after the begin of the document.
% We are outputting at begin document, so all info keys should be set before.
% \begin{macrocode}
diff --git a/test-pdfresources.tex b/test-pdfresources.tex
index c871321..ba94a6f 100644
--- a/test-pdfresources.tex
+++ b/test-pdfresources.tex
@@ -17,14 +17,15 @@
\ExplSyntaxOff
\usepackage{xcolor,listings}
\title{some title}
-%\usepackage[customdriver=hluatex-experimental,
-% pdfusetitle,
-% %pdftrapped=True,
-% pdfversion=1.7,
-% % pdfstartpage=3,
-% % pdfstartview=
-% pdfview=FitV,
-% ]{hyperref}
+\usepackage[customdriver=hluatex-experimental,
+ pdfusetitle,
+ %pdftrapped=True,
+ pdfversion=1.7,
+ % pdfstartpage=3,
+ % pdfstartview=
+ pdfview=FitV,
+ pdfpagescrop={0 0 300 300}
+ ]{hyperref}
%\usepackage[ocgcolorlinks]{ocgx2}
More information about the latex3-commits
mailing list