[latex3-commits] [git/LaTeX3-latex3-pdfresources] backendtest: more working on forms (b21a230)
Ulrike Fischer
fischer at troubleshooting-tex.de
Mon Sep 9 21:29:14 CEST 2019
Repository : https://github.com/latex3/pdfresources
On branch : backendtest
Link : https://github.com/latex3/pdfresources/commit/b21a2308a9f1345384d97f2d35ef85bf7dbb6a32
>---------------------------------------------------------------
commit b21a2308a9f1345384d97f2d35ef85bf7dbb6a32
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Mon Sep 9 21:29:14 2019 +0200
more working on forms
>---------------------------------------------------------------
b21a2308a9f1345384d97f2d35ef85bf7dbb6a32
experiments/formpushfields.tex | 9 +++++----
hgeneric-experimental.def | 38 +++++++++++++++++++++-----------------
2 files changed, 26 insertions(+), 21 deletions(-)
diff --git a/experiments/formpushfields.tex b/experiments/formpushfields.tex
index 0140b72..a6e1443 100644
--- a/experiments/formpushfields.tex
+++ b/experiments/formpushfields.tex
@@ -8,12 +8,13 @@
\begin{document}
\begin{Form}%[NeedAppearances=false] %radio buttons don't like this ...
[action=mailto:test at testnet.com,encoding=html, method=post]
-\TextField[charsize={10pt},multiline=true,height={5mm},width={5cm},name={text_info},bordercolor={0.2 0.2 0.7},default={}]{}
+\TextField[charsize={10pt},multiline=true,height={35mm},width={5cm},name={text_info},bordercolor={0.2 0.2 0.7},default={}]{}
-\Submit{Submit}
+\Submit{Submitxxxxxxxxxxx}
-\TextField[charsize={10pt},multiline=true,height={5mm},width={5cm},name={text_info},bordercolor={0.2 0.2 0.7},default={}]{}
-\PushButton[onclick={this.exportAsText()}]{Submit}
+\TextField[charsize={10pt},multiline=true,height={35mm},width={5cm},name={text_info},bordercolor={0.2 0.2 0.7},default={}]{}
+
+\PushButton[onclick={this.exportAsText()}]{Submitxxxxxxxxxxxxxxxx}
\end{Form}
\end{document}
diff --git a/hgeneric-experimental.def b/hgeneric-experimental.def
index 8811fd2..a56e359 100644
--- a/hgeneric-experimental.def
+++ b/hgeneric-experimental.def
@@ -37,14 +37,15 @@
{PDF/A:~Reset~action~is~prohibited}
%% I require the bookmark package to get rid of some of the bookmarks code.
-\AtEndOfPackage{% so that we are later than KOMA ...
-\AtBeginDocument
- {
- \ltx at ifpackageloaded{bookmark}
- {}
- {\msg_error:nn {hyp}{missing-bookmark-package}}
- }}
-
+% but the testing code doesn't work.
+% !!!!!!!!!!!!!!!!!!!!! to do !!!!!!!!!!!!!!!!!!!!!
+%\Hy at AtEndOfPackage{% so that we are later than KOMA ...
+%\AtBeginDocument
+% {
+% \ltx at ifpackageloaded{bookmark}
+% {}
+% {\msg_error:nn {hyp}{missing-bookmark-package}}
+% }}
% booleans for the (some) option keys. As hyperref disables them it is okay to set them here,
% hypersetup can't interfere
%%% pdfa key:
@@ -1101,6 +1102,7 @@
{\Fld at height}
{0pt} %is this correct?
{\PDFForm at Text}
+ \MakeTextField{\Fld at width}{\Fld at height}
\HyField at AddToFields
}%
\endgroup
@@ -1259,12 +1261,13 @@
\mode_leave_vertical:
\HyAnn at AbsPageLabel
\Hy at escapeform\PDFForm at Push
+ \hbox_set:Nn \l_tmpa_box { \MakeButtonField {#2}}
\pdf_annotation:nnnn
- {\Fld at width}
- {\Fld at height}
- {0pt} %is this correct?
+ {\box_wd:N\l_tmpa_box}
+ {\box_ht:N\l_tmpa_box}
+ {\box_dp:N\l_tmpa_box} %is this correct?
{\PDFForm at Push}
- {\MakeButtonField{#2}}
+ {\box_use:N\l_tmpa_box}
\HyField at AddToFields
}
}
@@ -1289,10 +1292,11 @@
\mode_leave_vertical:
\HyAnn at AbsPageLabel
\Hy at escapeform\PDFForm at Submit
- \pdf_annotation:nnnn
- {\Fld at width}
- {\Fld at height}
- {0pt} %is this correct?
+ \hbox_set:Nn \l_tmpa_box { \MakeButtonField {#2}}
+ \pdf_annotation:nnnn
+ {\box_wd:N\l_tmpa_box}
+ {\box_ht:N\l_tmpa_box}
+ {\box_dp:N\l_tmpa_box} %is this correct?
{
\PDFForm at Submit
/AP<<
@@ -1300,7 +1304,7 @@
/D~\pdf_xform_ref:n {__hyp_xform_SubmitP}
>>
}
- { \MakeButtonField{#2} }
+ { \box_use:N\l_tmpa_box }
\HyField at AddToFields
\group_end:
}
More information about the latex3-commits
mailing list