[latex3-commits] [git/LaTeX3-latex3-pdfresources] textfields: some more tests (cc79441)
Ulrike Fischer
fischer at troubleshooting-tex.de
Mon Mar 29 19:16:52 CEST 2021
Repository : https://github.com/latex3/pdfresources
On branch : textfields
Link : https://github.com/latex3/pdfresources/commit/cc7944118000d88d200e1314838ebaefaaa74dbf
>---------------------------------------------------------------
commit cc7944118000d88d200e1314838ebaefaaa74dbf
Merge: 0873976 73e3c9b
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Mon Mar 29 19:16:52 2021 +0200
some more tests
>---------------------------------------------------------------
cc7944118000d88d200e1314838ebaefaaa74dbf
experiments/testfield1.tex | 78 ++++++++++++++++++++++++++++++++++++----------
1 file changed, 62 insertions(+), 16 deletions(-)
diff --cc experiments/testfield1.tex
index 37145e7,2be8719..0055648
--- a/experiments/testfield1.tex
+++ b/experiments/testfield1.tex
@@@ -23,10 -23,15 +23,17 @@@
}
}
\pdfdict_put:nnn {l__pdffield/text/field}{T}{(#1)}
- % V,DV ??
- %DA?
+ % V,DV ??
+ %DA?
\pdfdict_put:nnx {l__pdffield/text/field}{V}{(blub?)}
+ %\pdfdict_put:nnx {l__pdffield/text/field}{DA}{(/F\__pdffield_fontname:\c_space_tl 10\c_space_tl Tf~1~0~0~rg)}
+ \pdfdict_put:nnx {l__pdffield/text/field}{DV}{(blub?)}
+ \pdfdict_put:nnx {l__pdffield/text/field}{DA}{(%/F\__pdffield_fontname:
- /MyBlub
++ %/MyBlub
++ /F\__pdffield_fontname:
+ \c_space_tl 10\c_space_tl
+ Tf~%
+ \l_pdffield_text_color_tl)}
\pdfdict_put:nnx {l__pdffield/text/field}
{Kids}
{
@@@ -213,10 -234,10 +239,12 @@@
%\iftutex
\setmainfont{Times New Roman} %works
%\setsansfont{comicsansms} %works
--\setsansfont{comicsansms}
++%\setsansfont{comicsansms}
++%\setsansfont{arial}
%\setmainfont{calibri} % doesn't work /CIDFontType2
%\setsansfont{dejavusans} % doesn't work /CIDFontType2 texlive
%\setsansfont{NotoSans}
++\setsansfont{dejavuserif}
\fi
%\usepackage{helvet}
%\usepackage{times}
@@@ -226,31 -247,46 +254,49 @@@
\begin{document}
\ExplSyntaxOn
- %\sffamily
+ \pdf_object_unnamed_write:nn {dict}
+ {
+ /Type /Font
+ /Subtype /Type1
+ /BaseFont /Helvetica
+ % /Encoding /WinAnsiEncoding
+ }
-\pdfmanagement_add:nxx{Catalog/AcroForm/DR/Font}{MyBlub}{\pdf_object_ref_last:}
++%\pdfmanagement_add:nxx{Catalog/AcroForm/DR/Font}{MyBlub}{\pdf_object_ref_last:}
+
+ %\sffamily
+ \bitset_set_true:Nn \l__pdffield_F_bitset {Print}
+ %\pdfdict_put:nnn {l__pdffield/text/annot}{Border}{[1~1~1]}
+ %\pdfdict_put:nnn {l__pdffield/text/annot}{C}{[1~0~0]}
%\sffamily
%\pdfmanagement_add:nnx{Catalog/AcroForm}{DA}{(/F\__pdffield_fontname:\c_space_tl 10\c_space_tl Tf~1~0~0~rg)}
-\pdfmanagement_add:nnx{Catalog/AcroForm}{DA}{(/MyBlub\c_space_tl 10\c_space_tl Tf~1~0~0~rg)}
++%\pdfmanagement_add:nnx{Catalog/AcroForm}{DA}{(/MyBlub\c_space_tl 10\c_space_tl Tf~1~0~0~rg)}
%\pdfmanagement_add:nxx{Catalog/AcroForm/DR/Font}{F\__pdffield_fontname:}{\__pdffield_fontobjnum:\c_space_tl0 \c_space_tl R}
- %%\sffamily
- %{\font\test=t1-yvtb \test a
- %\pdfmanagement_add:nxx{Catalog/AcroForm/DR/Font}{F\__pdffield_fontname:}{\__pdffield_fontobjnum:\c_space_tl0 \c_space_tl R}}
-
-
- \par
%\sffamily
- {\font\test=t1-yvtb \test
- zzz \__pdffield_text_add:n {name=blub2,width=4cm,height=15pt}}
+ %\font\test=phvr8r\test
+ %\pdfmanagement_add:nxx{Catalog/AcroForm/DR/Font}{F\__pdffield_fontname:}{\__pdffield_fontobjnum:\c_space_tl0 \c_space_tl R}
-
-\__pdffield_text_add:n {name=blub2,width=4cm,height=15pt,align=center}
++\pdfmanagement_add:nxx{Catalog/AcroForm/DR/Font}{F\__pdffield_fontname:}{\__pdffield_fontobjnum:\c_space_tl0 \c_space_tl R}
++\__pdffield_text_add:n {name=blub3,width=4cm,height=15pt,align=center}
\par
- \rmfamily
- zzz\__pdffield_text_add:n {name=blub1,width=4cm,height=15pt}
-%\sffamily
-zzz \__pdffield_text_add:n {name=blub2,width=4cm,height=15pt,align=center,color=green}
++\sffamily
++\pdfmanagement_add:nnx{Catalog/AcroForm}{DA}{(/F\__pdffield_fontname:\c_space_tl 10\c_space_tl Tf~1~0~0~rg)}
++\pdfmanagement_add:nxx{Catalog/AcroForm/DR/Font}{F\__pdffield_fontname:}{\__pdffield_fontobjnum:\c_space_tl0 \c_space_tl R}
++zzz \__pdffield_text_add:n {name=blub2,width=4cm,height=15pt}
+
-\par
-\rmfamily
-\pdfdict_put:nnn {l__pdffield/text/annot}{MK}{<</BC[1~0~0]/BG[1~1~1]>>}
-\pdfdict_put:nnn {l__pdffield/text/annot}{BS}{<</W~1 /S/S>>}
-zzz\__pdffield_text_add:n {name=blub1,width=4cm,height=15pt,color=red}
++%\par
++%\rmfamily
++%\pdfmanagement_add:nxx{Catalog/AcroForm/DR/Font}{F\__pdffield_fontname:}{\__pdffield_fontobjnum:\c_space_tl0 \c_space_tl R}
++%\pdfdict_put:nnn {l__pdffield/text/annot}{MK}{<</BC[1~0~0]/BG[1~1~1]>>}
++%\pdfdict_put:nnn {l__pdffield/text/annot}{BS}{<</W~1 /S/S>>}
++%zzz\__pdffield_text_add:n {name=blub1,width=4cm,height=15pt,color=red}
%\sffamily
%\newsavebox\textbox
%\sbox\textbox{\makebox[0pt]{}}
\AddToHook{shipout/background}{%
-- %\put(0,30){\sffamily\int_step_inline:nnn{33}{255}{\char#1\relax\c_space_tl}}
++ \put(0,30){\sffamily\int_step_inline:nnn{33}{255}{\char#1\relax\c_space_tl}}
\put(0,30){\rmfamily\int_step_inline:nnn{33}{255}{\char#1\relax\c_space_tl}}
}
More information about the latex3-commits
mailing list.