pdftex[877] branches/stable: add \pdfomitinfodict (this leaves out

commits+thanh at tug.org commits+thanh at tug.org
Fri Apr 15 11:12:08 CEST 2022


Revision: 877
          http://tug.org/svn/pdftex?view=revision&revision=877
Author:   thanh
Date:     2022-04-15 11:12:07 +0200 (Fri, 15 Apr 2022)
Log Message:
-----------
add \pdfomitinfodict (this leaves out the "Info" indirect entry; the dict itself is still in the PDF output)

Modified Paths:
--------------
    branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web
    branches/stable/tests/Common.mak

Added Paths:
-----------
    branches/stable/tests/23-omit-info-dict/
    branches/stable/tests/23-omit-info-dict/Makefile
    branches/stable/tests/23-omit-info-dict/f.tex

Modified: branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web	2022-04-03 17:20:06 UTC (rev 876)
+++ branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web	2022-04-15 09:12:07 UTC (rev 877)
@@ -5705,7 +5705,8 @@
 @d pdf_info_omit_date_code  = pdftex_first_integer_code + 31 {omit generating CreationDate and ModDate}
 @d pdf_suppress_ptex_info_code = pdftex_first_integer_code + 32 {suppress /PTEX.* entries in PDF dictionaries}
 @d pdf_omit_charset_code = pdftex_first_integer_code + 33 {suppress /PTEX.* entries in PDF dictionaries}
- at d pdf_int_pars=pdftex_first_integer_code + 34 {total number of \pdfTeX's integer parameters}
+ at d pdf_omit_info_dict_code = pdftex_first_integer_code + 34 {suppress /PTEX.* entries in PDF dictionaries}
+ at d pdf_int_pars=pdftex_first_integer_code + 35 {total number of \pdfTeX's integer parameters}
 @#
 @d etex_int_base=pdf_int_pars {base for \eTeX's integer parameters}
 @d tracing_assigns_code=etex_int_base {show assignments}
@@ -5818,6 +5819,7 @@
 @d pdf_info_omit_date == int_par(pdf_info_omit_date_code)
 @d pdf_suppress_ptex_info == int_par(pdf_suppress_ptex_info_code)
 @d pdf_omit_charset == int_par(pdf_omit_charset_code)
+ at d pdf_omit_info_dict == int_par(pdf_omit_info_dict_code)
 @#
 @d tracing_assigns==int_par(tracing_assigns_code)
 @d tracing_groups==int_par(tracing_groups_code)
@@ -5927,6 +5929,7 @@
 pdf_info_omit_date_code:print_esc("pdfinfoomitdate");
 pdf_suppress_ptex_info_code: print_esc("pdfsuppressptexinfo");
 pdf_omit_charset_code: print_esc("pdfomitcharset");
+pdf_omit_info_dict_code: print_esc("pdfomitinfodict");
 @/@<Cases for |print_param|@>@/
 othercases print("[unknown integer parameter!]")
 endcases;
@@ -6125,6 +6128,9 @@
 primitive("pdfomitcharset",assign_int,int_base+pdf_omit_charset_code);@/
 @!@:pdf_omit_charset}{\.{\\pdfomitcharset} primitive@>
 
+primitive("pdfomitinfodict",assign_int,int_base+pdf_omit_info_dict_code);@/
+@!@:pdf_omit_info_dict}{\.{\\pdfomitinfodict} primitive@>
+
 @ @<Cases of |print_cmd_chr|...@>=
 assign_int: if chr_code<count_base then print_param(chr_code-int_base)
   else  begin print_esc("count"); print_int(chr_code-count_base);
@@ -20318,7 +20324,7 @@
 pdf_print_int(xref_offset_width);
 pdf_print_ln(" 1]");
 pdf_indirect_ln("Root", root);
-pdf_indirect_ln("Info", obj_ptr - 1);
+if pdf_omit_info_dict = 0 then pdf_indirect_ln("Info", obj_ptr - 1);
 if pdf_trailer_toks <> null then begin
     pdf_print_toks_ln(pdf_trailer_toks);
     delete_toks(pdf_trailer_toks);
@@ -20354,7 +20360,7 @@
     pdf_print("<< ");
     pdf_int_entry_ln("Size", sys_obj_ptr + 1);
     pdf_indirect_ln("Root", root);
-    pdf_indirect_ln("Info", sys_obj_ptr);
+    if pdf_omit_info_dict = 0 then pdf_indirect_ln("Info", sys_obj_ptr);
     if pdf_trailer_toks <> null then begin
         pdf_print_toks_ln(pdf_trailer_toks);
         delete_toks(pdf_trailer_toks);

Added: branches/stable/tests/23-omit-info-dict/Makefile
===================================================================
--- branches/stable/tests/23-omit-info-dict/Makefile	                        (rev 0)
+++ branches/stable/tests/23-omit-info-dict/Makefile	2022-04-15 09:12:07 UTC (rev 877)
@@ -0,0 +1,13 @@
+include ../Common.mak
+
+# prog = $(pdftex2) -fmt pdfetex
+
+test:
+	$(pdftex2) -ini ./f.tex
+
+# fmt:
+	# $(pdftex2) -ini '*pdfetex.ini'
+
+clean:
+	$(clean)
+

Added: branches/stable/tests/23-omit-info-dict/f.tex
===================================================================
--- branches/stable/tests/23-omit-info-dict/f.tex	                        (rev 0)
+++ branches/stable/tests/23-omit-info-dict/f.tex	2022-04-15 09:12:07 UTC (rev 877)
@@ -0,0 +1,10 @@
+\input plain.tex
+\input pdftexconfig.tex
+\input pdftexmagfix.tex
+\pdfcompresslevel=0
+\pdfobjcompresslevel=0
+
+% \pdfomitinfodict=1
+abc
+\bye
+

Modified: branches/stable/tests/Common.mak
===================================================================
--- branches/stable/tests/Common.mak	2022-04-03 17:20:06 UTC (rev 876)
+++ branches/stable/tests/Common.mak	2022-04-15 09:12:07 UTC (rev 877)
@@ -27,9 +27,9 @@
 diff = diff --text -c0
 
 pdftex = ../../source/build-pdftex/texk/web2c/pdftex
-pdftex2 ?= /usr/local/texlive/2021basic/bin/local/pdftex2
+pdftex2 ?= /opt/texlive/2020/bin/local/pdftex2
 # pdftex2 is a copy of $(pdftex)
-# why? to be able to use the texmf tree from mactex basic with minimal fuss
+# why? to be able to use the default texmf tree with minimal fuss
 ttf2afm = ../../source/build-pdftex/texk/web2c/ttf2afm
 #pdftex = $(W)/texk/web2c/pdftex
 prog = $(env) $(pdftex) -ini -interaction=nonstopmode



More information about the pdftex-commits mailing list.