556
* Reduce the image rendering resolution to make processing of jobs by poth
557
* the PDF->PS converter and the printer faster
563
xres = max(360, xres / 2);
565
else if (xres % 75 == 0)
568
xres = max(300, xres / 2);
555
572
#ifdef HAVE_PDFTOPS
556
573
#ifdef HAVE_PDFTOPS_WITH_RESOLUTION
578
595
* will not compress the pages, so that the PostScript code can get
579
596
* analysed. This is especially important if a PostScript printer errors or
580
597
* misbehaves on Ghostscript's output.
598
* On Kyocera printers we always suppress page compression, to avoid slow
599
* processing of raster images.
582
601
val = cupsGetOption("psdebug", num_options, options);
583
if (val && strcasecmp(val, "no") && strcasecmp(val, "off") &&
584
strcasecmp(val, "false"))
602
if ((val && strcasecmp(val, "no") && strcasecmp(val, "off") &&
603
strcasecmp(val, "false")) ||
604
(ppd && ppd->manufacturer &&
605
!strncasecmp(ppd->manufacturer, "Kyocera", 7)))
586
fprintf(stderr, "DEBUG: Deactivated compression of pages in Ghostscript's PostScript output (\"psdebug\" debug mode)\n");
607
fprintf(stderr, "DEBUG: Deactivated compression of pages in Ghostscript's PostScript output (\"psdebug\" debug mode or Kyocera printer)\n");
587
608
pdf_argv[pdf_argc++] = (char *)"-dCompressPages=false";
590
* The PostScript interpreters on many printers have a bugs which make
611
* The PostScript interpreters on many printers have bugs which make
591
612
* the interpreter crash, error out, or otherwise misbehave on too
592
613
* heavily compressed input files, especially if code with compressed
593
* elements is compressed agin. Therefore we reduce compression here.
614
* elements is compressed again. Therefore we reduce compression here.
595
616
pdf_argv[pdf_argc++] = (char *)"-dCompressFonts=false";
596
617
pdf_argv[pdf_argc++] = (char *)"-dNoT3CCITT";
597
pdf_argv[pdf_argc++] = (char *)"-dEncodeMonoImages=false";
598
pdf_argv[pdf_argc++] = (char *)"-dEncodeColorImages=false";
618
if (ppd && ppd->manufacturer &&
619
!strncasecmp(ppd->manufacturer, "Brother", 7))
621
fprintf(stderr, "DEBUG: Deactivation of Ghostscript's image compression for Brother printers to workarounmd PS interpreter bug\n");
622
pdf_argv[pdf_argc++] = (char *)"-dEncodeMonoImages=false";
623
pdf_argv[pdf_argc++] = (char *)"-dEncodeColorImages=false";
599
625
pdf_argv[pdf_argc++] = (char *)"-c";
600
626
pdf_argv[pdf_argc++] = (char *)"save pop";
601
627
pdf_argv[pdf_argc++] = (char *)"-f";