[latex3-commits] [git/LaTeX3-latex3-pdfresources] develop: backend to omit charset and info dict (4b1996d)

Ulrike Fischer fischer at troubleshooting-tex.de
Thu Feb 23 01:11:26 CET 2023


Repository : https://github.com/latex3/pdfresources
On branch  : develop
Link       : https://github.com/latex3/pdfresources/commit/4b1996d706d1d2a4f6c4ccdf7e1199e5aa1cf319

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

commit 4b1996d706d1d2a4f6c4ccdf7e1199e5aa1cf319
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Thu Feb 23 01:11:26 2023 +0100

    backend to omit charset and info dict


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

4b1996d706d1d2a4f6c4ccdf7e1199e5aa1cf319
 l3backend-testphase.dtx | 62 +++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 50 insertions(+), 12 deletions(-)

diff --git a/l3backend-testphase.dtx b/l3backend-testphase.dtx
index d8d8ebc..75f5d8c 100644
--- a/l3backend-testphase.dtx
+++ b/l3backend-testphase.dtx
@@ -2024,24 +2024,24 @@
 % an unnamed object so should be referenced directly with |\pdf_object_ref_last:|
 %    \begin{macrocode}
 %<*luatex>
-\cs_new_protected:Npn \__pdf_backend_metadata_stream:n #1
+\cs_new_protected:Npn \@@_backend_metadata_stream:n #1
   {
     \tex_immediate:D \tex_pdfextension:D obj ~uncompressed~
-      \__pdf_backend_object_write:nn {stream} {{/Type~/Metadata~/Subtype~/XML}{#1}}
+      \@@_backend_object_write:nn {stream} {{/Type~/Metadata~/Subtype~/XML}{#1}}
   }
 %</luatex>
 %<*pdftex>
-\cs_new_protected:Npn \__pdf_backend_metadata_stream:n #1
+\cs_new_protected:Npn \@@_backend_metadata_stream:n #1
   {
     \group_begin:
      \tex_pdfcompresslevel:D  0 \scan_stop:
      \tex_immediate:D \tex_pdfobj:D
-     \__pdf_backend_object_write:nn {stream} {{/Type~/Metadata~/Subtype~/XML}{#1}}
+     \@@_backend_object_write:nn {stream} {{/Type~/Metadata~/Subtype~/XML}{#1}}
     \group_end:
   }
 %</pdftex>
 %<*xdvipdfmx|dvipdfmx|dvips|dvisvgm>
-\cs_new_protected:Npn \__pdf_backend_metadata_stream:n #1
+\cs_new_protected:Npn \@@_backend_metadata_stream:n #1
   {
     \pdf_object_unnamed_write:nn {stream}{{/Type~/Metadata~/Subtype~/XML}{#1}}
   }
@@ -2053,22 +2053,23 @@
 % \texttt{/ProcSet}, \texttt{/CharSet} and the \texttt{/Info} dictionary
 % are deprecated in PDF 2.0. For the pdf/A-4 standard they must be suppressed.
 % Not every engine is able to do this, but for pdfTeX and luatex we define suitable
-% backend command. \texttt{/ProcSet} is suppress automatically in pdf 2.0 which should be
-% ok. 
-% The option to omit /Charset exists already for quite some time:
-% \begin{macro}{\__pdf_backend_omit_charset:n}
+% backend command. \texttt{/ProcSet} is suppressed automatically 
+% for pdf version 2.0 starting with in texlive 2023. 
+% \begin{macro}{\@@_backend_omit_charset:n}
+% The option to omit /Charset exists already for quite some time for the two 
+% engines.
 %    \begin{macrocode}
 %<*xdvipdfmx|dvipdfmx|dvips|dvisvgm>
-\cs_new_protected:Npn \__pdf_backend_omit_charset:n #1 {} %#1 number
+\cs_new_protected:Npn \@@_backend_omit_charset:n #1 {} %#1 number
 %</xdvipdfmx|dvipdfmx|dvips|dvisvgm>
 %<*pdftex>
-\cs_new_protected:Npn \__pdf_backend_omit_charset:n #1 %#1 number
+\cs_new_protected:Npn \@@_backend_omit_charset:n #1 %#1 number
   {
     \tex_pdfomitcharset:D = #1 \scan_stop:
   } 
 %</pdftex>
 %<*luatex>
-\cs_new_protected:Npn \__pdf_backend_omit_charset:n #1 %#1 number
+\cs_new_protected:Npn \@@_backend_omit_charset:n #1 %#1 number
   {
     \tex_pdfvariable:D omitcharset  = #1 \scan_stop:
   } 
@@ -2076,7 +2077,44 @@
 %    \end{macrocode}
 % \end{macro}
 % 
+% \begin{macro}{\@@_backend_omit_info:n}
+% The option to suppress the info dictionary will be available in 
+% texlive 2023.
+%    \begin{macrocode}
+%<*xdvipdfmx|dvipdfmx|dvips|dvisvgm>
+\cs_new_protected:Npn \@@_backend_omit_info:n #1 {} %#1 number
+%</xdvipdfmx|dvipdfmx|dvips|dvisvgm>
+%<*pdftex>
+\bool_lazy_and:nnTF
+  { \int_compare_p:nNn {\tex_pdftexversion:D } > {139} }
+  { \int_compare_p:nNn {\tex_pdftexrevision:D } > {24} }
+  {
+    \cs_new_protected:Npn \@@_backend_omit_info:n #1 %#1 number
+     {
+       \pdfomitinfodict = #1 \scan_stop:
+     } 
+  }
+  {
+    \cs_new_protected:Npn \@@_backend_omit_info:n #1 {}%#1 number
+     
+  }
+%</pdftex>
+%<*luatex>
+ \int_compare:nNnTF {\directlua{tex.print(status.list()["development_id"])} } > {7560}
+  {
+    \cs_new_protected:Npn \@@_backend_omit_info:n #1 %#1 number
+     {
+       \tex_pdfvariable:D omitinfodict  = #1 \scan_stop:
+     }
+  }
+  {
+    \cs_new_protected:Npn \@@_backend_omit_info:n #1 {} %#1 number   
+  }    
+%</luatex>
+%    \end{macrocode}
+% \end{macro}
 % 
+ 
 %
 % \subsection{lua code for lualatex}
 %    \begin{macrocode}





More information about the latex3-commits mailing list.