tumble.c

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