[latex3-commits] [git/LaTeX3-latex3-pdfresources] renamedict77: working on attachfile (0738691)
Ulrike Fischer
fischer at troubleshooting-tex.de
Thu Apr 16 00:18:26 CEST 2020
Repository : https://github.com/latex3/pdfresources
On branch : renamedict77
Link : https://github.com/latex3/pdfresources/commit/07386911d769c2507bf7cdfe7615f26367e01f7a
>---------------------------------------------------------------
commit 07386911d769c2507bf7cdfe7615f26367e01f7a
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Thu Apr 16 00:18:26 2020 +0200
working on attachfile
>---------------------------------------------------------------
07386911d769c2507bf7cdfe7615f26367e01f7a
dicthandler.tex | 13 ++++++++--
newpackages/atfi-generic.def | 59 +++++++++++++++++++++++++-------------------
2 files changed, 45 insertions(+), 27 deletions(-)
diff --git a/dicthandler.tex b/dicthandler.tex
index 35918f4..3d595dd 100644
--- a/dicthandler.tex
+++ b/dicthandler.tex
@@ -50,6 +50,15 @@ ThisPage: code specific to one Page
ThisPage<number>: code specific to page <number>
+%% embedded/associated files
+General: /AF key: array of dictionaries pointing to filespec
+- Catalog : ok
+- Page: open
+- BDC + properties: open /AF /NamedAF BDC, /Properties <</NamedAF [12 0 R]>>, 12-> Filespec
+- StructureElement
+- XObject
+- Annotation
+
% object dictionaries
/Type/Filespec%
@@ -66,10 +75,10 @@ ThisPage<number>: code specific to page <number>
/Desc string
/AFRelationship name
/Thumb stream (pdf 2.0)
-/CI obj reference to dictionary
+/CI obj reference to dictionary (Collection item dict)
/EF: dictionary: /F objref to stream, /UF objref to stream (/EF=embedded
/RF: R=related
-/EP: dictionarie, related to encryption content unclear
+/EP: dictionary, related to encryption, content unclear
Stream object:
diff --git a/newpackages/atfi-generic.def b/newpackages/atfi-generic.def
index 7b51757..2aa7daa 100644
--- a/newpackages/atfi-generic.def
+++ b/newpackages/atfi-generic.def
@@ -102,11 +102,18 @@
% file already embedded
}%
}
-\ExplSyntaxOff
+% we probably need an xform by icon ...
+
\def\atfi at xform{%
- \immediate\pdfxform\atfi at appearancebox
- \edef\atfi at appearanceobj{\the\pdflastxform}%
+ \pdf_xform_new:nnn
+ { atfi at appearancebox }
+ { }
+ { \usebox\atfi at appearancebox }
+ %\immediate\pdfxform\atfi at appearancebox
+ %\edef\atfi at appearanceobj{\the\pdflastxform}%
}
+\ExplSyntaxOff
+
\let\atfi at xform@icon\atfi at xform
\def\atfi at refxform#1{%
\pdfrefxform#1\relax
@@ -115,11 +122,11 @@
\def\atfi at insert@file at annot#1{%
\rule{0pt}{0pt}%
\ifatfi at appearance
- \def\atfi at appearance@dict{%
+ \edef\atfi at appearance@dict{%
/AP<<%
- /N~ \atfi at appearanceobj\space 0~ R%
- /R~ \atfi at appearanceobj\space 0~ R%
- /D~ \atfi at appearanceobj\space 0~ R%
+ /N~ \pdf_xform_ref:n { atfi at appearancebox }%
+ /R~ \pdf_xform_ref:n { atfi at appearancebox }%
+ /D~ \pdf_xform_ref:n { atfi at appearancebox }%
>>%
}%
\else
@@ -146,24 +153,26 @@
\endgroup
}{%
}%
- \pdfannot width ~\atfi at scale\atfi at appearancewidth
- height~ \atfi at scale\atfi at appearanceheight
- depth~ \atfi at scale\atfi at appearancedepth {%
- /Subtype/FileAttachment%
- \atfi at icon
- \atfi at color@annot
- \atfi at author
- \atfi at date
- \atfi at annotname
- \atfi at description
- \atfi at subject
- \atfi at appearance@dict
- /F~ \theatfi at flags
- /FS~ \@nameuse{atfi at fsobj@#1}%
- }%
- \rule{0pt}{\atfi at appearanceheight}%
- \rule[-\atfi at appearancedepth]{0pt}{\atfi at appearancedepth}%
- \rule{\atfi at appearancewidth}{0pt}%
+ \pdfannot_box:nnnn
+ {\atfi at scale\atfi at appearancewidth}
+ {\atfi at scale\atfi at appearanceheight}
+ {\atfi at scale\atfi at appearancedepth}
+ {
+ /Subtype/FileAttachment%
+ \atfi at icon
+ \atfi at color@annot
+ \atfi at author
+ \atfi at date
+ \atfi at annotname
+ \atfi at description
+ \atfi at subject
+ \atfi at appearance@dict
+ /F~ \theatfi at flags
+ /FS~ \@nameuse{atfi at fsobj@#1}%
+ }%
+ %\rule{0pt}{\atfi at appearanceheight}%
+% \rule[-\atfi at appearancedepth]{0pt}{\atfi at appearancedepth}%
+% \rule{\atfi at appearancewidth}{0pt}%
}
\ExplSyntaxOff
\endinput
More information about the latex3-commits
mailing list.