diff options
author | Karl Berry <karl@freefriends.org> | 2024-04-10 20:21:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-04-10 20:21:36 +0000 |
commit | fdea68d1bec6e8047ce0277d826a5b695ac7de78 (patch) | |
tree | 22d1de166edb8fc22a13c1715df4468c4cdc047f /Master/texmf-dist/source | |
parent | 8d902558d89c24660ff18e655ab3f91770b16948 (diff) |
pdfmanagement-testphase (10apr24)
git-svn-id: svn://tug.org/texlive/trunk@70907 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
19 files changed, 415 insertions, 90 deletions
diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx index 91dbb1d88a9..d6595449fed 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx @@ -82,7 +82,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -964,7 +964,7 @@ %<@@=hyp> % \end{macrocode} % \begin{macrocode} -\ProvidesFile{hgeneric-testphase.def}[2024-03-26 v0.96g % +\ProvidesFile{hgeneric-testphase.def}[2024-04-09 v0.96h % generic Hyperref driver for the LaTeX PDF management testphase bundle] \RequirePackage{etoolbox} %why? diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3backend-testphase.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3backend-testphase.dtx index d7c0d8d9300..75e944cf828 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3backend-testphase.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3backend-testphase.dtx @@ -45,7 +45,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % @@ -56,27 +56,27 @@ % \begin{macrocode} %<drivers>\ProvidesExplFile %<*dvipdfmx> - {l3backend-testphase-dvipdfmx.def}{2024-03-26}{} + {l3backend-testphase-dvipdfmx.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx} %</dvipdfmx> %<*dvips> - {l3backend-testphase-dvips.def}{2024-03-26}{} + {l3backend-testphase-dvips.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvips} %</dvips> %<*dvisvgm> - {l3backend-testphase-dvisvgm.def}{2024-03-26}{} + {l3backend-testphase-dvisvgm.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm} %</dvisvgm> %<*luatex> - {l3backend-testphase-luatex.def}{2024-03-26}{} + {l3backend-testphase-luatex.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)} %</luatex> %<*pdftex> - {l3backend-testphase-pdftex.def}{2024-03-26}{} + {l3backend-testphase-pdftex.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)} %</pdftex> %<*xdvipdfmx> - {l3backend-testphase-xetex.def}{2024-03-26}{} + {l3backend-testphase-xetex.def}{2024-04-09}{} {LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX} %</xdvipdfmx> % \end{macrocode} @@ -205,7 +205,7 @@ %</drivers> % \end{macrocode} % \end{variable} -% + % \begin{variable} % {\g_@@_backend_resourceid_int, \g_@@_backend_name_int, \g_@@_backend_page_int} % a counter to create labels for the resources, a counter @@ -218,6 +218,7 @@ %</drivers> % \end{macrocode} % \end{variable} +% % \subsection{luacode} % Load the lua code. % \begin{macrocode} @@ -348,7 +349,6 @@ % \begin{NOTE}{UF} % path: Page % !!!!!!!!!!!!!!!!!!!!!! -% This part of the code depends on l3ref-tmp as it sets labels. % It also depends on code in l3pdfmanagement as the code uses the Core-dictionaries % !!!!!!!!!!!!!!!!!!!!!! % @@ -671,7 +671,7 @@ { ltx.@@.object["@@/Page/Resources/#1"] = - "\@@_backend_object_ref:n{@@/Page/Resources/#1}" + "\pdf_object_ref:n{@@/Page/Resources/#1}" } } } @@ -751,7 +751,7 @@ %objects are not filled with \pdf_object_write as this is not additive! \@@_backend:e { - put~\@@_backend_object_ref:n {@@/Page/Resources/#1}<</#2~#3>> + put~\pdf_object_ref:n {@@/Page/Resources/#1}<</#2~#3>> } } @@ -783,6 +783,7 @@ % \end{macrocode} % \end{macro} % \end{macro} +% % \subsubsection{Page resources /Properties + BDC operators} % \begin{macro} % { @@ -830,7 +831,7 @@ \cs_set_protected:Npn \@@_backend_bdcobject:nn #1 #2 % #1 eg. Span, #2: object name { - \@@_backend_pdfmark:e{/#1~\@@_backend_object_ref:n{#2}~/BDC} + \@@_backend_pdfmark:e{/#1~\pdf_object_ref:n{#2}~/BDC} } \cs_set_protected:Npn \@@_backend_bdcobject:n #1 % #1 eg. Span, { @@ -890,7 +891,7 @@ /Properties~ << /l3pdf\int_use:N\g_@@_backend_name_int\c_space_tl - \@@_backend_object_ref:n { #2 } + \pdf_object_ref:n { #2 } >> >> } @@ -962,7 +963,7 @@ \__kernel_backend_literal:e { pdf:put~@resources~ - <</##1~\@@_backend_object_ref:n {@@/Page/Resources/##1}>> + <</##1~\pdf_object_ref:n {@@/Page/Resources/##1}>> } } } @@ -980,7 +981,7 @@ \pdfdict_gput:nee { g_@@_Core/Xform/Resources/Properties } { l3pdf\int_use:N\g_@@_backend_name_int } - { \@@_backend_object_ref:n { #2 } } + { \pdf_object_ref:n { #2 } } } { \exp_args:Ne \tex_latelua:D @@ -989,7 +990,7 @@ ( tex.count["g_shipout_readonly_int"], "l3pdf\int_use:N\g_@@_backend_name_int", - "\@@_backend_object_ref:n { #2 }" + "\pdf_object_ref:n { #2 }" ) } } @@ -1071,7 +1072,7 @@ \pdfdict_gput:nee %no handler needed { g_@@_Core/Xform/Resources/Properties } { l3pdf\int_use:N\g_@@_backend_resourceid_int } - { \@@_backend_object_ref:n { #2 } } + { \pdf_object_ref:n { #2 } } } { \@@_backend_record_abspage:e {l3pdf\int_use:N\g_@@_backend_resourceid_int} @@ -1086,7 +1087,7 @@ \pdfdict_gput:nee { g_@@_Core/backend_Page\l_@@_tmpa_tl/Resources/Properties } { l3pdf\int_use:N\g_@@_backend_resourceid_int } - { \@@_backend_object_ref:n{#2} } + { \pdf_object_ref:n{#2} } } } \cs_set_protected:Npn \@@_backend_bdcobject:n #1% #1 eg. Span @@ -1188,6 +1189,7 @@ %</pdftex> % \end{macrocode} % \end{macro} +% % \subsection{\enquote{Catalog} \& subdirectories (pdfcatalog) } % The backend command is already in the driver: % \cs{@@_backend_catalog_gput:nn} @@ -1235,6 +1237,7 @@ % EmbeddedFiles is a bit special. % For once we need backend commands for dvips. % But we want also an option to create the name on the fly. +% % \begin{macro}{\@@_backend_NamesEmbeddedFiles_add:nn} % dvips need special backend code to create the name tree. % With the other engines it does nothing. @@ -1261,6 +1264,7 @@ %</dvisvgm> % \end{macrocode} % \end{macro} +% % \subsubsection{Additional annotation commands} % Starting with texlive 2021 pdftex and luatex offer commands to interrupt % a link. That can for example be used to exclude the header and footer from @@ -1734,6 +1738,7 @@ % \end{macrocode} % \end{macro} % \end{macro} +% % \subsection{Structure Destinations} % Standard destinations consist of a reference to a page in the pdf and instructions % how to display it---typically they will put a specific location in the left top corner @@ -1757,14 +1762,22 @@ % that if structure destinations are used, they should be used always. So we define % alternative commands which can be activated by mapping them to the standard backend commands. % +% The needed code differ depending on if structure objects use standard or indexed object names. +% At the end we will probably always use indexed objects, but for now we offer +% both options. +% % \begin{macro}{\l_pdf_current_structure_destination_tl} % -% This commands holds the name of the structure object to use in the next command +% This command holds the name of the structure object to use in the following commands % which creates a destination. The code which activates structure destinations % must also ensure that it has a sensible, expandable content. \pkg{tagpdf} for example % will define it as % \begin{verbatim} % \tl_set:Nn \l_pdf_current_structure_destination_tl { __tag/struct/\g__tag_struct_stack_current_tl } +% \end{verbatim} +% or if indexed structure object names are used +% \begin{verbatim} +% \tl_set:Nn \l_pdf_current_structure_destination_tl { {__tag/struct}{\g__tag_struct_stack_current_tl} } % \end{verbatim} % \begin{macrocode} %<*drivers> @@ -1778,19 +1791,28 @@ % \__pdf_backend_destination:nn -> \__pdf_backend_structure_destination:nn % \__pdf_backend_destination:nnnn -> \__pdf_backend_structure_destination:nnnn % \__pdf_backend_link_begin_goto:nnw -> \__pdf_backend_link_begin_structure_goto:nnw +% \__pdf_backend_destination:nn -> \__pdf_backend_indexed_structure_destination:nn +% \__pdf_backend_destination:nnnn -> \__pdf_backend_indexed_structure_destination:nnnn +% \__pdf_backend_link_begin_goto:nnw -> \__pdf_backend_indexed_link_begin_structure_goto:nnw % \end{verbatim} % % Activating means mapping them onto the original commands. Be aware that not % all engines and compilation routes support structure destinations, for them % the command will be a no-op. % -% \begin{macro}{\pdf_activate_structure_destination:} +% \begin{macro}{\pdf_activate_structure_destination:,\pdf_activate_indexed_structure_destination:} % \begin{macrocode} %<*drivers> \cs_new_protected:Npn \pdf_activate_structure_destination: { - \cs_gset_eq:NN \@@_backend_destination:nn \@@_backend_structure_destination:nn - \cs_gset_eq:NN \@@_backend_destination:nnnn \@@_backend_structure_destination:nnnn + \cs_gset_eq:NN \@@_backend_destination:nn \@@_backend_structure_destination:nn + \cs_gset_eq:NN \@@_backend_destination:nnnn \@@_backend_structure_destination:nnnn + \cs_gset_eq:NN \@@_backend_link_begin_goto:nnw \@@_backend_link_begin_structure_goto:nnw + } +\cs_new_protected:Npn \pdf_activate_indexed_structure_destination: + { + \cs_gset_eq:NN \@@_backend_destination:nn \@@_backend_indexed_structure_destination:nn + \cs_gset_eq:NN \@@_backend_destination:nnnn \@@_backend_indexed_structure_destination:nnnn \cs_gset_eq:NN \@@_backend_link_begin_goto:nnw \@@_backend_link_begin_structure_goto:nnw } %</drivers> @@ -1804,13 +1826,17 @@ % \begin{macrocode} %<*drivers> \cs_set_eq:NN \@@_backend_structure_destination:nn \@@_backend_destination:nn -\cs_set_eq:NN \@@_backend_structure_destination:nnnn \@@_backend_destination:nnnn +\cs_set_eq:NN \@@_backend_structure_destination:nnnn \@@_backend_destination:nnnn \cs_set_eq:NN \@@_backend_link_begin_structure_goto:nnw \@@_backend_link_begin_goto:nnw +\cs_set_eq:NN \@@_backend_indexed_structure_destination:nn \@@_backend_destination:nn +\cs_set_eq:NN \@@_backend_indexed_structure_destination:nnnn \@@_backend_destination:nnnn %</drivers> % \end{macrocode} -% \begin{macro}{\@@_backend_structure_destination:nn} -% This command is the backend command to create a destination. -% It should in parallel create also a structure destination. +% \begin{macro}{\@@_backend_structure_destination:nn, +% \@@_backend_structure_destination:nnnn, +% \@@_backend_link_begin_structure_goto:nnw} +% These commands are the backend commands to create a destination. +% which create also a structure destination. % At first xetex/dvipdfmx. % The structure destination is an array, so we use obj for it % so that we can reference it: @@ -1935,7 +1961,6 @@ } %</xdvipdfmx|dvipdfmx> % \end{macrocode} -% \end{macro} % Now pdftex. We only redefine for version 1.40 revision 24 or later. % \begin{macrocode} %<*pdftex> @@ -1982,7 +2007,7 @@ \scan_stop: } } - \cs_set_protected:Npn \@@_backend_destination:nnnn #1#2#3#4 + \cs_set_protected:Npn \@@_backend_structure_destination:nnnn #1#2#3#4 { \tex_pdfdest:D name {#1} @@ -2054,7 +2079,7 @@ \scan_stop: } } - \cs_set_protected:Npn \@@_backend_destination:nnnn #1#2#3#4 + \cs_set_protected:Npn \@@_backend_structure_destination:nnnn #1#2#3#4 { \tex_pdfextension:D dest name {#1} @@ -2082,6 +2107,252 @@ } %</luatex> % \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_backend_indexed_structure_destination:nn, +% \@@_backend_indexed_structure_destination:nnnn} +% This are the indexed variants of the commands to create a destination +% and a structure destination. +% At first xetex/dvipdfmx. +% The structure destination is an array, so we use obj for it +% so that we can reference it: +% \begin{macrocode} +%<*xdvipdfmx|dvipdfmx> +\cs_set_protected:Npn \@@_backend_indexed_structure_destination:nn #1#2 + { + \@@_backend:e + { + dest ~ ( \exp_not:n {#1} ) + [ + @thispage + \str_case:nnF {#2} + { + { xyz } { /XYZ ~ @xpos ~ @ypos ~ null } + { fit } { /Fit } + { fitb } { /FitB } + { fitbh } { /FitBH } + { fitbv } { /FitBV ~ @xpos } + { fith } { /FitH ~ @ypos } + { fitv } { /FitV ~ @xpos } + { fitr } { /Fit } + } + { /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } } + ] + } +% \end{macrocode} +% We do not test anymore if the structure object exist. The object of the structure destination +% gets the name \texttt{@pdf.Sdest.\meta{destname}}, where \meta{destname} is the +% name of the standard destination so that we can reference it in the GoTo links. +% \begin{macrocode} + \@@_backend:e + { + obj ~ @pdf.SDest.\exp_not:n{#1} + [ + \exp_after:wN \pdf_object_ref_indexed:nn \l_pdf_current_structure_destination_tl + \str_case:nnF {#2} + { + { xyz } { /XYZ ~ @xpos ~ @ypos ~ null } + { fit } { /Fit } + { fitb } { /FitB } + { fitbh } { /FitBH } + { fitbv } { /FitBV ~ @xpos } + { fith } { /FitH ~ @ypos } + { fitv } { /FitV ~ @xpos } + { fitr } { /Fit } + } + { /XYZ ~ @xpos ~ @ypos ~ \fp_eval:n { (#2) / 100 } } + ] + } + } +% \end{macrocode} +% +% The second destination command is for the boxed destination. Here we need to define +% an new auxiliary command: +% \begin{macrocode} +\cs_new_protected:Npn \@@_backend_indexed_structure_destination_aux:nnnn #1#2#3#4 + { + \vbox_to_zero:n + { + \__kernel_kern:n {#4} + \hbox:n + { + \@@_backend:n { obj ~ @pdf_ #2 _llx ~ @xpos } + \@@_backend:n { obj ~ @pdf_ #2 _lly ~ @ypos } + } + \tex_vss:D + } + \__kernel_kern:n {#1} + \vbox_to_zero:n + { + \__kernel_kern:n { -#3 } + \hbox:n + { + \@@_backend:n + { + dest ~ (#2) + [ + @thispage + /FitR ~ + @pdf_ #2 _llx ~ @pdf_ #2 _lly ~ + @xpos ~ @ypos + ] + } +% \end{macrocode} +% Here we add the structure destination to the same box +% \begin{macrocode} + \@@_backend:e + { + obj ~ @pdf.SDest.\exp_not:n{#2} + [ + \exp_after:wN \pdf_object_ref_indexed:nn \l_pdf_current_structure_destination_tl + /FitR ~ + @pdf_ #2 _llx ~ @pdf_ #2 _lly ~ + @xpos ~ @ypos + ] + } + } + \tex_vss:D + } + \__kernel_kern:n { -#1 } + } +% \end{macrocode} +% And now we redefine the destination command: +% \begin{macrocode} +\cs_set_protected:Npn \@@_backend_indexed_structure_destination:nnnn #1#2#3#4 + { + \exp_args:Ne \@@_backend_indexed_structure_destination_aux:nnnn + { \dim_eval:n {#2} } {#1} {#3} {#4} + } +%</xdvipdfmx|dvipdfmx> +% \end{macrocode} +% +% Now pdftex. We only redefine for version 1.40 revision 24 or later. +% \begin{macrocode} +%<*pdftex> +\bool_lazy_and:nnT + { \int_compare_p:nNn {\tex_pdftexversion:D } > {139} } + { \int_compare_p:nNn {\tex_pdftexrevision:D } > {23} } + { + \cs_set_protected:Npn \@@_backend_indexed_structure_destination:nn #1#2 + { + \tex_pdfdest:D + name {#1} + \str_case:nnF {#2} + { + { xyz } { xyz } + { fit } { fit } + { fitb } { fitb } + { fitbh } { fitbh } + { fitbv } { fitbv } + { fith } { fith } + { fitv } { fitv } + { fitr } { fitr } + } + { xyz ~ zoom \fp_eval:n { #2 * 10 } } + \scan_stop: + \tex_pdfdest:D + struct~ + \exp_after:wN \__kernel_pdf_object_id_indexed:nn \l_pdf_current_structure_destination_tl ~ + name {#1} + \str_case:nnF {#2} + { + { xyz } { xyz } + { fit } { fit } + { fitb } { fitb } + { fitbh } { fitbh } + { fitbv } { fitbv } + { fith } { fith } + { fitv } { fitv } + { fitr } { fitr } + } + { xyz ~ zoom \fp_eval:n { #2 * 10 } } + \scan_stop: + } + \cs_set_protected:Npn \@@_backend_indexed_structure_destination:nnnn #1#2#3#4 + { + \tex_pdfdest:D + name {#1} + fitr ~ + width \dim_eval:n {#2} ~ + height \dim_eval:n {#3} ~ + depth \dim_eval:n {#4} \scan_stop: + \tex_pdfdest:D + struct~ + \exp_after:wN \__kernel_pdf_object_id_indexed:nn \l_pdf_current_structure_destination_tl ~ + name {#1} + fitr ~ + width \dim_eval:n {#2} ~ + height \dim_eval:n {#3} ~ + depth \dim_eval:n {#4} \scan_stop: + } + } +%</pdftex> +% \end{macrocode} +% luatex is quite similar to pdftex. Mostly the test for the version is different +% \begin{macrocode} +%<*luatex> + \int_compare:nNnT {\directlua{tex.print(status.list()["development_id"])} } > {7468} + { + \cs_set_protected:Npn \@@_backend_indexed_structure_destination:nn #1#2 + { + \tex_pdfextension:D dest + name {#1} + \str_case:nnF {#2} + { + { xyz } { xyz } + { fit } { fit } + { fitb } { fitb } + { fitbh } { fitbh } + { fitbv } { fitbv } + { fith } { fith } + { fitv } { fitv } + { fitr } { fitr } + } + { xyz ~ zoom \fp_eval:n { #2 * 10 } } + \scan_stop: + \tex_pdfextension:D dest + struct~ + \exp_after:wN \__kernel_pdf_object_id_indexed:nn \l_pdf_current_structure_destination_tl ~ + name {#1} + \str_case:nnF {#2} + { + { xyz } { xyz } + { fit } { fit } + { fitb } { fitb } + { fitbh } { fitbh } + { fitbv } { fitbv } + { fith } { fith } + { fitv } { fitv } + { fitr } { fitr } + } + { xyz ~ zoom \fp_eval:n { #2 * 10 } } + \scan_stop: + } + \cs_set_protected:Npn \@@_backend_indexed_structure_destination:nnnn #1#2#3#4 + { + \tex_pdfextension:D dest + name {#1} + fitr ~ + width \dim_eval:n {#2} ~ + height \dim_eval:n {#3} ~ + depth \dim_eval:n {#4} \scan_stop: + \tex_pdfextension:D dest + struct~ + \exp_after:wN \__kernel_pdf_object_id_indexed:nn \l_pdf_current_structure_destination_tl~ + name {#1} + fitr ~ + width \dim_eval:n {#2} ~ + height \dim_eval:n {#3} ~ + depth \dim_eval:n {#4} \scan_stop: + } + \cs_set_protected:Npn \@@_backend_link_begin_structure_goto:nnw #1#2 + { + \@@_backend_link_begin:nnnw {#1} { goto~struct~name~{#2}~name } {#2} + } + } +%</luatex> +% \end{macrocode} +% \end{macro} % \subsection{Settings for regression tests} % When doing pdf based regression tests some meta data in the pdf should have % fixed values to get identical pdf's. We define here the backend dependant @@ -2383,5 +2654,5 @@ end %</lua> % \end{macrocode} % \end{implementation} -% +% % \PrintIndex diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx index 9b6985afad8..4b04b4308bc 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -432,7 +432,7 @@ % \begin{macrocode} %<@@=pdfannot> %<*header> -\ProvidesExplPackage{l3pdfannot}{2024-03-26}{0.96g} +\ProvidesExplPackage{l3pdfannot}{2024-04-09}{0.96h} {PDF-annotations} \RequirePackage{l3pdfdict} %</header> diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx index badac0a01bf..82d0979a025 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -208,7 +208,7 @@ % \begin{macrocode} %<@@=pdfdict> %<*header> -\ProvidesExplPackage{l3pdfdict}{2024-03-26}{0.96g} +\ProvidesExplPackage{l3pdfdict}{2024-04-09}{0.96h} {Tools for PDF dictionaries (LaTeX PDF management testphase bundle)} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-action.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-action.dtx index cd573afb4ae..6093a6d4427 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-action.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-action.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-checkbox.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-checkbox.dtx index 251c7582b29..534959fcaf5 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-checkbox.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-checkbox.dtx @@ -64,7 +64,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-choice.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-choice.dtx index 848ee80f0e4..2a114768be2 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-choice.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-choice.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-pushbutton.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-pushbutton.dtx index c8681262d5b..47c3e95df1f 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-pushbutton.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-pushbutton.dtx @@ -55,7 +55,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-radiobutton.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-radiobutton.dtx index 58b5234a6cb..899042413a6 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-radiobutton.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-radiobutton.dtx @@ -83,7 +83,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-textfield.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-textfield.dtx index 48af1942de4..bb61dd44e7c 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-textfield.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-textfield.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx index 9447227b4ee..8b11e57558e 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx @@ -69,7 +69,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -972,7 +972,7 @@ %<*package> %<@@=pdffield> \NeedsTeXFormat{LaTeX2e} -\ProvidesExplPackage{l3pdffield-testphase}{2024-03-26}{0.96g}% +\ProvidesExplPackage{l3pdffield-testphase}{2024-04-09}{0.96h}% {form fields} % \end{macrocode} % \subsection{hyperref specific command} @@ -1089,9 +1089,9 @@ Multiline = 13,%Tx Password = 14, NoToggleToOff = 15,%Btn, radio button - Radio = 16,%Btn: Radio: 15=1, 16=0 - Pushbutton = 17,%Btn: Checkbox: 15=0, 16=0 - %Btn: Pushbutton: 16=1 + Radio = 16,%Btn: Radio: 16=1, 17=0 + Pushbutton = 17,%Btn: Checkbox: 16=0, 17=0 + %Btn: Pushbutton: 17=1 Combo = 18,%Ch: Combo=1 List=0 Edit = 19,%Ch, Combo=1 -> + edit field Sort = 20,%Ch, not relevant for view... diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx index 66777934952..65ac4c35fbd 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -398,7 +398,7 @@ % % \begin{macrocode} %<*header> -\ProvidesExplPackage{l3pdffile}{2024-03-26}{0.96g} +\ProvidesExplPackage{l3pdffile}{2024-04-09}{0.96h} {embedding and referencing files in PDF---LaTeX PDF management testphase bundle} \RequirePackage{l3pdftools} %temporarly!! %</header> diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx index c605ea7e52b..138b7760fc8 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx @@ -57,7 +57,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -632,7 +632,7 @@ %<@@=pdfmanagement> %<*header> % -\ProvidesExplPackage{l3pdfmanagement}{2024-03-26}{0.96g} +\ProvidesExplPackage{l3pdfmanagement}{2024-04-09}{0.96h} {Management of core PDF dictionaries (LaTeX PDF management testphase bundle)} %</header> % \end{macrocode} @@ -1286,7 +1286,7 @@ \__pdf_backend_catalog_gput:nn {AA} { - \__pdf_backend_object_ref:n { @@/Catalog/AA } + \pdf_object_ref:n { @@/Catalog/AA } } } } @@ -1316,7 +1316,7 @@ \prop_gput:cnn %we have to use \prop here to avoid the handler ... { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm } } { Fields } - { \__pdf_backend_object_ref:n { @@/Catalog/AcroForm/Fields } } + { \pdf_object_ref:n { @@/Catalog/AcroForm/Fields } } } \seq_if_empty:cF { g_@@_/Catalog/AcroForm/CO_seq } { @@ -1328,7 +1328,7 @@ \prop_gput:cnn %we have to use \prop here to avoid the handler ... { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm } } { CO } - { \__pdf_backend_object_ref:n { @@/Catalog/AcroForm/CO } } + { \pdf_object_ref:n { @@/Catalog/AcroForm/CO } } } \prop_if_empty:cF { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm/DR/Font}} { @@ -1340,7 +1340,7 @@ \prop_gput:cnn %we have to use \prop here to avoid the handler ... { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm/DR } } { Font } - { \__pdf_backend_object_ref:n { @@/Catalog/AcroForm/DR/Font } } + { \pdf_object_ref:n { @@/Catalog/AcroForm/DR/Font } } } \prop_if_empty:cF { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm/DR}} { @@ -1352,7 +1352,7 @@ \prop_gput:cnn %we have to use \prop here to avoid the handler ... { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm } } { DR } - { \__pdf_backend_object_ref:n { @@/Catalog/AcroForm/DR } } + { \pdf_object_ref:n { @@/Catalog/AcroForm/DR } } } \prop_if_empty:cF { \__kernel_pdfdict_name:n { g__pdf_Core/Catalog/AcroForm} } { @@ -1364,7 +1364,7 @@ \@@_handler_gput:nnn { Catalog } { AcroForm } - { \__pdf_backend_object_ref:n { @@/Catalog/AcroForm } } + { \pdf_object_ref:n { @@/Catalog/AcroForm } } } } @@ -1388,7 +1388,7 @@ \__pdf_backend_catalog_gput:nn {AF} { - \__pdf_backend_object_ref:n {@@/Catalog/AF} + \pdf_object_ref:n {@@/Catalog/AF} } } } @@ -1411,7 +1411,7 @@ \__pdf_backend_catalog_gput:nn {MarkInfo} { - \__pdf_backend_object_ref:n {@@/Catalog/MarkInfo} + \pdf_object_ref:n {@@/Catalog/MarkInfo} } } } @@ -1458,7 +1458,7 @@ \exp_args:Nne \__pdf_backend_catalog_gput:nn { OCProperties } - { \__pdf_backend_object_ref:n {@@/Catalog/OCProperties} } + { \pdf_object_ref:n {@@/Catalog/OCProperties} } } } % \end{macrocode} @@ -1481,7 +1481,7 @@ \__pdf_backend_catalog_gput:nn {OutputIntents} { - \__pdf_backend_object_ref:n {@@/Catalog/OutputIntents} + \pdf_object_ref:n {@@/Catalog/OutputIntents} } } } @@ -1505,7 +1505,7 @@ \__pdf_backend_catalog_gput:nn {Requirements} { - \__pdf_backend_object_ref:n { @@/Catalog/Requirements } + \pdf_object_ref:n { @@/Catalog/Requirements } } } } @@ -1529,7 +1529,7 @@ \__pdf_backend_catalog_gput:nn {ViewerPreferences} { - \__pdf_backend_object_ref:n {@@/Catalog/ViewerPreferences} + \pdf_object_ref:n {@@/Catalog/ViewerPreferences} } } } diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx index 459265b2cf9..bcdda4fbde3 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -190,6 +190,8 @@ % a test for at least the PDF-format will be added in future. % \item[|Catalog_no_OCProperties|] don't add |/OCProperties| to the catalog % {\em l3pdfmeta removes this entry at the end of the document} +% \item[|Catalog_EmbeddedFiles|] ensure that an |EmbeddedFiles| name tree is +% in the catalog. This is required for PDF/A-4f. % \item[|annot_widget_no_AA|] (rule 6.6.2-1) % no AA dictionary in widget annotation, % this will e.g. be checked by the new hyperref driver. @@ -625,7 +627,7 @@ % \begin{macrocode} %<@@=pdfmeta> %<*header> -\ProvidesExplPackage{l3pdfmeta}{2024-03-26}{0.96g} +\ProvidesExplPackage{l3pdfmeta}{2024-04-09}{0.96h} {PDF-Standards---LaTeX PDF management testphase bundle} %</header> % \end{macrocode} @@ -1013,9 +1015,48 @@ { g_@@_standard_pdf/A-4_prop }{conformance} \prop_gremove:cn { g_@@_standard_pdf/A-4_prop }{max_pdf_version} + +%A-4f ============== +\prop_new:c { g_@@_standard_pdf/A-4F_prop } +\prop_gset_eq:cc + { g_@@_standard_pdf/A-4F_prop } + { g_@@_standard_pdf/A-4_prop } +\prop_gput:cnn + { g_@@_standard_pdf/A-4F_prop }{conformance}{F} +% containsEmbeddedFiles == true ISO 19005-4:2020, Clause: 6.9, Test number: 5 +\prop_gput:cnn + { g_@@_standard_pdf/A-4F_prop }{Catalog_EmbeddedFiles}{} % \end{macrocode} % \end{variable} % +% \subsubsection{Embedded Files} +% Standard 4-AF is needed if we add AF files for +% tagging but it also requires an EmbeddedFiles name tree, +% so we test at the end if the name tree is empty and add a small readme if +% yes +% \begin{macrocode} +\AddToHook{begindocument/end} +{ + \pdfmeta_standard_verify:nF{Catalog_EmbeddedFiles} + { + \tl_gput_right:Nn\g__kernel_pdfmanagement_end_run_code_tl + { + \bool_if:NT \g__pdfmanagement_active_bool + { + \pdfdict_if_empty:nT { g__pdf_Core/Catalog/Names/EmbeddedFiles } + { + \group_begin: + \pdfdict_put:nne {l_pdffile/Filespec} {Desc}{(note~about~PDF/A-4F)} + \pdfdict_put:nnn { l_pdffile/Filespec }{AFRelationship} { /Unspecified } + \pdffile_embed_stream:nnN {PDF~standard~A-4F~requires~a~file}{readme.txt}\l_@@_tmpa_tl + \exp_args:Nne \__pdf_backend_Names_gpush:nn{EmbeddedFiles}{(readme)~\l_@@_tmpa_tl} + \group_end: + } + } + } + } +} +% \end{macrocode} % \subsubsection{Colorprofiles and Outputintents} % The following provides a minimum of interface to add a color profile % and an outputintent need for PDF/A for now. There will be need to extend it later, @@ -1187,13 +1228,19 @@ { \pdfmeta_standard_verify:nTF {outputintent_A} { - \prop_map_inline:Nn \g_@@_outputintents_prop + \prop_map_inline:Nn \g_@@_outputintents_prop { - \@@_embed_colorprofile:n - {#2} - \@@_write_outputintent:nn - {#2} - {#1} + \prop_if_exist:cTF {c_@@_colorprofile_#2} + { + \@@_embed_colorprofile:n + {#2} + \@@_write_outputintent:nn + {#2} + {#1} + } + { + \msg_warning:nnn{pdfmeta}{colorprofile-undefined}{#2} + } } } % \end{macrocode} @@ -1218,14 +1265,20 @@ \g_@@_outputintents_prop { \pdfmeta_standard_item:n { outputintent_A } } \l_@@_tmpb_tl - \exp_args:NV \@@_embed_colorprofile:n \l_@@_tmpb_tl - \prop_map_inline:Nn \g_@@_outputintents_prop - { - \exp_args:NV - \@@_write_outputintent:nn - \l_@@_tmpb_tl - { #1 } - } + \prop_if_exist:cTF {c_@@_colorprofile_\l_@@_tmpb_tl} + { + \exp_args:NV \@@_embed_colorprofile:n \l_@@_tmpb_tl + \prop_map_inline:Nn \g_@@_outputintents_prop + { + \exp_args:NV + \@@_write_outputintent:nn + \l_@@_tmpb_tl + { #1 } + } + } + { + \msg_warning:nne{pdfmeta}{colorprofile-undefined}{\l_@@_tmpb_tl} + } } } % \end{macrocode} @@ -1352,6 +1405,7 @@ % \subsection{Messages} % \begin{macrocode} \msg_new:nnn{pdfmeta}{namespace-defined}{The~xmlns~namespace~`#1`~is~already~declared} +\msg_new:nnn{pdfmeta}{colorprofile-undefined}{The~colorprofile~`#1`~is~unknown} % \end{macrocode} % \subsection{Some helper commands} % \subsubsection{Generate a BOM} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx index d13742b3720..d440373372d 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx @@ -49,7 +49,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -231,7 +231,7 @@ % % \begin{macrocode} %<*header> -\ProvidesExplPackage{l3pdftools}{2024-03-26}{0.96g} +\ProvidesExplPackage{l3pdftools}{2024-04-09}{0.96h} {candidate commands for l3pdf---LaTeX PDF management testphase bundle} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx index 8d280dfc8c8..c135d90f884 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx @@ -48,7 +48,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -132,7 +132,7 @@ % \begin{macrocode} %<@@=pdf> %<*header> -\ProvidesExplPackage{l3pdfxform}{2024-03-26}{0.96g} +\ProvidesExplPackage{l3pdfxform}{2024-04-09}{0.96h} {command to create xforms (beta)---LaTeX PDF management testphase bundle} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx index 806ea3124b9..e51d8ea2057 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -220,7 +220,7 @@ % \begin{macrocode} %<@@=pdfmanagement> %<*header> -\ProvidesExplPackage{ltdocinit}{2024-03-26}{0.96g} +\ProvidesExplPackage{ltdocinit}{2024-04-09}{0.96h} {Initialize document metadata} %</header> % \end{macrocode} diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx index 6c186f33bf0..61853b0d5b4 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -63,7 +63,7 @@ % |debug={firstaidoff={name1,name2,...},...}|. % \begin{macrocode} %<*package> -\ProvidesExplPackage{pdfmanagement-firstaid}{2024-03-26}{0.96g} +\ProvidesExplPackage{pdfmanagement-firstaid}{2024-04-09}{0.96h} {LaTeX PDF management testphase bundle / firstaid-patches} %<@@=pdfmanagement> diff --git a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx index 205bfd8eb19..eec73f11058 100644 --- a/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx +++ b/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx @@ -47,7 +47,7 @@ % }^^A % } % -% \date{Version 0.96g, released 2024-03-26} +% \date{Version 0.96h, released 2024-04-09} % % \maketitle % \begin{documentation} @@ -394,7 +394,7 @@ % \begin{macrocode} %<@@=pdf> %<*package> -\ProvidesExplPackage{pdfmanagement-testphase}{2024-03-26}{0.96g} +\ProvidesExplPackage{pdfmanagement-testphase}{2024-04-09}{0.96h} {LaTeX PDF management testphase bundle} \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \IfFormatAtLeastTF{2020-10-01}{}{ @@ -422,7 +422,7 @@ % to allow to set it in the document. % \begin{macrocode} %<*header> -\ProvidesExplFile{pdfmanagement-testphase.ltx}{2024-03-26}{0.96g} +\ProvidesExplFile{pdfmanagement-testphase.ltx}{2024-04-09}{0.96h} {PDF~management~code~(testphase)} % \end{macrocode} % We define a boolean for the new delayed shipout. This is temporary. At some |