[latex3-commits] [git/LaTeX3-latex3-pdfresources] backendtest: AF test, corrections (734b978)
Ulrike Fischer
fischer at troubleshooting-tex.de
Sun Aug 25 22:41:09 CEST 2019
Repository : https://github.com/latex3/pdfresources
On branch : backendtest
Link : https://github.com/latex3/pdfresources/commit/734b9789f71e4a4325a95edd300a0f01e24c8458
>---------------------------------------------------------------
commit 734b9789f71e4a4325a95edd300a0f01e24c8458
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sun Aug 25 22:41:09 2019 +0200
AF test, corrections
>---------------------------------------------------------------
734b9789f71e4a4325a95edd300a0f01e24c8458
pdfresources.dtx | 173 +++++++++++----------
testfiles-pool/catalogAF.pvt | 14 --
testfiles-pool/ocproperties.pvt | 60 +++++--
{testfiles-pool => testfiles}/catalogAF.luatex.tpf | 97 +++++-------
testfiles/catalogAF.pvt | 24 +++
{testfiles-pool => testfiles}/catalogAF.tpf | 111 ++++++-------
.../{pagesattr.xetex.tpf => catalogAF.xetex.tpf} | 89 ++++++-----
7 files changed, 307 insertions(+), 261 deletions(-)
diff --git a/pdfresources.dtx b/pdfresources.dtx
index b974e2c..a62510e 100644
--- a/pdfresources.dtx
+++ b/pdfresources.dtx
@@ -26,6 +26,7 @@
\documentclass{l3doc}
\usepackage{tabularx,array,booktabs}
\newcommand\potentialclash{\noindent\llap{\dbend\ }}
+\raggedbottom
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -848,7 +849,8 @@
}
%the code to push the values, used in shipout
%merges the two props and then fills the register in pdflatex
- %merges the two tables (the one is probably still empty) and then fills (in lua) in luatex
+ %merges the two tables (the one is probably still empty)
+ % and then fills (in lua) in luatex
%issues the values stored in the global prop with dvi
\cs_new_protected:Npn \@@_backend_PageN_gpush:n #1
{
@@ -888,7 +890,8 @@
}
%the code to push the values, used in shipout
%merges the two props and then fills the register in pdflatex
- %merges the two tables (the one is probably still empty) and then fills (in lua) in luatex
+ %merges the two tables (the one is probably still empty)
+ %and then fills (in lua) in luatex
%issues the values stored in the global prop with dvi
\cs_new_protected:Npn \@@_backend_PageN_gpush:n #1
{
@@ -1842,6 +1845,7 @@
% \meta{name} (without preceding slash) or one of the special keys described
% later which represents an entry in a subdictionary.
% The exact format of \Arg{value} depends on \Arg{key}.
+% \end{function}
%
% \paragraph{Simple values}
% The values in the following tabular are \enquote{simple} in the sense
@@ -1931,7 +1935,8 @@
% OutputIntents & object name\\
% Requirements & object name & pdf 1.7 \\
% \end{tabularx}
-% \end{function}
+%
+%
% \begin{macrocode}
\cs_new_protected:Npn \pdf_catalog_gput:nn #1 #2 %#1 name, #2 value
{
@@ -1941,9 +1946,9 @@
}
{
\cs_if_exist:cTF
- { @@_Catalog/#1_gput:n }
+ { @@_/Catalog/#1_gput:n }
{
- \use:c { @@_Catalog/#1_gput:n } { #2 }
+ \use:c { @@_/Catalog/#1_gput:n } { #2 }
}
{
\clist_if_in:NnF \c_@@_Catalog_single_clist
@@ -2002,7 +2007,7 @@
\clist_map_inline:Nn \c_@@_Catalog_prop_clist
{
\@@_prop_new:n {Catalog/#1}
- \cs_new_protected:cpn { @@_Catalog/#1_gput:n } ##1
+ \cs_new_protected:cpn { @@_/Catalog/#1_gput:n } ##1
{
\@@_prop_gput:nnn { Catalog/#1 } ##1
}
@@ -2022,15 +2027,17 @@
\clist_map_inline:Nn \c_@@_Catalog_seq_clist
{
\seq_new:c { g_@@_/Catalog/#1_seq }
- \cs_new_protected:cpn { @@_Catalog/#1_gput:n } ##1
+ \cs_new_protected:cpn { @@_/Catalog/#1_gput:n } ##1
{
\seq_gput_right:cx { g_@@_/Catalog/#1_seq } { \pdf_object_ref:n { ##1 } }
}
}
-\cs_new_protected:cpn { @@_Catalog/OCProperties/D_gput:n } #1
+\cs_new_protected:cpn { @@_/Catalog/OCProperties/D_gput:n } #1
{
- \seq_gput_left:cx { g_@@_/Catalog/Configs_seq } { \pdf_object_ref:n { #1 } }
+ \seq_gput_left:cx
+ { g_@@_/Catalog/OCProperties/Configs_seq }
+ { \pdf_object_ref:n { #1 } }
}
% \end{macrocode}
% \end{macro}
@@ -2040,37 +2047,37 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_Catalog_gpush:
{
- \use:c { @@_Catalog/AA_gpush:}
- \use:c { @@_Catalog/AcroForm_gpush:}
- \use:c { @@_Catalog/AF_gpush:}
- \use:c { @@_Catalog/MarkInfo_gpush:}
- \use:c { @@_Catalog/OCProperties_gpush:}
- \use:c { @@_Catalog/OutputIntents_gpush:}
- \use:c { @@_Catalog/Requirements_gpush:}
- \use:c { @@_Catalog/ViewerPreferences_gpush:}
+ \use:c { @@_/Catalog/AA_gpush:}
+ \use:c { @@_/Catalog/AcroForm_gpush:}
+ \use:c { @@_/Catalog/AF_gpush:}
+ \use:c { @@_/Catalog/MarkInfo_gpush:}
+ \use:c { @@_/Catalog/OCProperties_gpush:}
+ \use:c { @@_/Catalog/OutputIntents_gpush:}
+ \use:c { @@_/Catalog/Requirements_gpush:}
+ \use:c { @@_/Catalog/ViewerPreferences_gpush:}
% output the single values:
\prop_map_function:cN { \@@_prop_name:n {Catalog} } \@@_backend_catalog_gput:nn
}
% \end{macrocode}
% \end{macro}
% \paragraph{Building catalog entries: AA}
-% \begin{macro}{\@@_Catalog/AA_gpush:}
+% \begin{macro}{\@@_/Catalog/AA_gpush:}
% \begin{macrocode}
-\cs_new_protected:cpn { @@_Catalog/AA_gpush: }
+\cs_new_protected:cpn { @@_/Catalog/AA_gpush: }
{
\prop_if_empty:cF
{ \@@_prop_name:n { Catalog/AA } }
{
- \@@_backend_object_new:nn { g_@@_Catalog/AA_obj } { dict }
+ \@@_backend_object_new:nn { g_@@_/Catalog/AA_obj } { dict }
\exp_args:Nnx
\@@_backend_object_write:nn
- { g_@@_Catalog/AA_obj }
+ { g_@@_/Catalog/AA_obj }
{ \@@_prop_map_dict_item:n {Catalog/AA } }
\exp_args:Nnx
\@@_backend_catalog_gput:nn
{AA}
{
- \@@_backend_object_ref:n {g_@@_Catalog/AA_obj}
+ \@@_backend_object_ref:n {g_@@_/Catalog/AA_obj}
}
}
}
@@ -2079,80 +2086,80 @@
% \paragraph{Building catalog entries: AcroFrom}
% This is the most complicated case.
% The entries is build from
-% Catalog/AcroForm/Fields (array),
-% Catalog/AcroForm/CO (array),
-% Catalog/AcroForm/DR/Font (dict),
-% Catalog/AcroForm/DR (dict),
-% Catalog/AcroForm
+% /Catalog/AcroForm/Fields (array),
+% /Catalog/AcroForm/CO (array),
+% /Catalog/AcroForm/DR/Font (dict),
+% /Catalog/AcroForm/DR (dict),
+% /Catalog/AcroForm
%
-% \begin{macro}{\@@_Catalog/AcroForm_gpush:}
+% \begin{macro}{\@@_/Catalog/AcroForm_gpush:}
% \begin{macrocode}
-\cs_new_protected:cpn { @@_Catalog/AcroForm_gpush: }
+\cs_new_protected:cpn { @@_/Catalog/AcroForm_gpush: }
{
\seq_if_empty:cF { g_@@_/Catalog/AcroForm/Fields_seq }
{
- \@@_backend_object_new:nn { g_@@_Catalog/AcroForm/Fields_obj } { array }
+ \@@_backend_object_new:nn { g_@@_/Catalog/AcroForm/Fields_obj } { array }
\exp_args:Nnx
\@@_backend_object_write:nn
- { g_@@_Catalog/AcroForm/Fields_obj }
+ { g_@@_/Catalog/AcroForm/Fields_obj }
{ \seq_use:cn { g_@@_/Catalog/AcroForm/Fields_seq } {~} }
\exp_args:Nnnx
\@@_prop_gput:nnn
{ Catalog/AcroForm }
{ Fields }
- { \@@_backend_object_ref:n { g_@@_Catalog/AcroForm/Fields_obj } }
+ { \@@_backend_object_ref:n { g_@@_/Catalog/AcroForm/Fields_obj } }
}
\seq_if_empty:cF { g_@@_/Catalog/AcroForm/CO_seq }
{
- \@@_backend_object_new:nn { g_@@_Catalog/AcroForm/CO_obj } { array }
+ \@@_backend_object_new:nn { g_@@_/Catalog/AcroForm/CO_obj } { array }
\exp_args:Nnx
\@@_backend_object_write:nn
- { g_@@_Catalog/AcroForm/CO_obj }
+ { g_@@_/Catalog/AcroForm/CO_obj }
{ \seq_use:cn { g_@@_/Catalog/AcroForm/CO_seq } {~} }
\exp_args:Nnnx
\@@_prop_gput:nnn
{ Catalog/AcroForm }
{ CO }
- { \@@_backend_object_ref:n { g_@@_Catalog/AcroForm/CO_obj } }
+ { \@@_backend_object_ref:n { g_@@_/Catalog/AcroForm/CO_obj } }
}
\prop_if_empty:cF { \@@_prop_name:n { Catalog/AcroForm/DR/Font}}
{
- \@@_backend_object_new:nn { g_@@_Catalog/AcroForm/DR/Font_obj } {dict}
+ \@@_backend_object_new:nn { g_@@_/Catalog/AcroForm/DR/Font_obj } {dict}
\exp_args:Nnx
\@@_backend_object_write:nn
- { g_@@_Catalog/AcroForm/DR/Font_obj }
+ { g_@@_/Catalog/AcroForm/DR/Font_obj }
{ \@@_prop_map_dict_item:n { Catalog/AcroForm/DR/Font } }
\exp_args:Nnnx
\@@_prop_gput:nnn
{ Catalog/AcroForm/DR }
{ Font }
- { \@@_backend_object_ref:n { g_@@_Catalog/AcroForm/DR/Font_obj } }
+ { \@@_backend_object_ref:n { g_@@_/Catalog/AcroForm/DR/Font_obj } }
}
\prop_if_empty:cF { \@@_prop_name:n { Catalog/AcroForm/DR}}
{
- \@@_backend_object_new:nn { g_@@_Catalog/AcroForm/DR_obj } {dict}
+ \@@_backend_object_new:nn { g_@@_/Catalog/AcroForm/DR_obj } {dict}
\exp_args:Nnx
\@@_backend_object_write:nn
- { g_@@_Catalog/AcroForm/DR_obj }
+ { g_@@_/Catalog/AcroForm/DR_obj }
{ \@@_prop_map_dict_item:n { Catalog/AcroForm/DR } }
\exp_args:Nnnx
\@@_prop_gput:nnn
{ Catalog/AcroForm }
{ DR }
- { \@@_backend_object_ref:n { g_@@_Catalog/AcroForm/DR_obj } }
+ { \@@_backend_object_ref:n { g_@@_/Catalog/AcroForm/DR_obj } }
}
\prop_if_empty:cF { \@@_prop_name:n { Catalog/AcroForm} }
{
- \@@_backend_object_new:nn { g_@@_Catalog/AcroForm_obj } {dict}
+ \@@_backend_object_new:nn { g_@@_/Catalog/AcroForm_obj } {dict}
\exp_args:Nnx
\@@_backend_object_write:nn
- { g_@@_Catalog/AcroForm_obj }
+ { g_@@_/Catalog/AcroForm_obj }
{ \@@_prop_map_dict_item:n { Catalog/AcroForm } }
\exp_args:Nnnx
\@@_prop_gput:nnn
{ Catalog }
{ AcroForm }
- { \@@_backend_object_ref:n { g_@@_Catalog/AcroForm_obj } }
+ { \@@_backend_object_ref:n { g_@@_/Catalog/AcroForm_obj } }
}
}
@@ -2161,23 +2168,23 @@
%
% \paragraph{Building catalog entries: AF}
% AF is an array.
-% \begin{macro}{\@@_Catalog/AF_gpush:}
+% \begin{macro}{\@@_/Catalog/AF_gpush:}
% \begin{macrocode}
-\cs_new_protected:cpn { @@_Catalog/AF_gpush: }
+\cs_new_protected:cpn { @@_/Catalog/AF_gpush: }
{
\seq_if_empty:cF
{ g_@@_/Catalog/AF_seq }
{
- \@@_backend_object_new:nn { g_@@_Catalog/AF_obj } { array }
+ \@@_backend_object_new:nn { g_@@_/Catalog/AF_obj } { array }
\exp_args:Nnx
\@@_backend_object_write:nn
- { g_@@_Catalog/AF_obj }
+ { g_@@_/Catalog/AF_obj }
{ \seq_use:cn { g_@@_/Catalog/AF_seq } {~} }
\exp_args:Nnx
\@@_backend_catalog_gput:nn
{AF}
{
- \@@_backend_object_ref:n {g_@@_Catalog/AF_obj}
+ \@@_backend_object_ref:n {g_@@_/Catalog/AF_obj}
}
}
}
@@ -2185,23 +2192,23 @@
% \end{macro}
%
% \paragraph{Building catalog entries: MarkInfo}
-% \begin{macro}{\@@_Catalog/MarkInfo_gpush:}
+% \begin{macro}{\@@_/Catalog/MarkInfo_gpush:}
% \begin{macrocode}
-\cs_new_protected:cpn { @@_Catalog/MarkInfo_gpush: }
+\cs_new_protected:cpn { @@_/Catalog/MarkInfo_gpush: }
{
\prop_if_empty:cF
{ \@@_prop_name:n { Catalog/MarkInfo } }
{
- \@@_backend_object_new:nn { g_@@_Catalog/MarkInfo_obj } { dict }
+ \@@_backend_object_new:nn { g_@@_/Catalog/MarkInfo_obj } { dict }
\exp_args:Nnx
\@@_backend_object_write:nn
- { g_@@_Catalog/MarkInfo_obj }
+ { g_@@_/Catalog/MarkInfo_obj }
{ \@@_prop_map_dict_item:n {Catalog/MarkInfo } }
\exp_args:Nnx
\@@_backend_catalog_gput:nn
{MarkInfo}
{
- \@@_backend_object_ref:n {g_@@_Catalog/MarkInfo_obj}
+ \@@_backend_object_ref:n {g_@@_/Catalog/MarkInfo_obj}
}
}
}
@@ -2219,36 +2226,36 @@
% \end{description}
% The /D entry is also a config, it is the first of the seq.
% The overall structure is nested: a dict with arrays.
-% \begin{macro}{\@@_Catalog/OCProperties_gpush:}
+% \begin{macro}{\@@_/Catalog/OCProperties_gpush:}
% \begin{macrocode}
% Catalog/OCProperties: OCGs + D is required
-\cs_new_protected:cpn { @@_Catalog/OCProperties_gpush: }
+\cs_new_protected:cpn { @@_/Catalog/OCProperties_gpush: }
{
- \int_compare:nNnT
+ \int_compare:nNnT
{
- ( \seq_count:c { g_@@_Catalog/OCProperties/OCGs_seq } )*
- ( \seq_count:c { g_@@_Catalog/OCProperties/Configs_seq } )
+ ( \seq_count:c { g_@@_/Catalog/OCProperties/OCGs_seq } )*
+ ( \seq_count:c { g_@@_/Catalog/OCProperties/Configs_seq } )
}
>
{ 0 }
{
- \@@_backend_object_new:nn { g_@@_Catalog/OCProperties_obj } { dict }
- \seq_gpop_left:cN { g_@@_Catalog/OCProperties/Configs_seq} \l_tmpa_tl
+ \@@_backend_object_new:nn { g_@@_/Catalog/OCProperties_obj } { dict }
+ \seq_gpop_left:cN { g_@@_/Catalog/OCProperties/Configs_seq} \l_tmpa_tl
\exp_args:Nnx
- \@@_backend_object_write:nn {g_@@_Catalog/OCProperties_obj}
+ \@@_backend_object_write:nn {g_@@_/Catalog/OCProperties_obj}
{
- /OCGs~[ \seq_use:cn { g_@@_Catalog/OCProperties/OCGs_seq } {~} ]
+ /OCGs~[ \seq_use:cn { g_@@_/Catalog/OCProperties/OCGs_seq } {~} ]
/D~\l_tmpa_tl~
- \seq_if_empty:cF { g_@@_Catalog/OCProperties/Configs_seq }
+ \seq_if_empty:cF { g_@@_/Catalog/OCProperties/Configs_seq }
{
/Configs~
- [ \seq_use:cn { g_@@_Catalog/OCProperties/Configs_seq} {~} ]
+ [ \seq_use:cn { g_@@_/Catalog/OCProperties/Configs_seq} {~} ]
}
}
\exp_args:Nnx
\@@_backend_catalog_gput:nn
{ OCProperties }
- { \@@_backend_object_ref:n {g_@@_Catalog/OCProperties_obj} }
+ { \@@_backend_object_ref:n {g_@@_/Catalog/OCProperties_obj} }
}
}
% \end{macrocode}
@@ -2256,23 +2263,23 @@
%
% \paragraph{Building catalog entries: OutputIntents}
% OutputIntents is an array.
-% \begin{macro}{\@@_Catalog/OutputIntents_gpush:}
+% \begin{macro}{\@@_/Catalog/OutputIntents_gpush:}
% \begin{macrocode}
-\cs_new_protected:cpn { @@_Catalog/OutputIntents_gpush: }
+\cs_new_protected:cpn { @@_/Catalog/OutputIntents_gpush: }
{
\seq_if_empty:cF
{ g_@@_/Catalog/OutputIntents_seq }
{
- \@@_backend_object_new:nn { g_@@_Catalog/OutputIntents_obj } { array }
+ \@@_backend_object_new:nn { g_@@_/Catalog/OutputIntents_obj } { array }
\exp_args:Nnx
\@@_backend_object_write:nn
- { g_@@_Catalog/OutputIntents_obj }
+ { g_@@_/Catalog/OutputIntents_obj }
{ \seq_use:cn { g_@@_/Catalog/OutputIntents_seq } {~} }
\exp_args:Nnx
\@@_backend_catalog_gput:nn
{OutputIntents}
{
- \@@_backend_object_ref:n {g_@@_Catalog/OutputIntents_obj}
+ \@@_backend_object_ref:n {g_@@_/Catalog/OutputIntents_obj}
}
}
}
@@ -2281,23 +2288,23 @@
%
% \paragraph{Building catalog entries: Requirements}
% Requirements is an array.
-% \begin{macro}{\@@_Catalog/Requirements _gpush:}
+% \begin{macro}{\@@_/Catalog/Requirements _gpush:}
% \begin{macrocode}
-\cs_new_protected:cpn { @@_Catalog/Requirements _gpush: }
+\cs_new_protected:cpn { @@_/Catalog/Requirements _gpush: }
{
\seq_if_empty:cF
{ g_@@_/Catalog/Requirements _seq }
{
- \@@_backend_object_new:nn { g_@@_Catalog/Requirements _obj } { array }
+ \@@_backend_object_new:nn { g_@@_/Catalog/Requirements _obj } { array }
\exp_args:Nnx
\@@_backend_object_write:nn
- { g_@@_Catalog/Requirements_obj }
+ { g_@@_/Catalog/Requirements_obj }
{ \seq_use:cn { g_@@_/Catalog/Requirements_seq } {~} }
\exp_args:Nnx
\@@_backend_catalog_gput:nn
{Requirements}
{
- \@@_backend_object_ref:n {g_@@_Catalog/Requirements_obj}
+ \@@_backend_object_ref:n {g_@@_/Catalog/Requirements_obj}
}
}
}
@@ -2305,23 +2312,23 @@
% \end{macro}
%
% \paragraph{Building catalog entries: ViewerPreferences}
-% \begin{macro}{\@@_Catalog/ViewerPreferences_gpush:}
+% \begin{macro}{\@@_/Catalog/ViewerPreferences_gpush:}
% \begin{macrocode}
-\cs_new_protected:cpn { @@_Catalog/ViewerPreferences_gpush: }
+\cs_new_protected:cpn { @@_/Catalog/ViewerPreferences_gpush: }
{
\prop_if_empty:cF
{ \@@_prop_name:n { Catalog/ViewerPreferences } }
{
- \@@_backend_object_new:nn { g_@@_Catalog/ViewerPreferences_obj } { dict }
+ \@@_backend_object_new:nn { g_@@_/Catalog/ViewerPreferences_obj } { dict }
\exp_args:Nnx
\@@_backend_object_write:nn
- { g_@@_Catalog/ViewerPreferences_obj }
+ { g_@@_/Catalog/ViewerPreferences_obj }
{ \@@_prop_map_dict_item:n {Catalog/ViewerPreferences } }
\exp_args:Nnx
\@@_backend_catalog_gput:nn
{ViewerPreferences}
{
- \@@_backend_object_ref:n {g_@@_Catalog/ViewerPreferences_obj}
+ \@@_backend_object_ref:n {g_@@_/Catalog/ViewerPreferences_obj}
}
}
}
@@ -2485,7 +2492,7 @@
% \section{Document metadata}
% We plan a \cs{DeclareDocumentMetaData} so let's start with it.
% It should allow to set the version, to uncompress a pdf, and set the language.
-% \begin{Function}[added=2019-08-25]{\DeclareDocumentMetaData}
+% \begin{function}[added=2019-08-25]{\DeclareDocumentMetaData}
% \begin{macrocode}
\NewDocumentCommand\DeclareDocumentMetaData { m }
{
@@ -2511,7 +2518,7 @@
}
% \end{macrocode}
-% \end{macro}
+% \end{function}
% \section{Hook management}
% hooks are commands that allow users and other packages to inject code.
diff --git a/testfiles-pool/catalogAF.pvt b/testfiles-pool/catalogAF.pvt
deleted file mode 100644
index e6ac6aa..0000000
--- a/testfiles-pool/catalogAF.pvt
+++ /dev/null
@@ -1,14 +0,0 @@
-\PassOptionsToPackage{enable-debug,check-declarations}{expl3}
-\RequirePackage[debug]{pdfresources}
-\input{regression-test}
-\documentclass{article}
-\ExplSyntaxOn
-%senseless values ...
-\pdf_catalog_AF_gput:n {(testAF1)}
-\pdf_catalog_AF_gput:n {(testAF2)}
-\pdf_catalog_AF_gput_left:n {(testAF0)}
-\ExplSyntaxOff
-\begin{document}
-\START
-some text
-\end{document}
\ No newline at end of file
diff --git a/testfiles-pool/ocproperties.pvt b/testfiles-pool/ocproperties.pvt
index 44a8f6b..0ce7bbb 100644
--- a/testfiles-pool/ocproperties.pvt
+++ b/testfiles-pool/ocproperties.pvt
@@ -1,20 +1,60 @@
+\PassOptionsToPackage{enable-debug,check-declarations}{expl3}
+\RequirePackage[debug]{pdfresources}
+\DeclareDocumentMetaData
+ {
+ pdfversion=1.7, %not so good with pdftex ...
+ lang=de-DE,
+ uncompress
+ }
\input{regression-test}
\documentclass{article}
\usepackage{pdfresources}
\ExplSyntaxOn
-
%some senseless additions to test the commands
-\pdf_catalog_OCProperties_OCGs_gput:n{1~0~R}
-\pdf_catalog_OCProperties_OCGs_gput:n{2~0~R}
-\pdf_catalog_OCProperties_Configs_gput:n {99~0~R}
-\pdf_catalog_OCProperties_Configs_gput:n {100~0~R}
-\pdf_catalog_OCProperties_Configs_gput:n {101~0~R}
-%sets the /D-entries
-\pdf_catalog_OCProperties_Configs_default_gput:n{102~0~R}
+\pdf_object_new:nn {ocg1}{dict}
+\pdf_object_write:nn {ocg1}
+ {/Type/OCG
+ /Name(View)
+ /Usage
+ <<
+ /Print
+ <<
+ /PrintState/OFF
+ >>
+ /View
+ <<
+ /ViewState/ON
+ >>
+ >>}
+
+
+\pdf_object_new:nn {ocg2}{dict}
+\pdf_object_write:nn {ocg1}
+ {/Type/OCG
+ /Name(View)
+ /Usage<<
+ /Print
+ <<
+ /PrintState/ON
+ >>
+ /View<<
+ /ViewState/OFF
+ >>
+ >>
+ }
+
+\pdf_object_new:nn {ocgd}{dict}
+\pdf_object_write:nn {ocgd}
+ {
+ /OFF /Blabla
+ }
+
+\pdf_catalog_gput:nn {OCProperties/OCGs}{ocg1}
+\pdf_catalog_gput:nn {OCProperties/OCGs}{ocg2}
+\pdf_catalog_gput:nn {OCProperties/D}{ocgd}
+
\ExplSyntaxOff
\begin{document}
abc
-
-
\end{document}
diff --git a/testfiles-pool/catalogAF.luatex.tpf b/testfiles/catalogAF.luatex.tpf
similarity index 66%
rename from testfiles-pool/catalogAF.luatex.tpf
rename to testfiles/catalogAF.luatex.tpf
index 10e9ace..1221f3e 100644
--- a/testfiles-pool/catalogAF.luatex.tpf
+++ b/testfiles/catalogAF.luatex.tpf
@@ -1,6 +1,12 @@
-%PDF-1.5
+%PDF-2.0
%ÌÕÁÔÅØÐÄÆ
-8 0 obj
+5 0 obj
+<< /Type/Filespec/UF(example1.pdf) >>
+endobj
+6 0 obj
+<< /Type/Filespec/UF(example2.pdf) >>
+endobj
+9 0 obj
<< /Length 132 >>
stream
BT
@@ -10,43 +16,24 @@ BT
ET
endstream
endobj
-7 0 obj
-<< /Type /Page /Contents 8 0 R /Resources 6 0 R /MediaBox [ 0 0 595.276 841.89 ] /Parent 10 0 R >>
-endobj
-6 0 obj
-<< /ExtGState 1 0 R /ColorSpace 2 0 R /Pattern 3 0 R /Shading 4 0 R /Properties 5 0 R /Font << /F25 9 0 R >> /ProcSet [ /PDF /Text ] >>
-endobj
-1 0 obj
-<< >>
-endobj
-2 0 obj
-<< >>
-endobj
-3 0 obj
-<< >>
-endobj
-4 0 obj
-<< >>
-endobj
-5 0 obj
-<< >>
+8 0 obj
+<< /Type /Page /Contents 9 0 R /Resources 7 0 R /MediaBox [ 0 0 595.276 841.89 ] /Parent 11 0 R >>
endobj
-11 0 obj
-[ (testAF0) (testAF1) (testAF2) ]
+7 0 obj
+<< /Font << /F25 10 0 R >> >>
endobj
12 0 obj
-[ 50 [ 444 ] 75 [ 833 ] 81 [ 500 500 ] 98 [ 394 ] 105 [ 389 ] 116 [ 528 ] ]
+[ 5 0 R 6 0 R ]
endobj
-14 0 obj
-<< /Length 15 >>
-[BINARY STREAM]
+13 0 obj
+[ 50 [ 444 ] 75 [ 833 ] 81 [ 500 500 ] 98 [ 394 ] 105 [ 389 ] 116 [ 528 ] ]
endobj
15 0 obj
<< /Subtype /CIDFontType0C /Length 1413 >>
[BINARY STREAM]
endobj
-13 0 obj
-<< /Type /FontDescriptor /FontName /KRCLMV+LMRoman10-Regular /Flags 4 /FontBBox [ -430 -290 1417 1127 ] /Ascent 1127 /CapHeight 683 /Descent -290 /ItalicAngle 0 /StemV 93 /XHeight 431 /FontFile3 15 0 R /CIDSet 14 0 R >>
+14 0 obj
+<< /Type /FontDescriptor /FontName /KRCLMV+LMRoman10-Regular /Flags 4 /FontBBox [ -430 -290 1417 1127 ] /Ascent 1127 /CapHeight 683 /Descent -290 /ItalicAngle 0 /StemV 93 /XHeight 431 /FontFile3 15 0 R >>
endobj
16 0 obj
<< /Length 776 >>
@@ -90,45 +77,45 @@ end
%%EOF
endstream
endobj
-9 0 obj
+10 0 obj
<< /Type /Font /Subtype /Type0 /Encoding /Identity-H /BaseFont /KRCLMV+LMRoman10-Regular /DescendantFonts [ 17 0 R ] /ToUnicode 16 0 R >>
endobj
17 0 obj
-<< /Type /Font /Subtype /CIDFontType0 /BaseFont /KRCLMV+LMRoman10-Regular /FontDescriptor 13 0 R /W 12 0 R /CIDSystemInfo << /Registry (Adobe) /Ordering (Identity) /Supplement 0 >> >>
+<< /Type /Font /Subtype /CIDFontType0 /BaseFont /KRCLMV+LMRoman10-Regular /FontDescriptor 14 0 R /W 13 0 R /CIDSystemInfo << /Registry (Adobe) /Ordering (Identity) /Supplement 0 >> >>
endobj
-10 0 obj
-<< /Type /Pages /Count 1 /Kids [ 7 0 R ] >>
+11 0 obj
+<< /Type /Pages /Count 1 /Kids [ 8 0 R ] >>
endobj
18 0 obj
-<< /Type /Catalog /Pages 10 0 R /AF 11 0 R >>
+<< /Type /Catalog /Pages 11 0 R /AF 12 0 R/Lang (de-DE) >>
endobj
19 0 obj
<< /Producer (LuaTeX) /Creator (TeX) /Trapped /False >>
endobj
xref
0 20
-0000000000 65535 f
-0000000477 00000 n
-0000000499 00000 n
-0000000521 00000 n
-0000000543 00000 n
-0000000565 00000 n
-0000000325 00000 n
-0000000211 00000 n
+0000000001 65535 f
+0000000002 00000 f
+0000000003 00000 f
+0000000004 00000 f
+0000000000 00000 f
0000000020 00000 n
-0000003373 00000 n
-0000003726 00000 n
-0000000587 00000 n
-0000000637 00000 n
-0000002301 00000 n
-0000000729 00000 n
-0000000804 00000 n
-0000002537 00000 n
-0000003526 00000 n
-0000003787 00000 n
-0000003849 00000 n
+0000000073 00000 n
+0000000431 00000 n
+0000000317 00000 n
+0000000126 00000 n
+0000003154 00000 n
+0000003508 00000 n
+0000000476 00000 n
+0000000508 00000 n
+0000002097 00000 n
+0000000600 00000 n
+0000002318 00000 n
+0000003308 00000 n
+0000003569 00000 n
+0000003644 00000 n
trailer
<< /Size 20 /Root 18 0 R /Info 19 0 R >>
startxref
-3921
+3716
%%EOF
diff --git a/testfiles/catalogAF.pvt b/testfiles/catalogAF.pvt
new file mode 100644
index 0000000..b58fb22
--- /dev/null
+++ b/testfiles/catalogAF.pvt
@@ -0,0 +1,24 @@
+\PassOptionsToPackage{enable-debug,check-declarations}{expl3}
+\RequirePackage[debug]{pdfresources}
+\DeclareDocumentMetaData
+ {
+ pdfversion=2.0, %not so good with pdftex ...
+ lang=de-DE,
+ uncompress
+ }
+\input{regression-test}
+\documentclass{article}
+\ExplSyntaxOn
+%senseless values ...
+\pdf_object_new:nn {filespec1}{dict}
+\pdf_object_write:nn {filespec1} {/Type /Filespec /UF (example1.pdf)}
+\pdf_object_new:nn {filespec2}{dict}
+\pdf_object_write:nn {filespec2} {/Type /Filespec /UF (example2.pdf)}
+
+\pdf_catalog_gput:nn {AF} {filespec1}
+\pdf_catalog_gput:nn {AF} {filespec2}
+\ExplSyntaxOff
+\begin{document}
+\START
+some text
+\end{document}
\ No newline at end of file
diff --git a/testfiles-pool/catalogAF.tpf b/testfiles/catalogAF.tpf
similarity index 63%
rename from testfiles-pool/catalogAF.tpf
rename to testfiles/catalogAF.tpf
index a8339e7..d435604 100644
--- a/testfiles-pool/catalogAF.tpf
+++ b/testfiles/catalogAF.tpf
@@ -1,6 +1,12 @@
-%PDF-1.5
+%PDF-1.0
%ÐÔÅØ
-8 0 obj
+5 0 obj
+<< /Type/Filespec/UF(example1.pdf) >>
+endobj
+6 0 obj
+<< /Type/Filespec/UF(example2.pdf) >>
+endobj
+9 0 obj
<<
/Length 91
>>
@@ -10,44 +16,28 @@ BT
ET
endstream
endobj
-7 0 obj
+8 0 obj
<<
/Type /Page
-/Contents 8 0 R
-/Resources 6 0 R
+/Contents 9 0 R
+/Resources 7 0 R
/MediaBox [0 0 595.276 841.89]
-/Parent 10 0 R
+/Parent 11 0 R
>>
endobj
-6 0 obj
+7 0 obj
<<
-/ExtGState 1 0 R /ColorSpace 2 0 R /Pattern 3 0 R /Shading 4 0 R /Properties 5 0 R
-/Font << /F8 9 0 R >>
+/Font << /F8 10 0 R >>
/ProcSet [ /PDF /Text ]
>>
endobj
-1 0 obj
-<< >>
-endobj
-2 0 obj
-<< >>
-endobj
-3 0 obj
-<< >>
-endobj
-4 0 obj
-<< >>
-endobj
-5 0 obj
-<< >>
-endobj
-11 0 obj
-[ (testAF0) (testAF1) (testAF2) ]
-endobj
12 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 527.8 722.2 527.8]
+[ 5 0 R 6 0 R ]
endobj
13 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 527.8 722.2 527.8]
+endobj
+14 0 obj
<<
/Length1 1455
/Length2 9286
@@ -56,7 +46,7 @@ endobj
>>
[BINARY STREAM]
endobj
-14 0 obj
+15 0 obj
<<
/Type /FontDescriptor
/FontName /CTWJDN+CMR10
@@ -69,35 +59,35 @@ endobj
/StemV 69
/XHeight 431
/CharSet (/e/m/o/one/s/t/x)
-/FontFile 13 0 R
+/FontFile 14 0 R
>>
endobj
-9 0 obj
+10 0 obj
<<
/Type /Font
/Subtype /Type1
/BaseFont /CTWJDN+CMR10
-/FontDescriptor 14 0 R
+/FontDescriptor 15 0 R
/FirstChar 49
/LastChar 120
-/Widths 12 0 R
+/Widths 13 0 R
>>
endobj
-10 0 obj
+11 0 obj
<<
/Type /Pages
/Count 1
-/Kids [7 0 R]
+/Kids [8 0 R]
>>
endobj
-15 0 obj
+16 0 obj
<<
/Type /Catalog
-/Pages 10 0 R
-/AF 11 0 R
+/Pages 11 0 R
+/AF 12 0 R/Lang (de-DE)
>>
endobj
-16 0 obj
+17 0 obj
<<
/Producer (pdfTeX)
/Creator (TeX)
@@ -105,29 +95,30 @@ endobj
>>
endobj
xref
-0 17
-0000000000 65535 f
-0000000427 00000 n
-0000000449 00000 n
-0000000471 00000 n
-0000000493 00000 n
-0000000515 00000 n
-0000000276 00000 n
-0000000164 00000 n
+0 18
+0000000001 65535 f
+0000000002 00000 f
+0000000003 00000 f
+0000000004 00000 f
+0000000000 00000 f
0000000015 00000 n
-0000012064 00000 n
-0000012203 00000 n
-0000000537 00000 n
-0000000587 00000 n
-0000000994 00000 n
-0000011833 00000 n
-0000012261 00000 n
-0000012323 00000 n
+0000000068 00000 n
+0000000382 00000 n
+0000000270 00000 n
+0000000121 00000 n
+0000011959 00000 n
+0000012099 00000 n
+0000000450 00000 n
+0000000482 00000 n
+0000000889 00000 n
+0000011728 00000 n
+0000012157 00000 n
+0000012232 00000 n
trailer
-<< /Size 17
-/Root 15 0 R
-/Info 16 0 R
+<< /Size 18
+/Root 16 0 R
+/Info 17 0 R
>>
startxref
-12395
+12304
%%EOF
diff --git a/testfiles/pagesattr.xetex.tpf b/testfiles/catalogAF.xetex.tpf
similarity index 63%
copy from testfiles/pagesattr.xetex.tpf
copy to testfiles/catalogAF.xetex.tpf
index 404e598..b134f95 100644
--- a/testfiles/pagesattr.xetex.tpf
+++ b/testfiles/catalogAF.xetex.tpf
@@ -1,13 +1,13 @@
-%PDF-1.5
+%PDF-2.0
%äðíø
-10 0 obj
+13 0 obj
<</Length 137>>
stream
q 1 0 0 1 72 769.89 cm BT /F1 9.9626 Tf 76.712 -62.765 Td[<00620051004b0032>-333<0069003200740069>]TJ 154.421 -567.87 Td[<0052>]TJ ET Q
endstream
endobj
-11 0 obj
-<</ExtGState 4 0 R/ColorSpace 5 0 R/Pattern 6 0 R/Shading 7 0 R/Font<</F1 9 0 R>>/ProcSet[/PDF/Text/ImageC/ImageB/ImageI]>>
+14 0 obj
+<</ExtGState 4 0 R/ColorSpace 5 0 R/Pattern 6 0 R/Shading 7 0 R/Font<</F1 12 0 R>>/ProcSet[/PDF/Text/ImageC/ImageB/ImageI]>>
endobj
4 0 obj
<<>>
@@ -21,20 +21,28 @@ endobj
7 0 obj
<<>>
endobj
+8 0 obj
+<</Type/Filespec/UF(example1.pdf)>>
+endobj
+9 0 obj
+<</Type/Filespec/UF(example2.pdf)>>
+endobj
+10 0 obj
+[8 0 R 9 0 R]
+endobj
3 0 obj
-<</Resources 11 0 R/Type/Page/Parent 12 0 R/Contents[10 0 R]>>
+<</Resources 14 0 R/Type/Page/Parent 15 0 R/Contents[13 0 R]>>
endobj
-12 0 obj
-<</YYY(y22)/ZZZ(zzz)/SSS(somesetting)/Type/Pages/Count 1/Kids[3 0 R]/MediaBox[0 0
-595.28 841.89]>>
+15 0 obj
+<</Type/Pages/Count 1/Kids[3 0 R]/MediaBox[0 0 595.28 841.89]>>
endobj
2 0 obj
<</Creator(TeX)/Producer(xdvipdfmx)/CreationDate(D:20160520090000-00'00')>>
endobj
1 0 obj
-<</Pages 12 0 R/Type/Catalog>>
+<</AF 10 0 R/Lang(de-DE)/Pages 15 0 R/Type/Catalog>>
endobj
-13 0 obj
+16 0 obj
<</Length 440>>
stream
/CIDInit /ProcSet findresource begin
@@ -65,53 +73,56 @@ end
end
endstream
endobj
-15 0 obj
+18 0 obj
<</Subtype/CIDFontType0C/Length 1387>>
[BINARY STREAM]
endobj
-16 0 obj
+19 0 obj
[50[444]75[833]81[500 500]98[394]105[389]116[528]]
endobj
-17 0 obj
+20 0 obj
<</Length 15>>
[BINARY STREAM]
endobj
-8 0 obj
+11 0 obj
<</Type/Font/Subtype/CIDFontType0/BaseFont/APWWDF+LMRoman10-Regular/CIDSystemInfo<</Registry(Adobe)/Ordering(Identity)/Supplement
-0>>/FontDescriptor 14 0 R/DW 280/W 16 0 R>>
+0>>/FontDescriptor 17 0 R/DW 280/W 19 0 R>>
endobj
-14 0 obj
+17 0 obj
<</Type/FontDescriptor/Ascent 806/Descent -194/StemV 69/CapHeight 806/AvgWidth 549/FontBBox[-430
-290 1417 1127]/ItalicAngle 0/Flags 6/Style<</Panose<000000000500000000000000>>>/FontName/APWWDF+LMRoman10-Regular/FontFile3
-15 0 R/CIDSet 17 0 R>>
+18 0 R/CIDSet 20 0 R>>
endobj
-9 0 obj
-<</Type/Font/Subtype/Type0/BaseFont/APWWDF+LMRoman10-Regular-Identity-H/Encoding/Identity-H/DescendantFonts[8 0 R]/ToUnicode
-13 0 R>>
+12 0 obj
+<</Type/Font/Subtype/Type0/BaseFont/APWWDF+LMRoman10-Regular-Identity-H/Encoding/Identity-H/DescendantFonts[11 0 R]/ToUnicode
+16 0 R>>
endobj
xref
-0 18
+0 21
0000000000 65535 f
-0000000706 00000 n
-0000000615 00000 n
-0000000422 00000 n
-0000000342 00000 n
-0000000362 00000 n
-0000000382 00000 n
-0000000402 00000 n
-0000002833 00000 n
-0000003283 00000 n
+0000000804 00000 n
+0000000713 00000 n
+0000000555 00000 n
+0000000343 00000 n
+0000000363 00000 n
+0000000383 00000 n
+0000000403 00000 n
+0000000423 00000 n
+0000000474 00000 n
+0000000525 00000 n
+0000002953 00000 n
+0000003404 00000 n
0000000015 00000 n
0000000202 00000 n
-0000000500 00000 n
-0000000752 00000 n
-0000003022 00000 n
-0000001242 00000 n
-0000002702 00000 n
-0000002769 00000 n
+0000000633 00000 n
+0000000872 00000 n
+0000003143 00000 n
+0000001362 00000 n
+0000002822 00000 n
+0000002889 00000 n
trailer
-<</Root 1 0 R/Info 2 0 R/ID[<6c384a59e70ac0b4d4e66a031726ce1c><6c384a59e70ac0b4d4e66a031726ce1c>]/Size
-18>>
+<</Root 1 0 R/Info 2 0 R/ID[<26499a6974bf884402cef9e19dfde92e><26499a6974bf884402cef9e19dfde92e>]/Size
+21>>
startxref
-3432
+3555
%%EOF
More information about the latex3-commits
mailing list