~ubuntu-branches/ubuntu/raring/cups-filters/raring-proposed

« back to all changes in this revision

Viewing changes to filter/pdftops.c

  • Committer: Package Import Robot
  • Author(s): Till Kamppeter
  • Date: 2012-07-22 18:57:32 UTC
  • mfrom: (1.1.17)
  • Revision ID: package-import@ubuntu.com-20120722185732-26kkte5p1lth3rt5
Tags: 1.0.20-0bzr1
* New upstream release
   - pdftops: Added another workaround for Kyocera printers: Some
     models get very slow on images which request interpolation,
     so now we remove the image interpolation requests by additional
     PostScript code only inserted for Kyocera printers (LP: #1026974).
   - Made the Poppler-based filters pdftopdf and pdftoopvp build with
     both Poppler 0.18.x and 0.20.x (Upstream bug #1055).
   - Fixes according to Coverity scan results (Upstream bug #1054).
   - Switched build system to autotools. This especially fixes several
     build problems in Gentoo. Also build-tested with CUPS 1.6.0b1.
   - Fixes for compatibility with clang/gcc-4.7.
   - textonly: Filter did not work as a pipe with copies=1 (Upstream bug
     #1032).
   - texttopdf: Avoid trimming the results of FcFontSort(), as this may
     miss some reasonable candidates under certain circumstances. BTW,
     fix passing a non-pointer as a pointer to "result" (Closes: #670055).
   - Corrected documentation. The option for the maximum image rendering
     resolution in pdftops is "pdftops-max-image-resolution", not
     "pdftops-max-image-resolution-default".
* debian/patches/fcfontsort-no-trim.patch: Removed, fixed upstream.
* debian/rules: Updated options for ./configure and make for the new autotools
  build system.
* debian/watch: Switched to bz2 upstream packages.
* debian/rules, debian/copyright, debian/cups-filters.docs: Updated for
  renamed documentation files.
* debian/control, debian/libfontembed1.install,
  debian/libfontembed-dev.install: Added new binary packages for libfontembed.
* debian/copyright: Updated for recent file additions, and rearrangement of
  directories.

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
  if ((fp = fopen(filename,"rb")) == 0) {
120
120
    fprintf(stderr, "ERROR: pdftops - cannot open print file \"%s\"\n",
121
121
            filename);
122
 
    fclose(fp);
123
122
    return;
124
123
  }
125
124
 
392
391
    */
393
392
 
394
393
    pstops_options = realloc(pstops_options, strlen(pstops_options) + 9);
 
394
    if (!pstops_options) {
 
395
      fprintf(stderr, "ERROR: Can't allocate pstops_options\n");
 
396
      exit(2);
 
397
    }
395
398
    pstops_end = pstops_options + strlen(pstops_options);
396
399
    strcpy(pstops_end, " Collate");
397
400
  }
821
824
          * code with some extra bits.
822
825
          *
823
826
          * See https://bugs.launchpad.net/bugs/951627
 
827
          *
 
828
          * In addition, at least some of Kyocera's PostScript printers are
 
829
          * very slow on rendering images which request interpolation. So we
 
830
          * also add some code to eliminate interpolation requests.
 
831
          *
 
832
          * See https://bugs.launchpad.net/bugs/1026974
824
833
          */
825
834
 
826
835
          if (!strncasecmp(ppd->manufacturer, "Kyocera", 7))
830
839
            puts("% Kyocera's PostScript interpreter crashes on early name binding,");
831
840
            puts("% so eliminate all \"bind\"s by redifining \"bind\" to no-op");
832
841
            puts("/bind {} bind def");
 
842
            puts("% Some Kyocera printers have an unacceptably slow implementation");
 
843
            puts("% of image interpolation.");
 
844
            puts("/image");
 
845
            puts("{");
 
846
            puts("  dup /Interpolate known");
 
847
            puts("  {");
 
848
            puts("    dup /Interpolate undef");
 
849
            puts("  } if");
 
850
            puts("  systemdict /image get exec");
 
851
            puts("} def");
833
852
            puts("% =====");
834
853
          }
835
854