@@ -2227,7 +2227,8 @@ void pdf_finish_file(PDF pdf, int fatal_error) {
2227
2227
print_err (" ==> Fatal error occurred, no output PDF file produced!" );
2228
2228
} else {
2229
2229
int i , j , k ;
2230
- int root , info ;
2230
+ int root = 0 ;
2231
+ int info = 0 ;
2231
2232
int xref_stm = 0 ;
2232
2233
int outlines = 0 ;
2233
2234
int threads = 0 ;
@@ -2268,6 +2269,7 @@ void pdf_finish_file(PDF pdf, int fatal_error) {
2268
2269
pdf -> gen_tounicode = pdf_gen_tounicode ;
2269
2270
pdf -> omit_cidset = pdf_omit_cidset ;
2270
2271
pdf -> omit_charset = pdf_omit_charset ;
2272
+ pdf -> omit_infodict = pdf_omit_infodict ;
2271
2273
/*tex
2272
2274
The first pass over the list will flag the slots that are
2273
2275
used so that we can do a preroll for type 3 fonts.
@@ -2384,7 +2386,8 @@ void pdf_finish_file(PDF pdf, int fatal_error) {
2384
2386
print_pdf_table_string (pdf , "catalog" );
2385
2387
pdf_end_dict (pdf );
2386
2388
pdf_end_obj (pdf );
2387
- info = pdf_print_info (pdf , luatexversion , luatexrevision );
2389
+ if (! pdf -> omit_infodict )
2390
+ info = pdf_print_info (pdf , luatexversion , luatexrevision );
2388
2391
if (pdf -> os_enable ) {
2389
2392
pdf_buffer_select (pdf , OBJSTM_BUF );
2390
2393
pdf_os_write_objstream (pdf );
@@ -2418,7 +2421,8 @@ void pdf_finish_file(PDF pdf, int fatal_error) {
2418
2421
pdf_add_int (pdf , 1 );
2419
2422
pdf_end_array (pdf );
2420
2423
pdf_dict_add_ref (pdf , "Root" , root );
2421
- pdf_dict_add_ref (pdf , "Info" , info );
2424
+ if (! pdf -> omit_infodict )
2425
+ pdf_dict_add_ref (pdf , "Info" , info );
2422
2426
if (pdf_trailer_toks != null ) {
2423
2427
pdf_print_toks (pdf , pdf_trailer_toks );
2424
2428
delete_token_ref (pdf_trailer_toks );
@@ -2476,7 +2480,8 @@ void pdf_finish_file(PDF pdf, int fatal_error) {
2476
2480
pdf_begin_dict (pdf );
2477
2481
pdf_dict_add_int (pdf , "Size" , pdf -> obj_ptr + 1 );
2478
2482
pdf_dict_add_ref (pdf , "Root" , root );
2479
- pdf_dict_add_ref (pdf , "Info" , info );
2483
+ if (! pdf -> omit_infodict )
2484
+ pdf_dict_add_ref (pdf , "Info" , info );
2480
2485
if (pdf_trailer_toks != null ) {
2481
2486
pdf_print_toks (pdf , pdf_trailer_toks );
2482
2487
delete_token_ref (pdf_trailer_toks );
0 commit comments