mime/cupsfilters-poppler.convs
gsmimefiles = \
mime/cupsfilters-ghostscript.convs
-gsapplerastermimefiles = \
- mime/cupsfilters-ghostscript-appleraster.convs
mutoolmimefiles = \
mime/cupsfilters-mupdf.convs
endif
if ENABLE_GHOSTSCRIPT
pkgmime_DATA += $(gsmimefiles)
-if ENABLE_GHOSTSCRIPT_APPLERASTER
-pkgmime_DATA += $(gsapplerastermimefiles)
-endif
endif
if ENABLE_MUTOOL
pkgmime_DATA += $(mutoolmimefiles)
$(individualmimefiles) \
$(popplermimefiles) \
$(gsmimefiles) \
- $(gsapplerastermimefiles) \
$(mutoolmimefiles) \
$(brlmimefiles)
fontconfig, liblcms (liblcms2 recommended), libavahi-common,
libavahi-client, libdbus, and glib are needed. It is highly
recommended, especially if non-PDF printers are used, to have at
- least one of Ghostscript, Poppler, or MuPDF.
+ least one of Ghostscript (preferred), Poppler, or MuPDF.
+
+ If Ghostscript is used (via the "gsto..." or the "universal" CUPS
+ filters), Ghostscript 9.56.0 is required and it has to be built at
+ least with the "pdfwrite", "ps2write", "cups", "pwgraster",
+ "appleraster", "pclm", "pclm8", "pdfimage24", "pdfimage8",
+ "pxlcolor", and "pxlmono" output devices. libcups of CUPS 2.2.2 or
+ newer is required to buid Ghostscript this way.
The Poppler-based pdftoraster filter needs a C++ compiler which
supports C++11 and Poppler being built with the "./configure"
[enable_gs_ps2write="$enableval"],
[enable_gs_ps2write=yes]
)
-AC_ARG_ENABLE([gs-appleraster],
- [AS_HELP_STRING([--disable-gs-appleraster], [Ghostscript doesn't support appleraster device.])],
- [enable_gs_appleraster="$enableval"],
- [enable_gs_appleraster=yes]
-)
CUPS_GHOSTSCRIPT=""
AS_IF([test "x$enable_ghostscript" != "xyes"], [
AC_MSG_RESULT([no])
enable_gs_ps2write=no
])
- AC_MSG_CHECKING(whether gs supports the appleraster device)
- AS_IF([`$CUPS_GHOSTSCRIPT -h 2>&1 | grep -q appleraster`], [
- AC_MSG_RESULT([yes])
- ], [
- AC_MSG_RESULT([no])
- enable_gs_appleraster=no
- ])
])
AS_IF([test x"$enable_gs_ps2write" = "xyes"], [
AC_DEFINE([HAVE_GHOSTSCRIPT_PS2WRITE], [], [gs supports ps2write])
])
- AS_IF([test x"$enable_gs_appleraster" = "xyes"], [
- AC_DEFINE([HAVE_GHOSTSCRIPT_APPLERASTER], [], [gs supports APPLERASTER])
- ])
])
AM_CONDITIONAL(ENABLE_GHOSTSCRIPT, test "x$enable_ghostscript" = xyes)
-AM_CONDITIONAL(ENABLE_GHOSTSCRIPT_APPLERASTER, test "x$enable_gs_appleraster" = xyes)
AC_SUBST(CUPS_GHOSTSCRIPT)
CUPS_MUTOOL=""
ghostscript: ${enable_ghostscript}
gs-path: ${with_gs_path}
gs ps2write: ${enable_gs_ps2write}
- gs appleraster: ${enable_gs_appleraster}
mutool: ${enable_mutool}
mutool-path: ${with_mutool_path}
ippfind-path: ${with_ippfind_path}
if (outformat == CF_FILTER_OUT_FORMAT_CUPS_RASTER ||
outformat == CF_FILTER_OUT_FORMAT_PWG_RASTER ||
outformat == CF_FILTER_OUT_FORMAT_APPLE_RASTER) {
-#ifdef HAVE_GHOSTSCRIPT_APPLERASTER
- if (outformat != CF_FILTER_OUT_FORMAT_APPLE_RASTER)
-#endif /* HAVE_GHOSTSCRIPT_APPLERASTER */
- if (h->MediaClass[0] |= '\0') {
+ if (outformat != CF_FILTER_OUT_FORMAT_APPLE_RASTER &&
+ (h->MediaClass[0] |= '\0')) {
snprintf(tmpstr, sizeof(tmpstr), "-sMediaClass=%s", h->MediaClass);
cupsArrayAdd(gs_args, strdup(tmpstr));
}
/* Ghostscript output device */
if (outformat == CF_FILTER_OUT_FORMAT_CUPS_RASTER ||
-#ifndef HAVE_GHOSTSCRIPT_APPLERASTER
- outformat == CF_FILTER_OUT_FORMAT_APPLE_RASTER ||
-#endif /* !HAVE_GHOSTSCRIPT_APPLERASTER */
outformat == CF_FILTER_OUT_FORMAT_PWG_RASTER)
cupsArrayAdd(gs_args, strdup("-sDEVICE=cups"));
-#ifdef HAVE_GHOSTSCRIPT_APPLERASTER
else if (outformat == CF_FILTER_OUT_FORMAT_APPLE_RASTER)
cupsArrayAdd(gs_args, strdup("-sDEVICE=appleraster"));
-#endif /* HAVE_GHOSTSCRIPT_APPLERASTER */
else if (outformat == CF_FILTER_OUT_FORMAT_PDF)
cupsArrayAdd(gs_args, strdup("-sDEVICE=pdfwrite"));
/* In case of PCL XL, raster-obly PDF, or PCLm output we determine
}
cspace = icc_profile ? CUPS_CSPACE_RGB : -1;
- cfRasterPrepareHeader(&h, data, outformat,
-#ifdef HAVE_GHOSTSCRIPT_APPLERASTER
- outformat,
-#else
- (outformat != CF_FILTER_OUT_FORMAT_APPLE_RASTER ?
- outformat : CF_FILTER_OUT_FORMAT_CUPS_RASTER),
-#endif /* HAVE_GHOSTSCRIPT_APPLERASTER */
- 0, &cspace);
+ cfRasterPrepareHeader(&h, data, outformat, outformat, 0, &cspace);
/* Special Ghostscript options for raster-only PDF output */
if (log) log(ld, CF_LOGLEVEL_DEBUG,
"cfFilterUniversal: Adding %s to chain", filter->name);
-#ifndef HAVE_GHOSTSCRIPT_APPLERASTER
- if (!strcmp(output, "image/urf"))
- {
- filter = malloc(sizeof(cf_filter_filter_in_chain_t));
- outformat = malloc(sizeof(cf_filter_out_format_t));
- *outformat = CF_FILTER_OUT_FORMAT_APPLE_RASTER;
- filter->function = cfFilterRasterToPWG;
- filter->parameters = outformat;
- filter->name = "rastertopwg";
- cupsArrayAdd(filter_chain, filter);
- if (log) log(ld, CF_LOGLEVEL_DEBUG,
- "cfFilterUniversal: Adding %s to chain",
- filter->name);
- }
- else
-#endif /* !HAVE_GHOSTSCRIPT_APPLERASTER */
if (strcmp(output_type, "pwg-raster") &&
strcmp(output_type, "vnd.cups-raster") &&
strcmp(output_type, "PCLm"))
if (log) log(ld, CF_LOGLEVEL_DEBUG,
"cfFilterUniversal: Adding %s to chain",
filter->name);
-
-#ifndef HAVE_GHOSTSCRIPT_APPLERASTER
- if (!strcmp(output, "image/urf"))
- {
- filter = malloc(sizeof(cf_filter_filter_in_chain_t));
- outformat = malloc(sizeof(cf_filter_out_format_t));
- *outformat = CF_FILTER_OUT_FORMAT_APPLE_RASTER;
- filter->function = cfFilterRasterToPWG;
- filter->parameters = outformat;
- filter->name = "rastertopwg";
- cupsArrayAdd(filter_chain, filter);
- if (log) log(ld, CF_LOGLEVEL_DEBUG,
- "cfFilterUniversal: Adding %s to chain",
- filter->name);
- }
-#endif /* !HAVE_GHOSTSCRIPT_APPLERASTER */
}
else if(!strcmp(output, "application/postscript") ||
!strcmp(output, "application/vnd.cups-postscript"))
+++ /dev/null
-#
-# MIME conversions file for OpenPrinting CUPS Filters.
-#
-# Copyright 2007-2011 by Apple Inc.
-# Copyright 1997-2007 by Easy Software Products.
-# Copyright 2012-2016 by Till Kamppeter.
-#
-# These coded instructions, statements, and computer programs are the
-# property of Apple Inc. and are protected by Federal copyright
-# law. Distribution and use rights are outlined in the file "COPYING"
-# which should have been included with this file.
-#
-
-#
-# Ghostscript-based filter for Apple Raster output...
-#
-
-application/vnd.cups-pdf image/urf 99 gstoraster
application/postscript application/pdf 0 gstopdf
application/vnd.cups-pdf application/vnd.cups-raster 99 gstoraster
application/vnd.cups-pdf image/pwg-raster 99 gstoraster
+application/vnd.cups-pdf image/urf 99 gstoraster
application/vnd.cups-pdf application/PCLm 99 gstoraster
application/vnd.cups-postscript application/vnd.cups-raster 175 gstoraster