latex3 / pdfresources

LaTeX PDF resource management
LaTeX Project Public License v1.3c
22 stars 5 forks source link

using a pdffield inside measuring code can break the field #70

Open u-fischer opened 1 month ago

u-fischer commented 1 month ago
\DocumentMetadata{uncompress,xmp=false}
\documentclass{article}
\usepackage{l3pdffield-testphase}
\begin{document}
xxx
\ExplSyntaxOn\makeatletter
\settowidth\@tempdima{\pdffield_checkbox:n{name=blub}}
\pdffield_checkbox:n{name=blub}
\ExplSyntaxOff
\end{document}

Here the Kids array contains then two Kids, and the first has no related annotation:

11 0 obj
<< /T (blub) /V /Off /DV /Off /FT /Btn /Kids 12 0 R /Ff 0  >>
endobj

12 0 obj
[ 14 0 R 16 0 R ]

16 0 obj
<<
/Type /Annot
/Subtype /Widget /AS /Off /F 0 /Parent 11 0 R /AP 15 0 R 
/Rect [167.807 655.243 179.763 667.198]
>>

One could probably use a label to check if the annotation was really used, but tagging will break too, so probably it should be documented as non-working until some proper "if measuring test" exist.