[latex3-commits] [git/LaTeX3-latex3-pdfresources] test-new-hooks: corrected string conversion (ecbb764)
Ulrike Fischer
fischer at troubleshooting-tex.de
Tue May 12 00:41:38 CEST 2020
Repository : https://github.com/latex3/pdfresources
On branch : test-new-hooks
Link : https://github.com/latex3/pdfresources/commit/ecbb7644518a8407b7aaa1357ffc3970e6be2a74
>---------------------------------------------------------------
commit ecbb7644518a8407b7aaa1357ffc3970e6be2a74
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Tue May 12 00:41:38 2020 +0200
corrected string conversion
>---------------------------------------------------------------
ecbb7644518a8407b7aaa1357ffc3970e6be2a74
experiments/embedfiles.tex | 7 +++++--
hgeneric-experimental.def | 4 +++-
l3pdffile.dtx | 9 +++++----
newpackages/new-pdfescape.sty | 2 +-
4 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/experiments/embedfiles.tex b/experiments/embedfiles.tex
index 6a9180a..8941307 100644
--- a/experiments/embedfiles.tex
+++ b/experiments/embedfiles.tex
@@ -26,9 +26,12 @@
\group_begin:
\pdfdict_put:nnn {file/FileSpec} {AFRelationship}{/Source}
\pdfdict_put:nnn {file/FileSpec} {Desc}{(this~is~a~eps)}
-\pdffile_embed_file:nnn {example-image.eps}{blub.txt}{example1}
-%\pdffile_attach:n {example2}
+\pdffile_embed_file:nnn {testinput.txt}{grüße.tex}{example1}
+
+\prop_show:N \g__pdf_file_embed_sources_prop
+\pdffile_attach:n {example1}
\group_end:
+\end{document}
%
\group_begin:
\pdfdict_put:nnn {file/FileSpec} {AFRelationship}{/Data}
diff --git a/hgeneric-experimental.def b/hgeneric-experimental.def
index 262979a..4382fb5 100644
--- a/hgeneric-experimental.def
+++ b/hgeneric-experimental.def
@@ -1371,7 +1371,8 @@
\group_begin:
\cs_set:Npn \HyInfo at do##1{%
\EdefEscapeName\HyInfo at Key{##1}%
- \pdf_info_gput:on {\HyInfo at Key}{(\csname HyInfo at Value@##1\endcsname)}
+ %variant??
+ \pdfdict_gput:nox {Info} {\HyInfo at Key}{(\csname HyInfo at Value@##1\endcsname)}
}
\HyInfo at AddonList
\group_end:
@@ -1380,6 +1381,7 @@
\def\PDF at FinishDoc{}% dummy needed for hyperref ...
+
\AtEndPreamble{
\pdf at ifdraftmode{}{
\Hy at UseMaketitleInfos %get Title/Author from \title if pdfusetitle is true
diff --git a/l3pdffile.dtx b/l3pdffile.dtx
index fa3c602..7e8c113 100644
--- a/l3pdffile.dtx
+++ b/l3pdffile.dtx
@@ -441,6 +441,7 @@
\pdf_object_new:nn { #1 } {dict}
\group_begin:
\@@_file_filename_convert_to_print:nN { #2 } \l_@@_file_tmpa_str
+ \str_show:N\l_@@_file_tmpa_str
\pdfdict_put:nnx {file/FileSpec}{F} { \l_@@_file_tmpa_str }
\pdfdict_put:nnx {file/FileSpec}{UF}{ \l_@@_file_tmpa_str }
\pdf_object_write:nx { #1 }
@@ -458,7 +459,7 @@
% we record here the source file. This allows also to test if an object name
% has an embedded file or is only a filespec
%
-\prop_new:N \g_@@__file_embed_sources_prop
+\prop_new:N \g_@@_file_embed_sources_prop
\cs_new_protected:Npn \pdffile_embed_file:nnn #1 #2 #3
%\Arg{source filename} \Arg{target filename} \Arg{ object name }
@@ -477,8 +478,8 @@
\file_get_full_name:nNTF {#1} \l_pdffile_source_full_name_str
{
\prop_gput:NnV
- \g_@@__file_embed_sources_prop
- { #1 }
+ \g_@@_file_embed_sources_prop
+ { #3 }
\l_pdffile_source_full_name_str
\@@_file_mimetype_set:NN
\l_pdffile_source_full_name_str
@@ -621,7 +622,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_file_check_attach_aux:nN #1 #2
{
- \prop_get:NnNTF \g_@@__file_embed_sources_prop { #1 } \l_tmpa_str
+ \prop_get:NnNTF \g_@@_file_embed_sources_prop { #1 } \l_tmpa_str
{
\exp_args:Nx
\@@_backend_attach_tree_name:nN {\pdf_object_ref:n{#1}} #2
diff --git a/newpackages/new-pdfescape.sty b/newpackages/new-pdfescape.sty
index 036166c..bdfb611 100644
--- a/newpackages/new-pdfescape.sty
+++ b/newpackages/new-pdfescape.sty
@@ -132,7 +132,7 @@
{
\cs_new:Npn \pdftool_textstringhex_print:nN #1 #2
{
- \str_set_convert:Nnnn #2 { #1 }{ } {utf16/string}
+ \str_set_convert:Nnnn #2 { #1 }{ } {utf16/hex}
\str_put_left:Nn #2 {<}
\str_put_right:Nn #2 {>}
}
More information about the latex3-commits
mailing list.