[latex3-commits] [git/LaTeX3-latex3-pdfresources] splitting: clean up messages (913f5f5)

Ulrike Fischer fischer at troubleshooting-tex.de
Thu Jul 2 17:32:43 CEST 2020


Repository : https://github.com/latex3/pdfresources
On branch  : splitting
Link       : https://github.com/latex3/pdfresources/commit/913f5f5dc6c5091c26966cb471cbfbab65048d1b

>---------------------------------------------------------------

commit 913f5f5dc6c5091c26966cb471cbfbab65048d1b
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu Jul 2 17:32:43 2020 +0200

    clean up messages


>---------------------------------------------------------------

913f5f5dc6c5091c26966cb471cbfbab65048d1b
 experiments/embedfiles.tex | 22 +++++++++++++++-------
 l3pdffile.dtx              | 10 ----------
 2 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/experiments/embedfiles.tex b/experiments/embedfiles.tex
index 44d9b1b..405171c 100644
--- a/experiments/embedfiles.tex
+++ b/experiments/embedfiles.tex
@@ -17,12 +17,20 @@
 \ExplSyntaxOn
 %\pdftool_textstringlit_print:nN {xxxgrüße}\l_tmpa_str
 %\pdfextension outline goto name {Doc-Start}{\l_tmpa_str}
-\group_begin:
-\pdfdict_put:nnn  {file/FileSpec} {AFRelationship}{/Source}
-\pdftool_textstringlit_print:nN {this~is~something~odd~with~öäü}\l_tmpa_str
-\pdfdict_put:nnx  {file/FileSpec} {Desc}{\l_tmpa_str}
-\pdffile_embed_file:nnn {testinput.txt}{grüße.txt}{example1}
-\group_end:
+%\group_begin:
+%%set the relationship:
+%\pdfdict_put:nnn  {file/FileSpec} {AFRelationship}{/Source}
+%%set the description key. The text must be made safe first:
+%\pdftool_textstringlit_print:nN {this~is~an~odd~description~with~öäü}\l_tmpa_str
+%\pdfdict_put:nnx  {file/FileSpec} {Desc}{\l_tmpa_str}
+%%embeds testinput.txt and calls it grüße.txt
+\pdffile_embed_file:nnn {testinput.txt}{grüße.txt}{file:example1}
+%%reference it in the panel
+%\pdfcoredict_gput:nnx
+%  {Catalog/Names}
+%  {EmbeddedFiles}
+%  {\pdf_object_ref:n{file:example1}}
+%\group_end:
 
 
 %\group_begin:
@@ -43,7 +51,7 @@
 
 
 
-\pdfcoredict_gput:nnx{Catalog/Names}{EmbeddedFiles}{\pdf_object_ref:n{example1}}
+\pdfcoredict_gput:nnx{Catalog/Names}{EmbeddedFiles}{\pdf_object_ref:n{file:example1}}
 %\pdfcoredict_gput:nnx{Catalog/Names}{EmbeddedFiles}{\pdf_object_ref:n{example2}}
 %\pdfcoredict_gput:nnx{Catalog/Names}{EmbeddedFiles}{\pdf_object_ref:n{example3}}
 \pdfcoredict_gput:nnx{Catalog/Names}{EmbeddedFiles}{\pdf_object_ref:n{example4}}
diff --git a/l3pdffile.dtx b/l3pdffile.dtx
index 4514fc4..9b632ac 100644
--- a/l3pdffile.dtx
+++ b/l3pdffile.dtx
@@ -374,11 +374,6 @@
     Mime~type~not~set~for~file~'\tl_to_str:n{#1}'
   }
 
-\msg_new:nnn { pdffile } { file-object-no-found }
-  {
-    file~object~'\tl_to_str:n{#1}'~is~not~declared
-  }
-
 \msg_new:nnn { pdffile } { target-name-missing }
   {
     a~target~name~for~the~/FileSpec~dictionary~is~missing.
@@ -389,11 +384,6 @@
     object~name~'#1'~is~already~used.
   }
 
-\msg_new:nnn { pdffile } { no-file-embedded }
-  {
-    No~file~has~been~embedded~with~object~name~'#1'\\
-    Attaching~command~ignored.
-  }
 %    \end{macrocode}
 % \begin{variable}
 %   {





More information about the latex3-commits mailing list.