[latex3-commits] [git/LaTeX3-latex3-pdfresources] testlinkstuff: more ocg, more primitives removed (08d38c1)

Ulrike Fischer fischer at troubleshooting-tex.de
Wed May 1 00:57:12 CEST 2019


Repository : https://github.com/latex3/pdfresources
On branch  : testlinkstuff
Link       : https://github.com/latex3/pdfresources/commit/08d38c160faaac476e526ef1d35f5bc6fab88a1e

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

commit 08d38c160faaac476e526ef1d35f5bc6fab88a1e
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Wed May 1 00:57:12 2019 +0200

    more ocg, more primitives removed


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

08d38c160faaac476e526ef1d35f5bc6fab88a1e
 .gitignore               |    1 +
 hluatex-experimental.def |   22 ++++++++--------------
 test-pdfresources.tex    |    7 +++++--
 3 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/.gitignore b/.gitignore
index ddd8e28..8496b28 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@ tex/*
 ls-R
 *.dvi
 *.ps
+*.toc
diff --git a/hluatex-experimental.def b/hluatex-experimental.def
index 4b2fbed..cfcf20a 100644
--- a/hluatex-experimental.def
+++ b/hluatex-experimental.def
@@ -152,26 +152,21 @@
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
+%only used in test if version can be set
 \protected\def\pdflastannot      {\numexpr\pdffeedback lastannot\relax}
-%\protected\def\pdflastlink       {\numexpr\pdffeedback lastlink\relax}
 \protected\def\pdflastobj        {\numexpr\pdffeedback lastobj\relax}
 
-%\protected\edef\pdflinkmargin    {\pdfvariable linkmargin}
 \protected\def\pdfliteral        {\pdfextension literal}
 
-\protected\def\pdfobj            {\pdfextension obj }
-%\protected\edef\pdfcompresslevel       {\pdfvariable compresslevel}
 \protected\edef\pdfpageattr            {\pdfvariable pageattr}
 
 \protected\edef\pdfpageresources       {\pdfvariable pageresources}
 \protected\edef\pdfpagesattr           {\pdfvariable pagesattr}
 
-%\protected\def\pdfrefobj         {\pdfextension refobj }
 
 \protected\def\pdfstartlink      {\pdfextension startlink }
 \protected\def\pdfendlink        {\pdfextension endlink\relax}
 
-\protected\def\pdfoutline        {\pdfextension outline }
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \ExplSyntaxOn
@@ -340,34 +335,33 @@
           /View  <</ViewState/OFF>>~
          >>
      }
-    \edef\OBJ at OCG@print{\the\pdflastobj\c_space_tl 0\c_space_tl R}
     \driver_pdf_object_write:nx { l__hyp_ocg_ref_array_obj }
     {
         \driver_pdf_object_ref:n { l__hyp_ocg_view_dict_obj }
         \c_space_tl
         \driver_pdf_object_ref:n { l__hyp_ocg_print_dict_obj }
     }
-    \edef\OBJ at OCGs{\the\pdflastobj\c_space_tl 0\c_space_tl R}
     \pdf_catalog_gput:nn
      {OCProperties}
      {<<
-        /OCGs\c_space_tl\OBJ at OCGs
+        /OCGs~\driver_pdf_object_ref:n { l__hyp_ocg_ref_array_obj }
+        ~
         /D<<
-          /OFF[\OBJ at OCG@print]
+          /OFF[\driver_pdf_object_ref:n { l__hyp_ocg_print_dict_obj }]
           /AS[
             <<
               /Event/View
-              /OCGs\c_space_tl \OBJ at OCGs
+              /OCGs\c_space_tl \driver_pdf_object_ref:n { l__hyp_ocg_ref_array_obj }
               /Category[/View]
             >>
             <<
               /Event/Print
-              /OCGs\c_space_tl \OBJ at OCGs
+              /OCGs\c_space_tl \driver_pdf_object_ref:n { l__hyp_ocg_ref_array_obj }
               /Category[/Print]
             >>
             <<
               /Event/Export
-              /OCGs\c_space_tl \OBJ at OCGs
+              /OCGs\c_space_tl \driver_pdf_object_ref:n { l__hyp_ocg_ref_array_obj }
               /Category[/Print]
             >>
           ]
@@ -380,7 +374,7 @@
           \the\pdfpageresources
           /Properties<<
             /OCView ~ \driver_pdf_object_ref:n { l__hyp_ocg_view_dict_obj}
-            /OCPrint\c_space_tl \OBJ at OCG@print
+            /OCPrint~ \driver_pdf_object_ref:n { l__hyp_ocg_print_dict_obj}
           >>
         }
       }
diff --git a/test-pdfresources.tex b/test-pdfresources.tex
index 1b19da0..561f462 100644
--- a/test-pdfresources.tex
+++ b/test-pdfresources.tex
@@ -16,14 +16,17 @@
 \usepackage{xcolor}
 
 \usepackage[customdriver=hluatex-experimental,pdfversion=2.0,pdftitle=X,ocgcolorlinks]{hyperref}
-
+\show\pdfoutline
+\usepackage{bookmark}
 %%\tracingmacros=1
 \hypersetup{urlbordercolor=blue,linkbordercolor=green,pdfborder={1 1 1},pdfprintpagerange=0}
 %%%\makeatletter
 \hypupdateattribute
 \makeatletter%\tracingmacros=1
 \textwidth=5cm
-\begin{document}
+\begin{document}\show\pdfoutline
+\tableofcontents
+\section{abc}
 \makeatletter%\show\Hy at pstringdef
 \begin{Form}
 \TextField{abc}





More information about the latex3-commits mailing list