summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-06-14 20:29:57 +0000
committerKarl Berry <karl@freefriends.org>2021-06-14 20:29:57 +0000
commitea584efe11866db25e596b86b3b7ae07e39e18f4 (patch)
tree0e6efd5f0b0ece53bbdb0714876d1b5bd6ac0445 /Master/texmf-dist/tex/latex
parentd4d9a15ed4e1c66e822e11fe95e05d584e0771a2 (diff)
pdfmanagement-testphase (14jun21)
git-svn-id: svn://tug.org/texlive/trunk@59591 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def21
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty1189
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty4
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx44
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty2
-rw-r--r--Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty2
16 files changed, 1203 insertions, 79 deletions
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty
index d8a6c9c4085..e2a9e0059db 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty
@@ -22,7 +22,7 @@
%% This file has the LPPL maintenance status "maintained".
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{color-ltx}[2021-05-14 v0.95d
+\ProvidesPackage{color-ltx}[2021-06-14 v0.95e
Standard LaTeX Color (patched for l3color, part of pdfmanagement-testphase, original version 2021/03/07 v1.2e) (DPC)]
\edef\Gin@codes{%
\catcode`\noexpand\^^A\the\catcode`\^^A\relax
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def
index 2fb91d1a128..8bc5c88a85c 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: hyperref-generic.dtx
-\ProvidesFile{hgeneric-testphase.def}[2021-05-14 v0.95d %
+\ProvidesFile{hgeneric-testphase.def}[2021-06-14 v0.95e %
generic Hyperref driver for the LaTeX PDF management testphase bundle]
\RequirePackage{etoolbox} %why?
@@ -158,10 +158,6 @@
\providecommand\@pdfborderstyle{}
\newcommand\OBJ@OCG@view {} % needed in hyperref
\def\Hy@numberline#1{#1\c_space_tl} %needed by bookmark
-\HyPsd@LoadUnicode
-\Hy@unicodetrue
-\let\HyPsd@pdfencoding\HyPsd@pdfencoding@unicode
-\Hy@DisableOption{unicode}
\cs_set_eq:NN \Hy@pdfminorversion \pdf_version_minor:
\cs_set_eq:NN \Hy@pdfmajorversion \pdf_version_major:
\legacy_if:nT { Hy@setpdfversion }
@@ -215,7 +211,7 @@
,run-parameter .tl_set:N = \l__hyp_href_run_parameter_tl
,nextactionraw .code:n =
{ %perhaps some safety match later, see hyperref code
- \tl_if_empty:nTF
+ \tl_if_empty:nTF {#1}
{
\pdfdict_remove:nn{l_hyp/annot/A}{Next}
}
@@ -1692,7 +1688,7 @@
}
,pdfpagescrop .code:n =
{
- \tl_if_empty:nTF %or blank?
+ \tl_if_empty:nTF {#1} %or blank?
{
\pdfmanagement_remove:nn {Pages} { CropBox }
}
@@ -2270,6 +2266,16 @@
#1 .code:n= { \__hyp_store_metadata:nn {#1}{##1}}
}
}
+
+\str_if_eq:eeT {A}{\pdfmeta_standard_item:n{type}}
+ {
+ \exp_args:Nnx
+ \keys_set:nn {hyp / setup}
+ {
+ ,pdfapart = \pdfmeta_standard_item:n {level}
+ ,pdfaconformance = \pdfmeta_standard_item:n {conformance}
+ }
+ }
\keys_define:nn { hyp / setup }
{
pdfpageduration .code:n =
@@ -2476,6 +2482,7 @@
\seq_sort:Nn \l__hyp_tmpa_seq
{
\int_compare:nNnTF { \pdf@strcmp{##1}{##2} } > { 0 }
+ %\str_compare:nNnTF {##1} > {##2}
{ \sort_return_swapped: }
{ \sort_return_same: }
}
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty
index ab8723947e4..b6c5de36a35 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty
@@ -19,7 +19,7 @@
%
% for those people who are interested.
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}{2021-05-14}{0.95d}
+\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}{2021-06-14}{0.95e}
{Store hyperref metadata in XMP format / temporay patches to test pdfresource management ... UF}
\cs_if_exist:NT \pdfmanagement_add:nnn
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def
index d5979d5bd1f..d3c47b88c6c 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def
@@ -20,7 +20,7 @@
%%
%% File: l3backend-testphase.dtx
\ProvidesExplFile
- {l3backend-testphase-dvipdfmx.def}{2021-05-14}{}
+ {l3backend-testphase-dvipdfmx.def}{2021-06-14}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx}
\RequirePackage{l3ref-tmp}
\cs_generate_variant:Nn \ref_label:nn {en}
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def
index 547771b06fa..3721ad73b98 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def
@@ -20,7 +20,7 @@
%%
%% File: l3backend-testphase.dtx
\ProvidesExplFile
- {l3backend-testphase-dvips.def}{2021-05-14}{}
+ {l3backend-testphase-dvips.def}{2021-06-14}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: dvips}
\RequirePackage{l3ref-tmp}
\cs_generate_variant:Nn \ref_label:nn {en}
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def
index 2f30f182790..40f9dc22403 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def
@@ -20,7 +20,7 @@
%%
%% File: l3backend-testphase.dtx
\ProvidesExplFile
- {l3backend-testphase-dvisvgm.def}{2021-05-14}{}
+ {l3backend-testphase-dvisvgm.def}{2021-06-14}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm}
\RequirePackage{l3ref-tmp}
\cs_generate_variant:Nn \ref_label:nn {en}
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def
index d753d60d7df..57d9d8f409f 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def
@@ -20,7 +20,7 @@
%%
%% File: l3backend-testphase.dtx
\ProvidesExplFile
- {l3backend-testphase-luatex.def}{2021-05-14}{}
+ {l3backend-testphase-luatex.def}{2021-06-14}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)}
\RequirePackage{l3ref-tmp}
\cs_generate_variant:Nn \ref_label:nn {en}
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def
index 10ed67a42f2..7c1f57bf97c 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def
@@ -20,7 +20,7 @@
%%
%% File: l3backend-testphase.dtx
\ProvidesExplFile
- {l3backend-testphase-pdftex.def}{2021-05-14}{}
+ {l3backend-testphase-pdftex.def}{2021-06-14}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)}
\RequirePackage{l3ref-tmp}
\cs_generate_variant:Nn \ref_label:nn {en}
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def
index 42b8b8728fd..ef891cffbf7 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def
@@ -20,7 +20,7 @@
%%
%% File: l3backend-testphase.dtx
\ProvidesExplFile
- {l3backend-testphase-xetex.def}{2021-05-14}{}
+ {l3backend-testphase-xetex.def}{2021-06-14}{}
{LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX}
\RequirePackage{l3ref-tmp}
\cs_generate_variant:Nn \ref_label:nn {en}
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty
index 9c356016b03..fd1fdbe7831 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty
@@ -6,7 +6,11 @@
%%
%% l3pdffield.dtx (with options: `package')
%% l3pdffield-checkbox.dtx (with options: `package')
+%% l3pdffield-radiobutton.dtx (with options: `package')
%% l3pdffield-textfield.dtx (with options: `package')
+%% l3pdffield-pushbutton.dtx (with options: `package')
+%% l3pdffield-choice.dtx (with options: `package')
+%% l3pdffield-action.dtx (with options: `package')
%%
%% Copyright (C) 2019-2021 The LaTeX Project
%%
@@ -23,16 +27,27 @@
%% File: l3pdffield.dtx
\NeedsTeXFormat{LaTeX2e}
-\ProvidesExplPackage{l3pdffield-testphase}{2021-05-14}{0.95d}%
+\ProvidesExplPackage{l3pdffield-testphase}{2021-06-14}{0.95e}%
{form fields}
\csname HyField@NeedAppearancesfalse\endcsname % suppress NeedAppearances
\str_new:N \l__pdffield_tmpa_str
+\str_new:N \l__pdffield_tmpb_str
\tl_new:N \l__pdffield_tmpa_tl
\tl_new:N \l__pdffield_tmpa_keys_tl
+\tl_new:N \l__pdffield_currentparent_tl
+\tl_new:N \l__pdffield_fieldID_tl
+\tl_new:N \l__pdffield_caption_tl
+\tl_new:N \l__pdffield_rollover_caption_tl
+\tl_new:N \l__pdffield_down_caption_tl
+\prop_new:N \g__pdffield_CO_sortkeys_prop
+\seq_new:N \g__pdffield_CO_sortkeys_seq
+\str_new:N \l__pdffield_CO_sortkey_str
+\tl_new:N \g__pdffield_annot_ref_last_tl
+\bool_new:N \l__pdffield_tag_bool
+\bool_set_true:N \l__pdffield_tag_bool
\cs_new_protected:Npn \__pdffield_tmpa:n #1 {}
\cs_new_protected:Npn \__pdffield_tmpa:nn #1 #2 {}
-\tl_new:N \l__pdffield_currentparent_tl
-\tl_new:N \l__pdffield_fieldID_tl
+
\msg_new:nnn {pdffield}{no-period}
{
The~field~name~`#1`~contains~a~period. \\
@@ -62,6 +77,10 @@
The~parent~field~'#1'~doesn't~exist\\
Create~it~with~\tl_to_str:n{\pdffield_field:nn}
}
+\msg_new:nnn {pdffield}{key-ignored}
+ {
+ key~`#1`~has~no~function~and~is~ignored
+ }
\cs_new_protected:Npn \__pdffield_key_disable:nnn #1#2#3
{
@@ -142,7 +161,6 @@
}
\pdfdict_new:n {l__pdffield/field}
\pdfdict_new:n {l__pdffield/field/AA}
-\bool_new:N \l__pdffield_root_field_bool
\cs_new_protected:Npn \__pdffield_field:n #1
{
\pdf_object_new:nn {__pdffield/field/#1} {dict}
@@ -186,6 +204,14 @@
{l__pdffield/field}
{AA}
{\pdf_object_ref_last:}
+ \pdfdict_get:nnN {l__pdffield/field/AA}{C}\l__pdffield_tmpa_tl
+ \quark_if_no_value:NF \l__pdffield_tmpa_tl
+ {
+ \prop_gput:Nxx\g__pdffield_CO_sortkeys_prop
+ { \pdf_object_ref:n {__pdffield/field/#1} }{ \l__pdffield_CO_sortkey_str }
+ \seq_gput_right:Nx\g__pdffield_CO_sortkeys_seq
+ { \pdf_object_ref:n {__pdffield/field/#1} }
+ }
}
}
\hook_gput_code:nnn {shipout/lastpage}{pdffield} %xetex needs this ...
@@ -197,6 +223,27 @@
}
\pdf_object_write:nx {__pdffield/field/#1} { \pdfdict_use:n {l__pdffield/field} }
}
+
+\hook_gput_code:nnn {shipout/lastpage}{pdffield}
+ {
+ \prop_if_empty:NF \g__pdffield_CO_sortkeys_prop
+ {
+ \seq_sort:Nn \g__pdffield_CO_sortkeys_seq
+ {
+ \str_compare:eNeTF
+ { \prop_item:Nn \g__pdffield_CO_sortkeys_prop {#1} }
+ >
+ { \prop_item:Nn \g__pdffield_CO_sortkeys_prop {#2} }
+ { \sort_return_swapped: }
+ { \sort_return_same: }
+ }
+ \pdfmanagement_add:nnx
+ { Catalog / AcroForm }
+ { CO }
+ { \seq_use:Nn \g__pdffield_CO_sortkeys_seq{~} }
+ }
+ }
+
\cs_new_protected:Npn \pdffield_field:nn #1 #2
{
\group_begin:
@@ -215,6 +262,7 @@
\bitset_set_false:Nn \l__pdffield_F_bitset {NoView}
}
\pdfannot_dict_put:nnx {widget}{F}{ \bitset_to_arabic:N \l__pdffield_F_bitset }
+ \__pdffield_tag_add_struct_parent:
\tl_if_empty:NF \l__pdffield_currentparent_tl
{
\exp_args:Ne
@@ -231,6 +279,7 @@
}
}
\mode_leave_vertical:
+ \__pdffield_tag_struct_begin:
\hbox_to_wd:nn
{ \l__pdffield_annot_wd_dim }
{
@@ -241,13 +290,16 @@
{ \l__pdffield_annot_dp_dim }
\hfill
}
+ \tl_gset:Nx \g__pdffield_annot_ref_last_tl { \pdfannot_box_ref_last: }
+ \exp_args:NV \__pdffield_tag_add_objr:n \g__pdffield_annot_ref_last_tl
+ \__pdffield_tag_struct_end:
\tl_if_empty:NF \l__pdffield_currentparent_tl
{
\seq_if_exist:cTF {g__pdffield_field/Kids/\l__pdffield_currentparent_tl _seq}
{
\seq_gput_right:cx
{g__pdffield_field/Kids/\l__pdffield_currentparent_tl _seq}
- { \pdfannot_box_ref_last:}
+ { \g__pdffield_annot_ref_last_tl }
}
{
\msg_error:nnx { pdffield}{parent-field-missing}{\l__pdffield_currentparent_tl}
@@ -261,6 +313,51 @@
\__pdffield_annot:
\group_end:
}
+\cs_new:Npn \pdffield_annot_ref_last: { \g__pdffield_annot_ref_last_tl }
+\cs_new_protected:Npn \__pdffield_tag_add_struct_parent: {}
+\cs_new_protected:Npn \__pdffield_tag_add_objr:n #1 {}
+\cs_new_protected:Npn \__pdffield_tag_struct_begin: {}
+\cs_new_protected:Npn \__pdffield_tag_struct_end: {}
+\hook_gput_code:nnn {begindocument} { l3pdffield }
+ {
+ \cs_if_exist:NT \tag_if_active:T
+ {
+ \tag_if_active:T
+ {
+ \cs_set_protected:Npn \__pdffield_tag_add_struct_parent:
+ {
+ \bool_if:NT \l__pdffield_tag_bool
+ {
+ \pdfannot_dict_put:nnx {widget}{StructParent}{ \tag_struct_parent_int: }
+ }
+ }
+ \cs_set_protected:Npn \__pdffield_tag_add_objr:n #1
+ {
+ \bool_if:NT \l__pdffield_tag_bool
+ {
+ \exp_args:Nnx
+ \tag_struct_insert_annot:nn {#1}{ \tag_struct_parent_int: }
+ }
+ }
+ \cs_set_protected:Npn \__pdffield_tag_struct_begin:
+ {
+ \bool_if:NT \l__pdffield_tag_bool
+ {
+ \tag_mc_end_push:
+ \tag_struct_begin:n{tag=Form}
+ }
+ }
+ \cs_set_protected:Npn \__pdffield_tag_struct_end:
+ {
+ \bool_if:NT \l__pdffield_tag_bool
+ {
+ \tag_struct_end:
+ \tag_mc_begin_pop:n{}
+ }
+ }
+ }
+ }
+ }
\cs_new_protected:Npn \__pdffield_color_set:nn #1 #2
{
\tl_if_head_eq_charcode:nNTF {#2}[ %]
@@ -277,7 +374,7 @@
\color_set:nnn {#1}{#2}{#3}
}
-\cs_new_protected:Npn \__pdffield_value_handler:nN #1#2
+\cs_new_protected:Npn \__pdffield_V_handler:nN #1#2
{
\tl_set:Nn #2 {#1}
}
@@ -314,7 +411,7 @@
\pdfdict_remove:nn { l__pdffield/field }{TU}
}
{
- \pdf_string_from_unicode:nnN {utf8/string}{#1}\l__pdffield_tmpa_str
+ \pdf_string_from_unicode:nnN {utf16/hex}{#1}\l__pdffield_tmpa_str
\pdfdict_put:nnx { l__pdffield/field }{TU}{\l__pdffield_tmpa_str}
}
}
@@ -328,13 +425,20 @@
\pdfdict_remove:nn { l__pdffield/field }{TM}
}
{
- \pdf_string_from_unicode:nnN {utf8/string}{#1}\l__pdffield_tmpa_str
+ \pdf_string_from_unicode:nnN {utf16/hex}{#1}\l__pdffield_tmpa_str
\pdfdict_put:nnx { l__pdffield/field }{TM}{\l__pdffield_tmpa_str}
}
}
,TM .groups:n = {field}
,mappingname .meta:n = {TM={#1}}
,mappingname .groups:n = {field}
+ }
+\keys_define:nn { pdffield }
+ {
+ fieldID .tl_set:N = \l__pdffield_fieldID_tl
+ }
+\keys_define:nn{pdffield}
+ {
,FT .choices:nn =
{ Btn, Tx, Ch, Sig }
{
@@ -348,7 +452,7 @@
\pdfdict_remove:nn { l__pdffield/field }{V}
}
{
- \__pdffield_value_handler:nN{#1}\l__pdffield_tmpa_str
+ \__pdffield_V_handler:nN{#1}\l__pdffield_tmpa_str
\pdfdict_put:nnx { l__pdffield/field }{V}{ \l__pdffield_tmpa_str }
}
}
@@ -360,7 +464,7 @@
\pdfdict_remove:nn { l__pdffield/field }{DV}
}
{
- \__pdffield_value_handler:nN{#1}\l__pdffield_tmpa_str
+ \__pdffield_V_handler:nN{#1}\l__pdffield_tmpa_str
\pdfdict_put:nnx { l__pdffield/field }{DV}{ \l__pdffield_tmpa_str }
}
}
@@ -432,7 +536,6 @@
}
,I .groups:n = {field}
}
-
\keys_define:nn { pdffield }
{
,setFf .code:n =
@@ -463,15 +566,14 @@
{
AA/#1 .code:n =
{
- \pdf_string_from_unicode:nnN {utf8/string-raw}{##1}\l__pdffield_tmpa_str
- \str_if_empty:NTF \l__pdffield_tmpa_str
+ \tl_if_empty:nTF {#1}
{
\pdfdict_remove:nn {l__pdffield/field/AA}{#1}
}
{
\pdfdict_put:nnx {l__pdffield/field/AA}
{#1}
- {<</S/JavaScript/JS(\l__pdffield_tmpa_str)>>}
+ {<</S/JavaScript/JS\c_space_tl ##1>>}
}
},
AA/#1 .groups:n = {field}
@@ -494,6 +596,10 @@
\__pdffield_tmpa:nn {validate} {V}
\__pdffield_tmpa:nn {calculate}{C}
+\keys_define:nn {pdffield}
+ {
+ sortkey .code:n = {\str_set:Nx \l__pdffield_CO_sortkey_str {\tl_to_str:n{#1}}}
+ }
\keys_define:nn { pdffield }
{
DA .code:n =
@@ -528,7 +634,6 @@
\dim_new:N \l__pdffield_annot_ht_dim
\dim_new:N \l__pdffield_annot_wd_dim
\dim_new:N \l__pdffield_annot_dp_dim
-
\keys_define:nn { pdffield }
{
,width .dim_set:N = \l__pdffield_annot_wd_dim
@@ -539,6 +644,23 @@
,depth .initial:n = 0pt
}
\keys_define:nn { pdffield }
+ {
+ ,tag .bool_set:N = \l__pdffield_tag_bool
+ }
+\cs_new_protected:Npn \__pdffield_appearance_handler:nnn #1#2#3
+ {
+ \pdfxform_if_exist:nTF { #1 }
+ {
+ \pdfannot_dict_put:nnx {widget/AP}{#2}
+ {
+ \pdfxform_ref:n {#1}
+ }
+ }
+ {
+ \msg_error:nnnn{pdffield}{appearance-missing}{#1}{#3}
+ }
+ }
+\keys_define:nn { pdffield }
{
%parent is defined in field
,AS .code:n =
@@ -553,19 +675,6 @@
}
,AS .groups:n = annot
}
-\cs_new_protected:Npn \__pdffield_appearance_handler:nnn #1#2#3
- {
- \pdfxform_if_exist:nTF { #1 }
- {
- \pdfannot_dict_put:nnx {widget/AP}{#2}
- {
- \pdfxform_ref:n {#1}
- }
- }
- {
- \msg_error:nnnn{pdffield}{appearance-missing}{#1}{#3}
- }
- }
\keys_define:nn { pdffield }
{
AP/N .code:n =
@@ -580,6 +689,7 @@
}
,AP/N .groups:n = annot
,appearance .meta:n = {AP/N={#1}}
+ ,appearance .groups:n = annot
}
\keys_define:nn { pdffield }
{
@@ -595,6 +705,7 @@
}
,AP/R .groups:n = annot
,rollover-appearance .meta:n = {AP/R={#1}}
+ ,rollover-appearance .groups:n = annot
}
\keys_define:nn { pdffield }
{
@@ -605,13 +716,13 @@
\pdfannot_dict_remove:nn { widget/AP }{D}
}
{
- \__pdffield_appearance_handler:nnn {#1}{D}{rollover}
+ \__pdffield_appearance_handler:nnn {#1}{D}{down}
}
}
,AP/D .groups:n = annot
,down-appearance .meta:n = {AP/D={#1}}
+ ,down-appearance .groups:n = annot
}
-
\keys_define:nn { pdffield }
{
MK/R .choices:nn = {0,90,180,270}
@@ -659,13 +770,14 @@
}
}
,MK/BG .groups:n = annot
- ,bordercolor .meta:n = {MK/BG=#1}
+ ,backgroundcolor .meta:n = {MK/BG=#1}
}
\keys_define:nn { pdffield }
{
MK/CA .code:n =
{
+ \tl_set:Nn \l__pdffield_caption_tl {#1}
\tl_if_empty:nTF {#1}
{
\pdfannot_dict_remove:nn { widget/MK }{CA}
@@ -679,6 +791,42 @@
,caption .meta:n = {MK/CA=#1}
}
+\keys_define:nn { pdffield }
+ {
+ MK/RC .code:n =
+ {
+ \tl_set:Nn \l__pdffield_rollover_caption_tl {#1}
+ \tl_if_empty:nTF {#1}
+ {
+ \pdfannot_dict_remove:nn { widget/MK }{RC}
+ }
+ {
+ \pdf_string_from_unicode:nnN {utf8/string}{#1}\l__pdffield_tmpa_str
+ \pdfannot_dict_put:nnx {widget/MK}{RC}{\l__pdffield_tmpa_str}
+ }
+ }
+ ,MK/RC .groups:n = annot
+ ,rollover-caption .meta:n = {MK/RC=#1}
+ }
+
+\keys_define:nn { pdffield }
+ {
+ MK/AC .code:n =
+ {
+ \tl_set:Nn \l__pdffield_down_caption_tl {#1}
+ \tl_if_empty:nTF {#1}
+ {
+ \pdfannot_dict_remove:nn { widget/MK }{AC}
+ }
+ {
+ \pdf_string_from_unicode:nnN {utf8/string}{#1}\l__pdffield_tmpa_str
+ \pdfannot_dict_put:nnx {widget/MK}{AC}{\l__pdffield_tmpa_str}
+ }
+ }
+ ,MK/AC .groups:n = annot
+ ,down-caption .meta:n = {MK/AC=#1}
+ }
+
\cs_set_protected:Npn \__pdffield_tmpa:n #1
{
\keys_define:nn { pdffield }
@@ -687,7 +835,7 @@
{
\tl_if_empty:nTF {##1}
{
- \pdfannot_dict_remove:nn { widget/AP }{#1}
+ \pdfannot_dict_remove:nn { widget/MK }{#1}
}
{
\pdfannot_dict_put:nnx {widget/MK}{#1}{##1}
@@ -697,7 +845,7 @@
}
}
-\clist_map_inline:nn {RC,AC,I,RI,IX,IF,TP}
+\clist_map_inline:nn {I,RI,IX,IF,TP}
{ \__pdffield_tmpa:n {#1} }
\keys_define:nn { pdffield }
{
@@ -730,15 +878,14 @@
{
AA/#1 .code:n =
{
- \pdf_string_from_unicode:nnN {utf8/string-raw}{##1}\l__pdffield_tmpa_str
- \str_if_empty:NTF \l__pdffield_tmpa_str
+ \tl_if_empty:nTF {#1}
{
\pdfannot_dict_remove:nn {widget/AA}{#1}
}
{
\pdfannot_dict_put:nnx {widget/AA}
{#1}
- {<</S/JavaScript/JS(\l__pdffield_tmpa_str)>>}
+ {<</S/JavaScript/JS\c_space_tl##1>>}
}
},
,AA/#1 .groups:n = annot
@@ -778,6 +925,13 @@
__pdffield/preset/checkbox .meta:n = {#1},
}
}
+ ,preset-radiobutton .code:n =
+ {
+ \keys_define:nn { pdffield }
+ {
+ __pdffield/preset/radiobutton .meta:n = {#1},
+ }
+ }
,preset-textfield .code:n =
{
\keys_define:nn { pdffield }
@@ -785,10 +939,26 @@
__pdffield/preset/textfield .meta:n = {#1},
}
}
+ ,preset-pushbutton .code:n =
+ {
+ \keys_define:nn { pdffield }
+ {
+ __pdffield/preset/pushbutton .meta:n = {#1},
+ }
+ }
+ ,preset-choice .code:n =
+ {
+ \keys_define:nn { pdffield }
+ {
+ __pdffield/preset/choice .meta:n = {#1},
+ }
+ }
}
\keys_set:nn{ pdffield / setup }{preset-checkbox={}}
\keys_set:nn{ pdffield / setup }{preset-textfield={}}
-
+\keys_set:nn{ pdffield / setup }{preset-radiobutton={}}
+\keys_set:nn{ pdffield / setup }{preset-pushbutton={}}
+\keys_set:nn{ pdffield / setup }{preset-choice={}}
\cs_new_protected:Npn \__pdffield_style_create:nn #1#2
{
\keys_define:nn { pdffield }
@@ -806,8 +976,21 @@
{
style .code:n = {\keys_set:nn {pdffield}{__pdffield/style/#1={#1}}}
}
+\cs_new_protected:Npn \__pdffield_value_handler:n #1
+ {
+ \msg_info:nnn {pdffield}{key-ignored}{value}
+ }
+\cs_new_protected:Npn \__pdffield_default_handler:n #1
+ {
+ \msg_info:nnn {pdffield}{key-ignored}{default}
+ }
+\keys_define:nn {pdffield}
+ {
+ value .code:n = { \__pdffield_value_handler:n {#1} }
+ ,default .code:n = { \__pdffield_default_handler:n {#1}}
+ }
%% File: l3pdfpdffield-checkbox.dtx
-\cs_new_protected:cn {__pdffield/checkbox/default_appearances:}
+\cs_new_protected:Npn \__pdffield_checkbox_default_appearances:
{
\pdffield_appearance:nn {pdffield/checkbox/default/Yes}
{
@@ -825,7 +1008,7 @@
[ \dim_eval:n { \box_ht:N\strutbox+\box_dp:N\strutbox } ]
{ \phantom{\texttimes} \strut }
}
- \cs_gset_eq:cN {__pdffield/checkbox/default_appearances:} \prg_do_nothing:
+ \cs_gset_eq:NN \__pdffield_checkbox_default_appearances: \prg_do_nothing:
}
\cs_new_protected:Npn \__pdffield_checkbox_field:n #1 %name
{
@@ -836,12 +1019,13 @@
\keys_set:nn {pdffield}{parent=__pdffield/checkbox/#1}
}
\cs_generate_variant:Nn \__pdffield_checkbox_field:n {V}
-
\cs_new_protected:Npn \__pdffield_checkbox:n #1
{
\group_begin:
- \use:c {__pdffield/checkbox/default_appearances:}
+ \__pdffield_checkbox_default_appearances:
\cs_set_eq:NN\__pdffield_appearance_handler:nnn \__pdffield_checkbox_appearance_handler:nnn
+ \cs_set_eq:NN\__pdffield_value_handler:n \__pdffield_checkbox_value_handler:n
+ \cs_set_eq:NN\__pdffield_default_handler:n \__pdffield_checkbox_default_handler:n
\keys_set:nn {pdffield}
{
fieldID=,
@@ -887,10 +1071,30 @@
,checked .default:n = {true}
,checked .groups:n = {checkbox}
}
-\keys_define:nn { pdffield }
+\keys_define:nn { pdffield }
{
- fieldID .tl_set:N = \l__pdffield_fieldID_tl
+ ,__value .choice:
+ ,__value / Off .code:n =
+ {
+ \pdfdict_put:nnx { l__pdffield/field }{V} { /Off }
+ \pdfdict_put:nnx { l__pdffield/field }{DV}{ /Off }
+ \pdfannot_dict_put:nnn {widget}{AS}{ /Off }
+ }
+ ,__value / Yes .code:n =
+ {
+ \pdfdict_put:nnx { l__pdffield/field }{V} { /Yes }
+ \pdfdict_put:nnx { l__pdffield/field }{DV}{ /Yes }
+ \pdfannot_dict_put:nnn {widget}{AS}{ /Yes }
+ }
}
+\cs_new_protected:Npn \__pdffield_checkbox_value_handler:n #1
+ {
+ \keys_set:nn{pdffield}{__value={#1}}
+ }
+\cs_new_protected:Npn \__pdffield_checkbox_default_handler:n #1
+ {
+ \keys_set:nn{pdffield}{__value={#1}}
+ }
\cs_new_protected:Npn \__pdffield_checkbox_appearance_handler:nnn #1 #2 #3 %name, type, text
{
\pdfxform_if_exist:nTF { #1/Yes }
@@ -913,18 +1117,184 @@
}
\cs_set_eq:NN \pdffield_checkbox:n \__pdffield_checkbox:n
+
+%% File: l3pdfpdffield-radiobutton.dtx
+
+\RequirePackage{l3draw}
+\tl_new:N \l__pdffield_radio_value_tl
+\tl_new:N \l__pdffield_radio_default_tl
+\int_new:N \l__pdffield_radio_value_num_int
+\tl_new:N \l__pdffield_radio_appearance_code_tl
+\cs_new_protected:Npn \__pdffield_radio_default_appearances:
+ {
+ \pdffield_appearance:nn {pdffield/radio/default/Yes}
+ {
+ \normalsize
+ \draw_begin:
+ \draw_path_circle:nn {0pt,0pt}{0.5\normalbaselineskip}
+ \draw_path_use_clear:n { stroke }
+ \draw_path_circle:nn {0pt,0pt}{0.2\normalbaselineskip}
+ \draw_path_use_clear:n { fill }
+ \draw_end:
+ }
+ \pdffield_appearance:nn {pdffield/radio/default/Off}
+ {
+ \normalsize
+ \draw_begin:
+ \draw_path_circle:nn {0pt,0pt}{0.5\normalbaselineskip}
+ \draw_path_use_clear:n { stroke }
+ \draw_end:
+ }
+
+ \pdffield_appearance:nn {pdffield/radio/defaultdown/Yes}
+ {
+ \normalsize
+ \draw_begin:
+ \draw_path_circle:nn {0pt,0pt}{0.5\normalbaselineskip}
+ \draw_path_use_clear:n { stroke }
+ \draw_path_circle:nn {0pt,0pt}{0.25\normalbaselineskip}
+ \draw_path_use_clear:n { fill }
+ \draw_end:
+ }
+ \pdffield_appearance:nn {pdffield/radio/defaultdown/Off}
+ {
+ \normalsize
+ \draw_begin:
+ \draw_path_circle:nn {0pt,0pt}{0.5\normalbaselineskip}
+ \draw_path_use_clear:n { stroke }
+ \draw_path_circle:nn {0pt,0pt}{0.25\normalbaselineskip}
+ \draw_path_use_clear:n { fill }
+ \draw_end:
+ }
+ \cs_gset_eq:NN \__pdffield_radio_default_appearances: \prg_do_nothing:
+ }
+\cs_new_protected:Npn \__pdffield_radio_field:n #1 %name
+ {
+ \pdf_object_if_exist:nF {__pdffield/field/__pdffield/radio/#1}
+ {
+ \pdf_object_new:nn {__pdffield/field/__pdffield/radio-Opt/#1}{array}
+ \pdfdict_put:nnx { l__pdffield/field }{Opt} { \pdf_object_ref:n {__pdffield/field/__pdffield/radio-Opt/#1} }
+ \seq_new:c { g__pdffield_radio_opt_#1_seq }
+ \hook_gput_code:nnn {shipout/lastpage}{pdffield/radio}
+ {
+ \pdf_object_write:nx
+ {__pdffield/field/__pdffield/radio-Opt/#1}
+ {\seq_use:cn {g__pdffield_radio_opt_#1_seq}{~}}
+ }
+ \tl_if_eq:NnF \l__pdffield_radio_default_tl{()}
+ {
+ \seq_gput_left:cV { g__pdffield_radio_opt_#1_seq }\l__pdffield_radio_default_tl
+ }
+ \pdfdict_put:nnx { l__pdffield/field }{V} { /0 }
+ \pdfdict_put:nnx { l__pdffield/field }{DV} { /0 }
+ \__pdffield_field:n { __pdffield/radio/#1 }
+ }
+ \keys_set:nn {pdffield}{parent=__pdffield/radio/#1}
+ }
+\cs_generate_variant:Nn \__pdffield_radio_field:n {V}
+\cs_new_protected:Npn \__pdffield_radio:n #1
+ {
+ \group_begin:
+ \cs_set_eq:NN\__pdffield_appearance_handler:nnn \__pdffield_radio_appearance_handler:nnn
+ \cs_set_eq:NN\__pdffield_value_handler:n \__pdffield_radio_value_handler:n
+ \cs_set_eq:NN\__pdffield_default_handler:n \__pdffield_radio_default_handler:n
+ \tl_set:Nn\l__pdffield_radio_appearance_code_tl{}
+ \keys_set:nn {pdffield}
+ {
+ fieldID=
+ ,name=radio
+ ,width = \normalbaselineskip
+ ,height = \normalbaselineskip
+ ,__pdffield/preset/radiobutton
+ ,#1
+ ,unsetFf={Pushbutton}
+ ,setFf={Radio}
+ ,FT= Btn
+ }
+ \tl_if_empty:NT\l__pdffield_fieldID_tl
+ {
+ \pdfdict_get:nnN {l__pdffield/field}{T}\l__pdffield_fieldID_tl
+ \tl_put_left:Nn \l__pdffield_fieldID_tl {__pdffield/radio/}
+ }
+ \__pdffield_radio_field:V\l__pdffield_fieldID_tl
+ \seq_if_in:cVF { g__pdffield_radio_opt_ \l__pdffield_fieldID_tl _seq }\l__pdffield_radio_value_tl
+ {
+ \seq_gput_right:cV { g__pdffield_radio_opt_ \l__pdffield_fieldID_tl _seq }\l__pdffield_radio_value_tl
+ }
+ \int_zero:N \l__pdffield_radio_value_num_int
+ \exp_args:Nc
+ \seq_map_inline:Nn { g__pdffield_radio_opt_ \l__pdffield_fieldID_tl _seq }
+ {
+ \str_if_eq:nVTF { ##1 } \l__pdffield_radio_value_tl
+ {
+ \seq_map_break:
+ }
+ {
+ \int_incr:N \l__pdffield_radio_value_num_int
+ }
+ }
+ \int_compare:nNnTF { \l__pdffield_radio_value_num_int } = 0
+ { \pdfannot_dict_put:nnx {widget}{AS}{/0} }
+ { \pdfannot_dict_put:nnx {widget}{AS}{/Off} }
+ \tl_if_empty:NT\l__pdffield_radio_appearance_code_tl
+ {
+ \__pdffield_radio_default_appearances:
+ \keys_set:nn {pdffield}
+ {
+ appearance = pdffield/radio/default,
+ down-appearance = pdffield/radio/defaultdown,
+ }
+ }
+ \l__pdffield_radio_appearance_code_tl
+ \__pdffield_annot:
+ \group_end:
+ }
+\cs_new_protected:Npn \__pdffield_radio_value_handler:n #1
+ {
+ \pdf_string_from_unicode:nnN {utf8/string}{#1}\l__pdffield_radio_value_tl
+ }
+\cs_new_protected:Npn \__pdffield_radio_default_handler:n #1
+ {
+ \pdf_string_from_unicode:nnN {utf8/string}{#1}\l__pdffield_radio_default_tl
+ }
+\keys_define:nn { pdffield }
+ {
+ group .meta:n = {T=#1}
+ }
+\cs_new_protected:Npn \__pdffield_radio_appearance_handler:nnn #1 #2 #3 %name, type, text
+ {
+ \tl_put_right:Nn \l__pdffield_radio_appearance_code_tl
+ {
+ \pdfxform_if_exist:nTF { #1 / Yes }
+ {
+ \pdf_object_unnamed_write:nx
+ {dict}
+ {
+ /\int_use:N \l__pdffield_radio_value_num_int
+ \c_space_tl \pdfxform_ref:n { #1/Yes}
+ /Off ~ \pdfxform_ref:n { #1/Off}
+ }
+ \pdfannot_dict_put:nnx {widget/AP}{#2}{\pdf_object_ref_last:}
+ }
+ {
+ \msg_error:nnnn{pdffield}{appearance-missing}{#1}{#3}
+ }
+ }
+ }
+
+\cs_set_eq:NN \pdffield_radio:n \__pdffield_radio:n
%% File: l3pdfpdffield-textfield.dtx
\tl_new:N \l__pdffield_DA_fontcolor_tl
\dim_new:N \l__pdffield_DA_fontsize_dim
\tl_new:N \l__pdffield_DA_fontname_tl
-\cs_new_protected:cn {__pdffield/textfield/default_appearance:}
+\cs_new_protected:Npn {\__pdffield_textfield_default_appearance:}
{
\pdffield_appearance:nn {pdffield/textfield/default}
{
{ \color_select:n{black!5!white}\rule{\paperwidth}{\paperheight} }
}
- \cs_gset_eq:cN {__pdffield/textfield/default_appearance:} \prg_do_nothing:
+ \cs_gset_eq:NN \__pdffield_textfield_default_appearance: \prg_do_nothing:
}
\cs_new_protected:Npn \__pdffield_textfield_field:n #1 %name
{
@@ -935,12 +1305,13 @@
\keys_set:nn {pdffield}{parent=__pdffield/textfield/#1}
}
\cs_generate_variant:Nn \__pdffield_textfield_field:n {V}
-
\cs_new_protected:Npn \__pdffield_textfield:n #1
{
\group_begin:
- \cs_set_eq:NN\__pdffield_value_handler:nN \__pdffield_textfield_value_handler:nN
- \use:c {__pdffield/textfield/default_appearance:}
+ \cs_set_eq:NN\__pdffield_V_handler:nN \__pdffield_textfield_V_handler:nN
+ \cs_set_eq:NN\__pdffield_value_handler:n \__pdffield_textfield_value_handler:n
+ \cs_set_eq:NN\__pdffield_default_handler:n \__pdffield_textfield_default_handler:n
+ \__pdffield_textfield_default_appearance:
\keys_set:nn {pdffield}
{
,fieldID=
@@ -992,7 +1363,6 @@
\pdfdict_get:nnN {l__pdffield/field}{T}\l__pdffield_fieldID_tl
\tl_put_left:Nn \l__pdffield_fieldID_tl {__pdffield/textfield/}
}
-
\__pdffield_textfield_field:V\l__pdffield_fieldID_tl
\__pdffield_annot:
\group_end:
@@ -1014,15 +1384,726 @@
,fontsize .initial:n = {10bp}
,fontsize .groups:n = {textfield}
}
+\cs_new_protected:Npn \__pdffield_textfield_V_handler:nN #1#2
+ {
+ \pdf_string_from_unicode:nnN {utf16/hex}{#1}#2
+ }
+\cs_new_protected:Npn \__pdffield_textfield_value_handler:n #1
+ {
+ \keys_set:nn{pdffield}{V={#1}}
+ }
+\cs_new_protected:Npn \__pdffield_textfield_default_handler:n #1
+ {
+ \keys_set:nn{pdffield}{DV={#1}}
+ }
+\cs_set_eq:NN \pdffield_textfield:n \__pdffield_textfield:n
+%% File: l3pdfpdffield-pushbutton.dtx
+\tl_new:N \l__pdffield_pushbutton_appearance_code_tl
+\dim_new:N \l__pdffield_pushbutton_linewidth_dim
+\dim_new:N \l__pdffield_pushbutton_totalht_dim
+\int_new:N \g__pdffield_pushbutton_cnt_int
+\dim_set:Nn \l__pdffield_pushbutton_linewidth_dim {0.4pt}
+\color_set:nn {pdffield/push/text}{black}
+\color_set:nn {pdffield/push/border}{black!95!white}
+\color_set:nn {pdffield/push/bordertop}{yellow!5!white}
+\color_set:nn {pdffield/push/borderbot}{black!50!white}
+\color_set:nn {pdffield/push/fill}{black!20!white}
+
+\cs_new_protected:Npn \__pdffield_pushbutton_default_appearances:
+ {
+ \int_gincr:N \g__pdffield_pushbutton_cnt_int
+ \exp_args:Nx
+ \pdffield_appearance:nn {pdffield/pushbutton/default-\int_use:N \g__pdffield_pushbutton_cnt_int}
+ {
+ \draw_begin:
+ \color_set:nn {pdffield/push/text}{.}
+ \dim_set:Nn \l__pdffield_pushbutton_totalht_dim
+ {\l__pdffield_annot_ht_dim + \l__pdffield_annot_dp_dim}
+ \draw_linewidth:n {\l__pdffield_pushbutton_linewidth_dim}
+ \draw_path_rectangle_corners:nn
+ {0.5\l__pdffield_pushbutton_linewidth_dim,0.5\l__pdffield_pushbutton_linewidth_dim}
+ {
+ \l__pdffield_annot_wd_dim-0.5\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-0.5\l__pdffield_pushbutton_linewidth_dim
+ }
+ \color_fill:n {pdffield/push/border}
+ \draw_path_use_clear:n { fill }
+ \draw_path_rectangle_corners:nn
+ {2\l__pdffield_pushbutton_linewidth_dim,2\l__pdffield_pushbutton_linewidth_dim}
+ {
+ \l__pdffield_annot_wd_dim-2\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-2\l__pdffield_pushbutton_linewidth_dim
+ }
+ \color_fill:n {pdffield/push/bordertop}
+ \draw_path_use_clear:n { fill }
+ \draw_path_moveto:n
+ {
+ 2\l__pdffield_pushbutton_linewidth_dim,
+ 2\l__pdffield_pushbutton_linewidth_dim
+ }
+ \draw_path_lineto:n
+ {5\l__pdffield_pushbutton_linewidth_dim,5\l__pdffield_pushbutton_linewidth_dim}
+ \draw_path_lineto:n
+ {
+ \l__pdffield_annot_wd_dim-5\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-5\l__pdffield_pushbutton_linewidth_dim
+ }
+ \draw_path_lineto:n
+ {
+ \l__pdffield_annot_wd_dim-2\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-2\l__pdffield_pushbutton_linewidth_dim
+ }
+ \draw_path_lineto:n
+ {
+ \l__pdffield_annot_wd_dim-2\l__pdffield_pushbutton_linewidth_dim,
+ 2\l__pdffield_pushbutton_linewidth_dim
+ }
+ \draw_path_close:
+ \color_fill:n {pdffield/push/borderbot}
+ \draw_path_use_clear:n { fill }
+ \draw_path_rectangle_corners:nn
+ {
+ 1.5\l__pdffield_pushbutton_linewidth_dim,
+ 1.5\l__pdffield_pushbutton_linewidth_dim
+ }
+ {
+ \l__pdffield_annot_wd_dim-1.5\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-1.5\l__pdffield_pushbutton_linewidth_dim
+ }
+ \color_stroke:n {pdffield/push/border}
+ \draw_path_use_clear:n { stroke }
+ \draw_path_rectangle_corners:nn
+ {4\l__pdffield_pushbutton_linewidth_dim,4\l__pdffield_pushbutton_linewidth_dim}
+ {
+ \l__pdffield_annot_wd_dim-4\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-4\l__pdffield_pushbutton_linewidth_dim
+ }
+ \color_fill:n {pdffield/push/fill}
+ \draw_path_use_clear:n { fill }
+ \color_fill:n {pdffield/push/text}
+ \draw_transform_shift:n
+ {0.5 \l__pdffield_annot_wd_dim, \l__pdffield_annot_dp_dim }
+ \hbox_set:Nn \l_tmpa_box { \makebox[0pt]{\l__pdffield_caption_tl} }
+ \draw_box_use:N \l_tmpa_box
+ \draw_end:
+ }
+ \exp_args:Nx
+ \pdffield_appearance:nn {pdffield/pushbutton/defaultrollover-\int_use:N \g__pdffield_pushbutton_cnt_int}
+ {
+ \draw_begin:
+ \dim_set:Nn \l__pdffield_pushbutton_totalht_dim
+ {\l__pdffield_annot_ht_dim + \l__pdffield_annot_dp_dim}
+ \draw_linewidth:n {\l__pdffield_pushbutton_linewidth_dim}
+ \draw_path_rectangle_corners:nn
+ {0.5\l__pdffield_pushbutton_linewidth_dim,0.5\l__pdffield_pushbutton_linewidth_dim}
+ {
+ \l__pdffield_annot_wd_dim-0.5\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-0.5\l__pdffield_pushbutton_linewidth_dim
+ }
+ \color_fill:n {pdffield/push/border}
+ \draw_path_use_clear:n { fill }
+ \draw_path_rectangle_corners:nn
+ {2\l__pdffield_pushbutton_linewidth_dim,2\l__pdffield_pushbutton_linewidth_dim}
+ {
+ \l__pdffield_annot_wd_dim-2\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-2\l__pdffield_pushbutton_linewidth_dim
+ }
+ \color_fill:n {pdffield/push/borderbot}
+ \draw_path_use_clear:n { fill }
+ \draw_path_moveto:n
+ {
+ 2\l__pdffield_pushbutton_linewidth_dim,
+ 2\l__pdffield_pushbutton_linewidth_dim
+ }
+ \draw_path_lineto:n
+ {5\l__pdffield_pushbutton_linewidth_dim,5\l__pdffield_pushbutton_linewidth_dim}
+ \draw_path_lineto:n
+ {
+ \l__pdffield_annot_wd_dim-5\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-5\l__pdffield_pushbutton_linewidth_dim
+ }
+ \draw_path_lineto:n
+ {
+ \l__pdffield_annot_wd_dim-2\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-2\l__pdffield_pushbutton_linewidth_dim
+ }
+ \draw_path_lineto:n
+ {
+ \l__pdffield_annot_wd_dim-2\l__pdffield_pushbutton_linewidth_dim,
+ 2\l__pdffield_pushbutton_linewidth_dim
+ }
+ \draw_path_close:
+ \color_fill:n {pdffield/push/bordertop}
+ \draw_path_use_clear:n { fill }
+ \draw_path_rectangle_corners:nn
+ {
+ 1.5\l__pdffield_pushbutton_linewidth_dim,
+ 1.5\l__pdffield_pushbutton_linewidth_dim
+ }
+ {
+ \l__pdffield_annot_wd_dim-1.5\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-1.5\l__pdffield_pushbutton_linewidth_dim
+ }
+ \color_stroke:n {pdffield/push/border}
+ \draw_path_use_clear:n { stroke }
+ \draw_path_rectangle_corners:nn
+ {4\l__pdffield_pushbutton_linewidth_dim,4\l__pdffield_pushbutton_linewidth_dim}
+ {
+ \l__pdffield_annot_wd_dim-4\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-4\l__pdffield_pushbutton_linewidth_dim
+ }
+ \color_fill:n {pdffield/push/fill}
+ \draw_path_use_clear:n { fill }
+ \color_fill:n {pdffield/push/text}
+ \draw_transform_shift:n
+ {0.5 \l__pdffield_annot_wd_dim, \l__pdffield_annot_dp_dim }
+ \hbox_set:Nn \l_tmpa_box { \makebox[0pt]{\l__pdffield_rollover_caption_tl} }
+ \draw_box_use:N \l_tmpa_box
+ \draw_end:
+ }
+ \exp_args:Nx
+ \pdffield_appearance:nn {pdffield/pushbutton/defaultdown-\int_use:N \g__pdffield_pushbutton_cnt_int}
+ {
+ \draw_begin:
+ \dim_set:Nn \l__pdffield_pushbutton_totalht_dim
+ {\l__pdffield_annot_ht_dim + \l__pdffield_annot_dp_dim}
+ \draw_linewidth:n {\l__pdffield_pushbutton_linewidth_dim}
+ \draw_path_rectangle_corners:nn
+ {0.5\l__pdffield_pushbutton_linewidth_dim,0.5\l__pdffield_pushbutton_linewidth_dim}
+ {
+ \l__pdffield_annot_wd_dim-0.5\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-0.5\l__pdffield_pushbutton_linewidth_dim
+ }
+ \color_fill:n {pdffield/push/border}
+ \draw_path_use_clear:n { fill }
+ \draw_path_rectangle_corners:nn
+ {2\l__pdffield_pushbutton_linewidth_dim,2\l__pdffield_pushbutton_linewidth_dim}
+ {
+ \l__pdffield_annot_wd_dim-2\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-2\l__pdffield_pushbutton_linewidth_dim
+ }
+ \color_fill:n {pdffield/push/borderbot}
+ \draw_path_use_clear:n { fill }
+ \draw_path_moveto:n
+ {
+ 2\l__pdffield_pushbutton_linewidth_dim,
+ 2\l__pdffield_pushbutton_linewidth_dim
+ }
+ \draw_path_lineto:n
+ {5\l__pdffield_pushbutton_linewidth_dim,5\l__pdffield_pushbutton_linewidth_dim}
+ \draw_path_lineto:n
+ {
+ \l__pdffield_annot_wd_dim-5\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-5\l__pdffield_pushbutton_linewidth_dim
+ }
+ \draw_path_lineto:n
+ {
+ \l__pdffield_annot_wd_dim-2\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-2\l__pdffield_pushbutton_linewidth_dim
+ }
+ \draw_path_lineto:n
+ {
+ \l__pdffield_annot_wd_dim-2\l__pdffield_pushbutton_linewidth_dim,
+ 2\l__pdffield_pushbutton_linewidth_dim
+ }
+ \draw_path_close:
+ \color_fill:n {pdffield/push/bordertop}
+ \draw_path_use_clear:n { fill }
+ \draw_path_rectangle_corners:nn
+ {
+ 1.5\l__pdffield_pushbutton_linewidth_dim,
+ 1.5\l__pdffield_pushbutton_linewidth_dim
+ }
+ {
+ \l__pdffield_annot_wd_dim-1.5\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-1.5\l__pdffield_pushbutton_linewidth_dim
+ }
+ \color_stroke:n {pdffield/push/border}
+ \draw_path_use_clear:n { stroke }
+ \draw_path_rectangle_corners:nn
+ {4\l__pdffield_pushbutton_linewidth_dim,4\l__pdffield_pushbutton_linewidth_dim}
+ {
+ \l__pdffield_annot_wd_dim-4\l__pdffield_pushbutton_linewidth_dim,
+ \l__pdffield_pushbutton_totalht_dim-4\l__pdffield_pushbutton_linewidth_dim
+ }
+ \color_fill:n {pdffield/push/fill}
+ \draw_path_use_clear:n { fill }
+ \color_fill:n {pdffield/push/text}
+ \draw_transform_shift:n
+ {0.5 \l__pdffield_annot_wd_dim, \l__pdffield_annot_dp_dim }
+ \hbox_set:Nn \l_tmpa_box { \makebox[0pt]{\l__pdffield_down_caption_tl} }
+ \draw_box_use:N \l_tmpa_box
+ \draw_end:
+ }
+ }
+\cs_new_protected:Npn \__pdffield_pushbutton_field:n #1 %name
+ {
+ \pdf_object_if_exist:nF {__pdffield/field/__pdffield/pushbutton/#1}
+ {
+ \__pdffield_field:n { __pdffield/pushbutton/#1 }
+ }
+ \keys_set:nn {pdffield}{parent=__pdffield/pushbutton/#1}
+ }
+\cs_generate_variant:Nn \__pdffield_pushbutton_field:n {V}
+\cs_new_protected:Npn \__pdffield_pushbutton:n #1
+ {
+ \group_begin:
+ \tl_set:Nn\l__pdffield_pushbutton_appearance_code_tl{}
+ \cs_set_eq:NN\__pdffield_appearance_handler:nnn \__pdffield_pushbutton_appearance_handler:nnn
+ \keys_set:nn {pdffield}
+ {
+ fieldID=,
+ name=pushbutton,
+ width = 3cm,
+ height = 1.05\normalbaselineskip,
+ depth = 0.45\normalbaselineskip,
+ }
+ \keys_set:nn { pdffield }{__pdffield/preset/pushbutton,#1}
+ \keys_set:nn { pdffield }
+ {
+ ,V=
+ ,DV=
+ ,setFf={Pushbutton}
+ ,FT= Btn
+ }
+ \tl_if_empty:NT\l__pdffield_fieldID_tl
+ {
+ \pdfdict_get:nnN {l__pdffield/field}{T}\l__pdffield_fieldID_tl
+ \tl_put_left:Nn \l__pdffield_fieldID_tl {__pdffield/pushbutton/}
+ }
+ \tl_if_empty:NT\l__pdffield_pushbutton_appearance_code_tl
+ {
+ \__pdffield_pushbutton_default_appearances:
+ \exp_args:Nnx
+ \keys_set:nn {pdffield}
+ {
+ appearance = pdffield/pushbutton/default-\int_eval:n{ \g__pdffield_pushbutton_cnt_int},
+ down-appearance = pdffield/pushbutton/defaultdown-\int_eval:n{ \g__pdffield_pushbutton_cnt_int},
+ rollover-appearance = pdffield/pushbutton/defaultrollover-\int_eval:n{ \g__pdffield_pushbutton_cnt_int},
+ }
+ }
+ \l__pdffield_pushbutton_appearance_code_tl
+ \__pdffield_pushbutton_field:V\l__pdffield_fieldID_tl
+ \__pdffield_annot:
+ \group_end:
+ }
+\cs_new_protected:Npn \__pdffield_pushbutton_appearance_handler:nnn #1 #2 #3 %name, type, text
+ {
+ \tl_put_right:Nn \l__pdffield_pushbutton_appearance_code_tl
+ {
+ \pdfxform_if_exist:nTF { #1 }
+ {
+ \pdfannot_dict_put:nnx {widget/AP}{#2}{\pdfxform_ref:n{#1}}
+ }
+ {
+ \msg_error:nnnn{pdffield}{appearance-missing}{#1}{#3}
+ }
+ }
+ }
+\cs_set_eq:NN \pdffield_pushbutton:n \__pdffield_pushbutton:n
+
+%% File: l3pdfpdffield-choice.dtx
+
+
+\RequirePackage{l3draw}
+\seq_new:N \l__pdffield_choice_values_seq
+\seq_new:N \l__pdffield_choice_defaultvalues_seq
+\seq_new:N \l__pdffield_choice_displayvalues_seq
+\seq_new:N \l__pdffield_choice_opt_seq
+\cs_new_protected:Npn \__pdffield_choice_field:n #1 %name
+ {
+ \pdf_object_if_exist:nF {__pdffield/field/__pdffield/choice/#1}
+ {
+ \seq_clear:N \l__pdffield_choice_opt_seq
+ \seq_map_indexed_inline:Nn \l__pdffield_choice_values_seq
+ {
+ \pdf_string_from_unicode:nnN{utf16/hex}{##2}\l__pdffield_tmpa_str
+ \tl_set:Nx \l__pdffield_tmpa_tl {\seq_item:Nn \l__pdffield_choice_displayvalues_seq {##1} }
+ \tl_if_empty:NTF \l__pdffield_tmpa_tl
+ {
+ \seq_put_right:NV \l__pdffield_choice_opt_seq \l__pdffield_tmpa_str
+ }
+ {
+ \exp_args:NnV
+ \pdf_string_from_unicode:nnN{utf16/hex}\l__pdffield_tmpa_tl\l__pdffield_tmpb_str
+ \seq_put_right:Nx \l__pdffield_choice_opt_seq
+ { [ \l__pdffield_tmpa_str\c_space_tl\l__pdffield_tmpb_str] }
+ }
+ }
+ \pdf_object_unnamed_write:nx {array}{\seq_use:Nn\l__pdffield_choice_opt_seq {~}}
+ \pdfdict_put:nnx { l__pdffield/field }{Opt} { \pdf_object_ref_last: }
+ \int_compare:nNnTF {\bitset_item:Nn \l__pdffield_Ff_bitset {MultiSelect}} = {1}
+ {
+ \tl_clear:N \l__pdffield_tmpa_tl
+ \seq_map_inline:Nn \l__pdffield_choice_defaultvalues_seq
+ {
+ \pdf_string_from_unicode:nnN{utf16/hex}{##1}\l__pdffield_tmpa_str
+ \tl_put_right:NV \l__pdffield_tmpa_tl \l__pdffield_tmpa_str
+ \pdfdict_put:nnx { l__pdffield/field }{V} { [ \l__pdffield_tmpa_tl ] }
+ }
+ }
+ {
+ \tl_set:Nx \l__pdffield_tmpa_tl {\seq_item:Nn \l__pdffield_choice_defaultvalues_seq {1} }
+ \exp_args:NnV
+ \pdf_string_from_unicode:nnN{utf16/hex}\l__pdffield_tmpa_tl\l__pdffield_tmpb_str
+ \pdfdict_put:nnx { l__pdffield/field }{V} { \l__pdffield_tmpb_str }
+ }
+ \__pdffield_field:n { __pdffield/choice/#1 }
+ }
+ \keys_set:nn {pdffield}{parent=__pdffield/choice/#1}
+ }
+\cs_generate_variant:Nn \__pdffield_choice_field:n {V}
+\cs_new_protected:Npn \__pdffield_choice:n #1
+ {
+ \group_begin:
+ \cs_set_eq:NN\__pdffield_value_handler:n \__pdffield_choice_value_handler:n
+ \cs_set_eq:NN\__pdffield_default_handler:n \__pdffield_choice_default_handler:n
+ \__pdffield_textfield_default_appearance:
+ \keys_set:nn {pdffield}
+ {
+ fieldID=
+ ,name=choice
+ ,appearance = pdffield/textfield/default
+ ,width = 3cm
+ ,height = \normalbaselineskip
+ ,type=combo-edit
+ ,__pdffield/preset/choice
+ ,#1
+ ,FT= Ch
+ }
+ \__pdffield_choice_set_type:
+ \keys_set:nn {pdffield}
+ {
+ ,DA=
+ {
+ \pdf_name_from_unicode_e:n{\l__pdffield_DA_fontname_tl}
+ \c_space_tl
+ \dim_to_decimal_in_bp:n{\l__pdffield_DA_fontsize_dim}
+ \c_space_tl
+ Tf
+ \c_space_tl
+ \l__pdffield_DA_fontcolor_tl
+ \c_space_tl
+ %\l__pdffield_text_DAextra_tl
+ }
+ }
+ \tl_if_empty:NT\l__pdffield_fieldID_tl
+ {
+ \pdfdict_get:nnN {l__pdffield/field}{T}\l__pdffield_fieldID_tl
+ \tl_put_left:Nn \l__pdffield_fieldID_tl {__pdffield/choice/}
+ }
+ \__pdffield_choice_field:V\l__pdffield_fieldID_tl
+ \__pdffield_annot:
+ \group_end:
+ }
+\cs_new_protected:Npn \__pdffield_choice_value_handler:n #1
+ {
+ \seq_set_from_clist:Nn \l__pdffield_choice_values_seq {#1}
+ }
+\cs_new_protected:Npn \__pdffield_choice_default_handler:n #1
+ {
+ \seq_set_from_clist:Nn \l__pdffield_choice_defaultvalues_seq {#1}
+ }
+\keys_define:nn{pdffield}
+ {
+ values .meta:n = {value={#1}}
+ ,default-values .meta:n = {default={#1}}
+ ,display-values .code:n =
+ {
+ \seq_set_from_clist:Nn \l__pdffield_choice_displayvalues_seq {#1}
+ }
+ ,top-index .code:n =
+ {
+ \pdfdict_put:nnx {l__pdffield/field}{TI}{\int_eval:n{#1-1}}
+ }
+ }
+\cs_new_protected:Npn \__pdffield_choice_set_type: {}
+
\keys_define:nn { pdffield }
- {
- fieldID .tl_set:N = \l__pdffield_fieldID_tl
+ {
+ type .choice:
+ ,type / combo .code:n =
+ {
+ \cs_set_protected:Npn\__pdffield_choice_set_type:
+ {
+ \keys_set:nn{pdffield}{setFf={Combo},unsetFf={Edit,DoNotSpellCheck}}
+ }
+ }
+ ,type / combo-edit .code:n =
+ {
+ \cs_set_protected:Npn\__pdffield_choice_set_type:
+ {
+ \keys_set:nn{pdffield}{setFf={Combo,Edit}}
+ }
+ }
+ ,type / list .code:n =
+ {
+ \cs_set_protected:Npn\__pdffield_choice_set_type:
+ {
+ \keys_set:nn{pdffield}{unsetFf={Combo,Edit,},unsetFf={Edit,DoNotSpellCheck}}
+ }
+ }
+ }
+\cs_new_protected:Npn \__pdffield_choice_appearance_handler:nnn #1 #2 #3 %name, type, text
+ {
+ }
+
+\cs_set_eq:NN \pdffield_choice:n \__pdffield_choice:n
+%% File: l3pdfpdffield-action.dtx
+
+\msg_new:nnn {pdffield}{action-name-undefined}
+ {
+ The~`#1`~action~name~`#2`~is~not~defined~and~
+ will~be~ignored.
+ }
+
+\tl_new:N \l__pdffield_action_export_tl
+\seq_new:N \l__pdffield_action_Fields_seq
+\tl_new:N \l__pdffield_action_next_tl
+\pdfdict_new:n {l__pdffield/ResetForm}
+\pdfdict_put:nnn {l__pdffield/ResetForm}{Type}{/Action}
+\pdfdict_put:nnn {l__pdffield/ResetForm}{S}{/ResetForm}
+\pdfdict_new:n {l__pdffield/SubmitForm}
+\pdfdict_put:nnn {l__pdffield/SubmitForm}{Type}{/Action}
+\pdfdict_put:nnn {l__pdffield/SubmitForm}{S}{/SubmitForm}
+\bitset_new:Nn \l__pdffield_Flags_bitset
+ {
+ Include/Exclude = 1
+ ,IncludeNoValueFields = 2
+ ,ExportFormat = 3
+ ,GetMethod = 4
+ ,SubmitCoordinates = 5
+ ,XFDF = 6
+ ,IncludeAppendSaves = 7
+ ,IncludeAnnotations = 8
+ ,SubmitPDF = 9
+ ,CanonicalFormat = 10
+ ,ExclNonUserAnnots = 11
+ ,ExclFKey = 12
+ ,EmbedForm = 14
+ ,include/exclude = 1
+ ,includenovaluefields = 2
+ ,exportformat = 3
+ ,getmethod = 4
+ ,submitcoordinates = 5
+ ,xfdf = 6
+ ,includeappendsaves = 7
+ ,includeannotations = 8
+ ,submitpdf = 9
+ ,canonicalformat = 10
+ ,exclnonuserannots = 11
+ ,exclfkey = 12
+ ,embedform = 14
+ }
+\cs_new_protected:Npn \__pdffield_action_flags_pdf:
+ {
+ \bitset_clear:N \l__pdffield_Flags_bitset
+ \bitset_set_true:Nn \l__pdffield_Flags_bitset { SubmitPDF }
+ }
+
+\cs_new_protected:Npn \__pdffield_action_flags_html:
+ {
+ \bitset_set_true:Nn \l__pdffield_Flags_bitset { ExportFormat }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { XFDF }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { IncludeAppendSaves }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { IncludeAnnotations }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { SubmitPDF }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { ExclNonUserAnnots }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { ExclFKey }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { EmbedForm }
+ }
+
+\cs_new_protected:Npn \__pdffield_action_flags_fdf:
+ {
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { ExportFormat }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { GetMethod }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { SubmitCoordinates }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { XFDF }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { SubmitPDF }
+ }
+
+\cs_new_protected:Npn \__pdffield_action_flags_xfdf:
+ {
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { ExportFormat }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { GetMethod }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { SubmitCoordinates }
+ \bitset_set_true:Nn \l__pdffield_Flags_bitset { XFDF }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { IncludeAppendSaves }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { IncludeAnnotations }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { SubmitPDF }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { ExclNonUserAnnots }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { ExclFKey }
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset { EmbedForm }
+ }
+\keys_define:nn { pdffield }
+ {
+ reset .code:n =
+ {
+ \cs_if_exist:cTF { __pdffield_action_reset_#1: }
+ {
+ \use:c { __pdffield_action_reset_#1: }
+ \pdfannot_dict_put:nnx{widget}
+ {A}
+ {\tl_use:c { c__pdffield_action_reset_#1_tl } }
+ }
+ {
+ \msg_warning:nnnn{pdffield}{action-name-undefined}{reset}{#1}
+ }
+ }
+ ,reset .default:n = all
+ }
+
+\keys_define:nn { pdffield }
+ {
+ submit .code:n =
+ {
+ \cs_if_exist:cTF { __pdffield_action_submit_#1: }
+ {
+ \use:c { __pdffield_action_submit_#1: }
+ \pdfannot_dict_put:nnx{widget}
+ {A}
+ {\tl_use:c { c__pdffield_action_submit_#1_tl } }
+ }
+ {
+ \msg_warning:nnnn{pdffield}{action-name-undefined}{submit}{#1}
+ }
+ }
+ }
+
+\keys_define:nn { pdffield }
+ {
+ import .code:n =
+ {
+ \pdf_string_from_unicode:nnN {utf8/string}{#1}\l__pdffield_tmpa_str
+ \pdf_object_unnamed_write:nx {dict}{/Type/Action/S/ImportData/F\l__pdffield_tmpa_str}
+ \pdfannot_dict_put:nnx{widget}
+ {A}
+ {\pdf_object_ref_last: }
+ }
+ }
+
+\keys_define:nn { pdffield / action }
+ {
+ fields .code:n =
+ {
+ \clist_map_inline:nn {#1}
+ {
+ \pdf_string_from_unicode:nnN {utf8/string}{##1}\l__pdffield_tmpa_str
+ \seq_put_right:NV\l__pdffield_action_Fields_seq \l__pdffield_tmpa_str
+ }
+ }
+ ,exclude .code:n = { \bitset_set_true:Nn \l__pdffield_Flags_bitset {Include/Exclude }}
+ ,include .code:n = { \bitset_set_false:Nn \l__pdffield_Flags_bitset {Include/Exclude }}
+ ,export .choices:nn = {pdf,fdf,html,xfdf}
+ {
+ \tl_set:Nn \l__pdffield_action_export_tl {#1}
+ }
+ ,export .initial:n = {html}
+ ,charset .choices:nn =
+ {utf-8, utf-16, Shift-JIS, BigFive, GBK, UHC}
+ { \pdfdict_put:nnn { l__pdffield/SubmitForm }{#1} }
+ ,urlencode .bool_set:N = \l__pdffield_url_encode_bool
+ ,next .tl_set:N = \l__pdffield_action_next_tl
}
-\cs_new_protected:Npn \__pdffield_textfield_value_handler:nN #1#2
+\keys_define:nn { pdffield / action }
{
- \pdf_string_from_unicode:nnN {utf8/string}{#1}#2
+ ,setFlags .code:n =
+ {
+ \clist_map_inline:nn {#1}
+ {
+ \bitset_set_true:Nn \l__pdffield_Flags_bitset {##1}
+ }
+ }
+ ,setsubmitflags .meta:n = {setFlags={#1}}
+ ,unsetFlags .multichoice:
+ ,unsetFlags / all .code:n = { \bitset_clear:N \l__pdffield_Flags_bitset}
+ ,unsetFlags / unknown .code:n =
+ {
+ \bitset_set_false:Nn \l__pdffield_Flags_bitset {#1}
+ }
+ ,unsetsubmitflags .meta:n = {unsetFlags={#1}}
}
-\cs_set_eq:NN \pdffield_textfield:n \__pdffield_textfield:n
+\cs_new_protected:Npn \__pdffield_action_reset_new:nn #1 #2 %#1 name, #2 keyval
+ {
+ \cs_new_protected:cpn {__pdffield_action_reset_#1:}
+ {
+ \group_begin:
+ \seq_clear:N \l__pdffield_action_Fields_seq
+ \keys_set:nn { pdffield / action }{ #2 }
+ \pdf_object_unnamed_write:nx
+ { array }
+ { \seq_use:Nn \l__pdffield_action_Fields_seq {~} }
+ \tl_if_empty:NF \l__pdffield_action_next_tl
+ {
+ \pdfdict_put:nnx {l__pdffield/ResetForm}{Next}{\l__pdffield_action_next_tl}
+ }
+ \pdfdict_put:nnx
+ { l__pdffield/ResetForm }
+ { Fields }
+ { \pdf_object_ref_last: }
+ \pdfdict_put:nnx
+ { l__pdffield/ResetForm }
+ { Flags }
+ { \bitset_item:Nn\l__pdffield_Flags_bitset{Include/Exclude} }
+ \pdf_object_unnamed_write:nx
+ { dict }
+ { \pdfdict_use:n{l__pdffield/ResetForm} }
+ \tl_const:cx { c__pdffield_action_reset_#1_tl } { \pdf_object_ref_last: }
+ \cs_gset_eq:cN {__pdffield_action_reset_#1:} \prg_do_nothing:
+ \group_end:
+ }
+ }
+
+\__pdffield_action_reset_new:nn {all}{fields={},exclude}
+\cs_new_protected:Npn \__pdffield_action_submit_new:nn #1 #2 %#1 name, #2 keyval
+ {
+ \group_begin:
+ \char_set_catcode_other:N \%
+ \char_set_catcode_other:N \#
+ \__pdffield_action_submit_new:nnn {#1}{#2}
+ }
+\cs_new_protected:Npn \__pdffield_action_submit_new:nnn #1 #2 #3 %#1 name, #2 keyval, #3 url
+ {
+ \group_end:
+ \cs_new_protected:cpn {__pdffield_action_submit_#1:}
+ {
+ \group_begin:
+ \seq_clear:N \l__pdffield_action_Fields_seq
+ \bitset_clear:N \l__pdffield_Flags_bitset
+ \keys_set:nn {pdffield/action}{#2}
+ \use:c{ __pdffield_action_flags_\l__pdffield_action_export_tl :}
+ \pdfdict_put:nnx
+ { l__pdffield/SubmitForm }
+ { Flags }
+ { \bitset_to_arabic:N \l__pdffield_Flags_bitset }
+ \tl_if_empty:NF \l__pdffield_action_next_tl
+ {
+ \pdfdict_put:nnx {l__pdffield/SubmitForm}{Next}{\l__pdffield_action_next_tl}
+ }
+ \bool_if:NTF \l__pdffield_url_encode_bool
+ { \pdf_string_from_unicode:nnN { utf8/URI } {#3}\l__pdffield_tmpa_str }
+ { \pdf_string_from_unicode:nnN { utf8/string }{#3}\l__pdffield_tmpa_str }
+ \pdf_object_unnamed_write:nx {dict}
+ {
+ /FS/URL
+ /F \l__pdffield_tmpa_str
+ }
+ \pdfdict_put:nnx
+ { l__pdffield/SubmitForm }
+ { F }
+ { \pdf_object_ref_last: }
+ \pdf_object_unnamed_write:nx
+ { dict }
+ { \pdfdict_use:n{ l__pdffield/SubmitForm } }
+ \tl_const:cx { c__pdffield_action_submit_#1_tl } { \pdf_object_ref_last: }
+ \cs_gset_eq:cN { __pdffield_action_submit_#1: } \prg_do_nothing:
+ \group_end:
+ }
+ }
+
+\cs_set_eq:NN \pdffield_reset_new:nn \__pdffield_action_reset_new:nn
+\cs_set_eq:NN \pdffield_submit_new:nnn \__pdffield_action_submit_new:nn
+
%%
%%
%% End of file `l3pdffield-testphase.sty'.
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty
index 43ac3a7ce95..9fa7a399304 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty
@@ -22,9 +22,11 @@
%% This work consists of the main source file pdflscape-ltx.sty
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesExplPackage{pdflscape-ltx}{2021-05-14}{0.95d}
+\ProvidesExplPackage{pdflscape-ltx}{2021-06-14}{0.95e}
{Display of landscape pages in PDF - adaption of pdflscape to the PDFmanagement bundle (testphase)}
+\DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}}
+\ProcessOptions
\RequirePackage{lscape}
% this always turns in the same direction as pdflscape does too.
% left and right would need
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty
index e641d3c7357..c03a0e415af 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: pdfmanagement-firstaid.dtx
-\ProvidesExplPackage{pdfmanagement-firstaid}{2021-05-14}{0.95d}
+\ProvidesExplPackage{pdfmanagement-firstaid}{2021-06-14}{0.95e}
{LaTeX PDF management testphase bundle / firstaid-patches}
\clist_map_inline:nn {pgf,transparent,hyperxmp,pdflscape,xcolor,color,beamer}
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx
index 847300ef601..70a7ca12ca5 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx
@@ -27,7 +27,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: pdfmanagement-testphase.dtx
-\ProvidesExplFile{pdfmanagement-testphase.ltx}{2021-05-14}{0.95d}
+\ProvidesExplFile{pdfmanagement-testphase.ltx}{2021-06-14}{0.95e}
{PDF~management~code~(testphase)}
%% File: l3pdfdict.dtx
\cs_new:Npn \__pdfdict_get_type:n #1
@@ -507,9 +507,12 @@
\pdfdict_new:n { g__pdf_Core/Pages}
\cs_new_protected:Npn \__pdfmanagement_Pages_gpush:
{
- \exp_args:Nx \__pdf_backend_Pages_primitive:n
+ \pdfdict_if_empty:nF { g__pdf_Core/Pages}
{
- \pdfdict_use:n { g__pdf_Core/Pages}
+ \exp_args:Nx \__pdf_backend_Pages_primitive:n
+ {
+ \pdfdict_use:n { g__pdf_Core/Pages}
+ }
}
}
@@ -1020,7 +1023,7 @@
\keys_set:nn {document / metadata} {_pdfstandard=\str_uppercase:n{#1}}
}
,_pdfstandard .choices:nn =
- {A-1B,A-2B,A-3B}
+ {A-1B,A-2B,A-2U,A-3B,A-3U}
{
\prop_if_exist:cT { g__pdfmeta_standard_pdf/#1_prop }
{
@@ -1354,6 +1357,8 @@
{
,name = pdf/A-1B
,type = A
+ ,level = 1
+ ,conformance = B
,year = 2005
,min_pdf_version = 1.4 %minimum
,no_encryption =
@@ -1412,10 +1417,23 @@
{ g__pdfmeta_standard_pdf/A-2B_prop }{name}{pdf/A-2B}
\prop_gput:cnn
{ g__pdfmeta_standard_pdf/A-2B_prop }{year}{2011}
+\prop_gput:cnn
+ { g__pdfmeta_standard_pdf/A-2B_prop }{level}{2}
\prop_gremove:cn
{ g__pdfmeta_standard_pdf/A-2B_prop }
{ embed_content}
+\prop_new:c { g__pdfmeta_standard_pdf/A-2U_prop }
+\prop_gset_eq:cc
+ { g__pdfmeta_standard_pdf/A-2U_prop }
+ { g__pdfmeta_standard_pdf/A-2B_prop }
+\prop_gput:cnn
+ { g__pdfmeta_standard_pdf/A-2U_prop }{name}{pdf/A-2U}
+\prop_gput:cnn
+ { g__pdfmeta_standard_pdf/A-2U_prop }{conformance}{U}
+\prop_gput:cnn
+ { g__pdfmeta_standard_pdf/A-2U_prop }{unicode}{}
+
\prop_new:c { g__pdfmeta_standard_pdf/A-3B_prop }
\prop_gset_eq:cc
{ g__pdfmeta_standard_pdf/A-3B_prop }
@@ -1423,10 +1441,23 @@
\prop_gput:cnn
{ g__pdfmeta_standard_pdf/A-3B_prop }{name}{pdf/A-3B}
\prop_gput:cnn
- { g__pdfmeta_standard_pdf/A-2B_prop }{year}{2012}
+ { g__pdfmeta_standard_pdf/A-3B_prop }{year}{2012}
+\prop_gput:cnn
+ { g__pdfmeta_standard_pdf/A-3B_prop }{level}{3}
\prop_gremove:cn
{ g__pdfmeta_standard_pdf/A-3B_prop }
{ embed_content}
+
+\prop_new:c { g__pdfmeta_standard_pdf/A-3U_prop }
+\prop_gset_eq:cc
+ { g__pdfmeta_standard_pdf/A-3U_prop }
+ { g__pdfmeta_standard_pdf/A-3B_prop }
+\prop_gput:cnn
+ { g__pdfmeta_standard_pdf/A-3U_prop }{name}{pdf/A-3U}
+\prop_gput:cnn
+ { g__pdfmeta_standard_pdf/A-3U_prop }{conformance}{U}
+\prop_gput:cnn
+ { g__pdfmeta_standard_pdf/A-3U_prop }{unicode}{}
\prop_new:N \g__pdfmeta_outputintents_prop
\keys_define:nn { document / metadata }
{
@@ -1651,6 +1682,7 @@
\exp_not:N \str_replace_all:Nnn #2 {\c_percent_str 2C} {,}
\exp_not:N \str_replace_all:Nnn #2 {\c_percent_str 3B} {;}
\exp_not:N \str_replace_all:Nnn #2 {\c_percent_str 3D} {=}
+ \exp_not:N \str_replace_all:Nnn #2 {\c_percent_str 3F} {?}
\exp_not:N \str_replace_all:Nnn #2 {\c_percent_str 30} {0}
\exp_not:N \str_replace_all:Nnn #2 {\c_percent_str 31} {1}
\exp_not:N \str_replace_all:Nnn #2 {\c_percent_str 32} {2}
@@ -1889,6 +1921,8 @@
}
}
+\cs_set_eq:NN \pdffile_filespec:nnn \__pdffile_filespec_write:nnn
+\cs_generate_variant:Nn \pdffile_filespec:nnn {nnx}
\cs_new_protected:Npn \pdffile_embed_file:nnn #1 #2 #3
{ % if #1 empty => only filespec
% if #2 empty => = #1
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty
index 3161539cf01..c6030be61dc 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty
@@ -19,7 +19,7 @@
%% and all files in that bundle must be distributed together.
%%
%% File: pdfmanagement-testphase.dtx
-\ProvidesExplPackage{pdfmanagement-testphase}{2021-05-14}{0.95d}
+\ProvidesExplPackage{pdfmanagement-testphase}{2021-06-14}{0.95e}
{LaTeX PDF management testphase bundle}
\providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
\IfFormatAtLeastTF{2020-10-01}{}{
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty
index 4b4030c4b2f..be65dc7a52d 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty
@@ -3,7 +3,7 @@
%% a replacement for transparent sty from Heiko Oberdiek
%%
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\ProvidesExplPackage{transparent-ltx}{2021-05-14}{0.95d}
+\ProvidesExplPackage{transparent-ltx}{2021-06-14}{0.95e}
{Transparency with color stacks (replacement for transparent.sty from Heiko Oberdiek)}%
\RequirePackage{l3opacity}
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty
index 76aee08fef9..2070e1b15e8 100644
--- a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty
+++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty
@@ -1,6 +1,6 @@
%% LaTeX2e file `xcolor-patches.sty'
%%
-\ProvidesPackage{xcolor-patches-tmp-ltx}[2021-05-14 v0.95d patch xcolor for l3color]
+\ProvidesPackage{xcolor-patches-tmp-ltx}[2021-06-14 v0.95e patch xcolor for l3color]
\@ifundefined{color_set:nn}{\RequirePackage{l3color}}{}
\ExplSyntaxOn