* property of Apple Inc. and are protected by Federal copyright law.
* Distribution and use rights are outlined in the file "LICENSE.txt"
* which should have been included with this file. If this file is
- * file is missing or damaged, see the license at "http://www.cups.org/".
+ * missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*/
main(int argc, /* I - Number of command-line args */
char *argv[]) /* I - Command-line arguments */
{
+ const char *final_content_type;
+ /* FINAL_CONTENT_TYPE env var */
int fd; /* Raster file */
cups_raster_t *inras, /* Input raster stream */
*outras; /* Output raster stream */
else
fd = 0;
+ if ((final_content_type = getenv("FINAL_CONTENT_TYPE")) == NULL)
+ final_content_type = "image/pwg-raster";
+
inras = cupsRasterOpen(fd, CUPS_RASTER_READ);
- outras = cupsRasterOpen(1, CUPS_RASTER_WRITE_PWG);
+ outras = cupsRasterOpen(1, !strcmp(final_content_type, "image/pwg-raster") ? CUPS_RASTER_WRITE_PWG : CUPS_RASTER_WRITE_APPLE);
ppd = ppdOpenFile(getenv("PPD"));
back = ppdFindAttr(ppd, "cupsBackSide", NULL);