<b>-D</b>
<i>device-uri</i>
] [
+<b>-F</b>
+<i>output-type/subtype</i>
+] [
<b>-K</b>
<i>keypath</i>
] [
When specifying a directory,
<b>ippeveprinter</b>
will create an output file using the job ID and name.
+<dt><b>-F </b><i>output-type/subtype[,...]</i>
+<dd style="margin-left: 5.0em">Specifies the output MIME media type.
+The default is "application/postscript" when the <b>-P</b> option is specified.
<dt><b>-M </b><i>manufacturer</i>
<dd style="margin-left: 5.0em">Set the manufacturer of the printer.
The default is "Example".
<b>ippeveprinter</b>
adds environment variables starting with "IPP_" for all IPP Job attributes in the print request.
For example, when executing a command for an IPP Job containing the "media" Job Template attribute, the "IPP_MEDIA" environment variable will be set to the value of that attribute.
-<p>In addition, all IPP "xxx-default" Printer Description attributes are added to the environment.
+<p>In addition, all IPP "xxx-default" and "pwg-xxx" Printer Description attributes are added to the environment.
For example, the "IPP_MEDIA_DEFAULT" environment variable will be set to the default value for the "media" Job Template attribute.
<p>Enumerated values are converted to their keyword equivalents.
For example, a "print-quality" Job Template attribute with a enum value of 3 will become the "IPP_PRINT_QUALITY" environment variable with a value of "draft".
This string conversion only happens for standard Job Template attributes, currently "finishings", "orientation-requested", and "print-quality".
-<p>Finally, the "CONTENT_TYPE" environment variable contains the MIME media type of the document being printed, the "DEVICE_URI" environment variable contains the device URI as specified with the "-D" option, and the "PPD" environment variable contains the PPD filename as specified with the "-P" option.
+<p>Finally, the "CONTENT_TYPE" environment variable contains the MIME media type of the document being printed, the "DEVICE_URI" environment variable contains the device URI as specified with the "-D" option, the "OUTPUT_FORMAT" environment variable contains the output MIME media type, and the "PPD" environment variable contains the PPD filename as specified with the "-P" option.
<h2 class="title"><a name="COMMAND_OUTPUT">Command Output</a></h2>
Unless they communicate directly with a printer, print commands send printer-ready data to the standard output.
<p>Print commands can send messages back to
ippeveprinter -c /usr/bin/file "My Cool Printer"
</pre>
<h2 class="title"><a name="SEE_ALSO">See Also</a></h2>
+<b>ippevepcl</b>(7),
+<b>ippeveps</b>(7),
PWG Internet Printing Protocol Workgroup (<a href="http://www.pwg.org/ipp">http://www.pwg.org/ipp</a>)
<h2 class="title"><a name="COPYRIGHT">Copyright</a></h2>
Copyright © 2007-2019 by Apple Inc.
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
.\" information.
.\"
-.TH ippeveprinter 1 "CUPS" "3 May 2019" "Apple Inc."
+.TH ippeveprinter 1 "CUPS" "17 May 2019" "Apple Inc."
.SH NAME
ippeveprinter \- an ipp everywhere printer application for cups
.SH SYNOPSIS
.B \-D
.I device-uri
] [
+.B \-F
+.I output-type/subtype
+] [
.B \-K
.I keypath
] [
.B ippeveprinter
will create an output file using the job ID and name.
.TP 5
+\fB\-F \fIoutput-type/subtype[,...]\fR
+Specifies the output MIME media type.
+The default is "application/postscript" when the \fB\-P\fR option is specified.
+.TP 5
\fB\-M \fImanufacturer\fR
Set the manufacturer of the printer.
The default is "Example".
adds environment variables starting with "IPP_" for all IPP Job attributes in the print request.
For example, when executing a command for an IPP Job containing the "media" Job Template attribute, the "IPP_MEDIA" environment variable will be set to the value of that attribute.
.LP
-In addition, all IPP "xxx-default" Printer Description attributes are added to the environment.
+In addition, all IPP "xxx-default" and "pwg-xxx" Printer Description attributes are added to the environment.
For example, the "IPP_MEDIA_DEFAULT" environment variable will be set to the default value for the "media" Job Template attribute.
.LP
Enumerated values are converted to their keyword equivalents.
For example, a "print-quality" Job Template attribute with a enum value of 3 will become the "IPP_PRINT_QUALITY" environment variable with a value of "draft".
This string conversion only happens for standard Job Template attributes, currently "finishings", "orientation-requested", and "print-quality".
.LP
-Finally, the "CONTENT_TYPE" environment variable contains the MIME media type of the document being printed, the "DEVICE_URI" environment variable contains the device URI as specified with the "\-D" option, and the "PPD" environment variable contains the PPD filename as specified with the "\-P" option.
+Finally, the "CONTENT_TYPE" environment variable contains the MIME media type of the document being printed, the "DEVICE_URI" environment variable contains the device URI as specified with the "\-D" option, the "OUTPUT_FORMAT" environment variable contains the output MIME media type, and the "PPD" environment variable contains the PPD filename as specified with the "\-P" option.
.SH COMMAND OUTPUT
Unless they communicate directly with a printer, print commands send printer-ready data to the standard output.
.LP
ippeveprinter \-c /usr/bin/file "My Cool Printer"
.fi
.SH SEE ALSO
+.BR ippevepcl (7),
+.BR ippeveps (7),
PWG Internet Printing Protocol Workgroup (http://www.pwg.org/ipp)
.SH COPYRIGHT
Copyright \[co] 2007-2019 by Apple Inc.
*hostname, /* Hostname */
*uri, /* printer-uri-supported */
*device_uri, /* Device URI (if any) */
+ *output_format, /* Output format */
#if !CUPS_LITE
*ppdfile, /* PPD file (if any) */
#endif /* !CUPS_LITE */
static int create_listener(const char *name, int port, int family);
static ipp_t *create_media_col(const char *media, const char *source, const char *type, int width, int length, int bottom, int left, int right, int top);
static ipp_t *create_media_size(int width, int length);
-static ippeve_printer_t *create_printer(const char *servername, int serverport, const char *name, const char *location, const char *icon, cups_array_t *docformats, const char *subtypes, const char *directory, const char *command, const char *device_uri, ipp_t *attrs);
+static ippeve_printer_t *create_printer(const char *servername, int serverport, const char *name, const char *location, const char *icon, cups_array_t *docformats, const char *subtypes, const char *directory, const char *command, const char *device_uri, const char *output_format, ipp_t *attrs);
static void debug_attributes(const char *title, ipp_t *ipp, int response);
static void delete_client(ippeve_client_t *client);
static void delete_job(ippeve_job_t *job);
*attrfile = NULL, /* ippserver attributes file */
*command = NULL, /* Command to run with job files */
*device_uri = NULL, /* Device URI */
+ *output_format = NULL, /* Output format */
*icon = NULL, /* Icon file */
#ifdef HAVE_SSL
*keypath = NULL, /* Keychain path */
device_uri = argv[i];
break;
+ case 'F' : /* -F output/format */
+ i ++;
+ if (i >= argc)
+ usage(1);
+
+ output_format = argv[i];
+ break;
+
#ifdef HAVE_SSL
case 'K' : /* -K keypath */
i ++;
if (!command)
command = "ippeveps";
+
+ if (!output_format)
+ output_format = "application/postscript";
}
#endif /* !CUPS_LITE */
else
attrs = load_legacy_attributes(make, model, ppm, ppm_color, duplex, docformats);
- if ((printer = create_printer(servername, serverport, name, location, icon, docformats, subtypes, directory, command, device_uri, attrs)) == NULL)
+ if ((printer = create_printer(servername, serverport, name, location, icon, docformats, subtypes, directory, command, device_uri, output_format, attrs)) == NULL)
return (1);
printer->web_forms = web_forms;
const char *directory, /* I - Spool directory */
const char *command, /* I - Command to run on job files, if any */
const char *device_uri, /* I - Output device, if any */
+ const char *output_format, /* I - Output format, if any */
ipp_t *attrs) /* I - Capability attributes */
{
ippeve_printer_t *printer; /* Printer */
printer->dnssd_name = strdup(name);
printer->command = command ? strdup(command) : NULL;
printer->device_uri = device_uri ? strdup(device_uri) : NULL;
+ printer->output_format = output_format ? strdup(output_format) : NULL;
printer->directory = strdup(directory);
printer->icon = icon ? strdup(icon) : NULL;
printer->port = serverport;
myenvp[myenvc ++] = strdup(val);
}
+ if (job->printer->output_format)
+ {
+ snprintf(val, sizeof(val), "OUTPUT_TYPE=%s", job->printer->output_format);
+ myenvp[myenvc ++] = strdup(val);
+ }
+
#if !CUPS_LITE
if (job->printer->ppdfile)
{
{
/*
* Convert "attribute-name-default" to "IPP_ATTRIBUTE_NAME_DEFAULT=" and
- * then add the value(s) from the attribute.
+ * "pwg-xxx" to "IPP_PWG_XXX", then add the value(s) from the attribute.
*/
const char *name = ippGetName(attr),
*suffix = strstr(name, "-default");
/* Suffix on attribute name */
- if (!suffix || suffix[8])
+ if (strncmp(name, "pwg-", 4) && (!suffix || suffix[8]))
continue;
valptr = val;
_cupsLangPuts(stderr, _("--version Show program version"));
_cupsLangPuts(stdout, _("-2 Set 2-sided printing support (default=1-sided)"));
_cupsLangPuts(stdout, _("-D device-uri Set the device URI for the printer"));
+ _cupsLangPuts(stdout, _("-F output-type/subtype Set the output format for the printer"));
#ifdef HAVE_SSL
_cupsLangPuts(stdout, _("-K keypath Set location of server X.509 certificates and keys."));
#endif /* HAVE_SSL */