t2p.c

changeset 121
e50c7f76f2f6
parent 116
73d3ba4f6ba2
     1.1 diff -r 26cbb0d7782b -r e50c7f76f2f6 t2p.c
     1.2 --- a/t2p.c	Thu Mar 13 07:57:35 2003 +0000
     1.3 +++ b/t2p.c	Thu Mar 13 07:59:10 2003 +0000
     1.4 @@ -4,7 +4,7 @@
     1.5   *      will be compressed using ITU-T T.6 (G4) fax encoding.
     1.6   *
     1.7   * Main program
     1.8 - * $Id: t2p.c,v 1.30 2003/03/12 19:38:59 eric Exp $
     1.9 + * $Id: t2p.c,v 1.31 2003/03/12 23:59:10 eric Exp $
    1.10   * Copyright 2001, 2002, 2003 Eric Smith <eric@brouhaha.com>
    1.11   *
    1.12   * This program is free software; you can redistribute it and/or modify
    1.13 @@ -198,7 +198,9 @@
    1.14        return (0);
    1.15      }
    1.16  
    1.17 -  o->pdf = pdf_create (name, PDF_PAGE_MODE_USE_OUTLINES);
    1.18 +  o->pdf = pdf_create (name, (attributes->has_bookmarks ?
    1.19 +			      PDF_PAGE_MODE_USE_OUTLINES :
    1.20 +			      PDF_PAGE_MODE_USE_NONE));
    1.21    if (! o->pdf)
    1.22      {
    1.23        fprintf (stderr, "can't open output file '%s'\n", name);
    1.24 @@ -461,6 +463,9 @@
    1.25  
    1.26    page = pdf_new_page (out->pdf, width_points, height_points);
    1.27  
    1.28 +#if 0
    1.29 +  pdf_write_text (page);
    1.30 +#else
    1.31    pdf_write_g4_fax_image (page,
    1.32  			  0, 0,  /* x, y */
    1.33  			  width_points, height_points,
    1.34 @@ -468,6 +473,7 @@
    1.35  			  0, /* ImageMask */
    1.36  			  0, 0, 0,  /* r, g, b */
    1.37  			  0); /* BlackIs1 */
    1.38 +#endif
    1.39  
    1.40    while (bookmarks)
    1.41      {
    1.42 @@ -604,6 +610,8 @@
    1.43    memset (& input_attributes, 0, sizeof (input_attributes));
    1.44    memset (& output_attributes, 0, sizeof (output_attributes));
    1.45  
    1.46 +  output_attributes.has_bookmarks = (bookmark_fmt != NULL);
    1.47 +
    1.48    if (! open_pdf_output_file (out_fn, & output_attributes))
    1.49      fatal (3, "error opening output file \"%s\"\n", out_fn);
    1.50    for (i = 0; i < inf_count; i++)