-CHANGES.txt - 2009-05-08
+CHANGES.txt - 2009-05-13
------------------------
CHANGES IN CUPS V1.4b3
- - Documentation fixes (STR #3044, STR #3057)
+ - Documentation fixes (STR #3044, STR #3057, STR #3153)
- Added complete localizations for German, Japanese, Polish, and
Russian and partial localizations for Chinese, Danish, Finnish,
French, Italian, Korean, Norwegian, Portuguese, and Swedish
(STR #3096, STR #3098, STR #3109, STR #3111, STR #3141)
+ - The cups-driverd program did not detect symlink loops (STR #3185)
+ - The EPSON 24-pin series driver should now feed the correct amount
+ (STR #2624)
+ - The scheduler now automatically logs the last N debug messages for
+ failed print jobs.
+ - You can now modify a raw print queue (STR #3133)
- Fixed a number of ppdi issues and added a unit test to validate that
ppdc + ppdi can generate and import the same data (STR #3152)
- Moving jobs in the web interface now shows an error if you only have
fi \
$(RMDIR) $(BUILDROOT)$(INITDDIR); \
fi
+ if test "x$(SMFMANIFESTDIR)" != x; then \
+ echo Uninstalling SMF manifest in $(SMFMANIFESTDIR)...;\
+ $(RM) $(BUILDROOT)$(SMFMANIFESTDIR)/cups.xml; \
+ fi
if test "x$(DBUSDIR)" != x; then \
echo Uninstalling cups.conf in $(DBUSDIR)...;\
$(RM) $(BUILDROOT)$(DBUSDIR)/cups.conf; \
$(RMDIR) $(BUILDROOT)$(DBUSDIR); \
fi
- $(RM) $(BUILDROOT)/etc/xinetd.d/cups-lpd
- $(RM) $(BUILDROOT)/usr/share/applications/cups.desktop
- $(RM) $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps/cups.png
- $(RM) $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps/cups.png
- $(RM) $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps/cups.png
- $(RM) $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps/cups.png
+ if test "x$(XINETD)" != x; then \
+ echo Uninstalling xinetd configuration file for cups-lpd...; \
+ $(RM) $(BUILDROOT)$(XINETD)/cups-lpd; \
+ fi
+ if test "x$(MENUDIR)" != x; then \
+ echo Uninstalling desktop menu...; \
+ $(RM) $(BUILDROOT)$(MENUDIR)/cups.desktop; \
+ fi
+ if test "x$(ICONDIR)" != x; then \
+ echo Uninstalling desktop icons...; \
+ $(RM) $(BUILDROOT)$(ICONDIR)/hicolor/16x16/apps/cups.png; \
+ $(RM) $(BUILDROOT)$(ICONDIR)/hicolor/32x32/apps/cups.png; \
+ $(RM) $(BUILDROOT)$(ICONDIR)/hicolor/64x64/apps/cups.png; \
+ $(RM) $(BUILDROOT)$(ICONDIR)/hicolor/128x128/apps/cups.png; \
+ fi
#
#
-# Create an Xcode docset...
+# Create HTML documentation...
#
apihelp:
(cd $$dir; $(MAKE) $(MFLAGS) framedhelp) || exit 1;\
done
+
+#
+# Create an Xcode docset...
+#
+
docset: apihelp
echo Generating docset directory tree...
$(RM) -r org.cups.docset
mkdir -p org.cups.docset/Contents/Resources/Documentation/help
mkdir -p org.cups.docset/Contents/Resources/Documentation/images
+ cd man; $(MAKE) $(MFLAGS) html
cd doc; $(MAKE) $(MFLAGS) docset
cd cgi-bin; $(MAKE) $(MFLAGS) makedocset
cgi-bin/makedocset org.cups.docset \
{
char serial[1024]; /* Serial number buffer */
OSStatus status; /* Function results */
+ IOReturn iostatus, /* Current IO status */
+ prev_iostatus = 0; /* Previous IO status */
pthread_t read_thread_id, /* Read thread */
sidechannel_thread_id;/* Side-channel thread */
int have_sidechannel = 0; /* Was the side-channel thread started? */
{
bytes = g.print_bytes;
- status = (*g.classdriver)->WritePipe(g.classdriver, (UInt8*)print_ptr, &bytes, 0);
+ iostatus = (*g.classdriver)->WritePipe(g.classdriver, (UInt8*)print_ptr, &bytes, 0);
/*
* Ignore timeout errors, but retain the number of bytes written to
* avoid sending duplicate data (<rdar://problem/6254911>)...
*/
- if (status == kIOUSBTransactionTimeout)
- status = 0;
+ if (iostatus == kIOUSBTransactionTimeout)
+ iostatus = 0;
- if (status || bytes < 0)
+ /*
+ * Ignore stall errors, since we clear any stalls in the class driver...
+ */
+
+ if (iostatus == kIOUSBPipeStalled)
+ iostatus = 0;
+
+ /*
+ * Ignore the first "aborted" status we get, since we might have
+ * received a signal (<rdar://problem/6860126>)...
+ */
+
+ if (iostatus == kIOReturnAborted && prev_iostatus != kIOReturnAborted)
+ {
+ prev_iostatus = iostatus;
+ iostatus = 0;
+ }
+ else
+ prev_iostatus = iostatus;
+
+ if (iostatus || bytes < 0)
{
/*
* Write error - bail if we don't see an error we can retry...
*/
- OSStatus err = (*g.classdriver)->Abort(g.classdriver);
+ IOReturn err = (*g.classdriver)->Abort(g.classdriver);
_cupsLangPuts(stderr, _("ERROR: Unable to send print data!\n"));
- fprintf(stderr, "DEBUG: USB class driver WritePipe returned %ld\n",
- (long)status);
- fprintf(stderr, "DEBUG: USB class driver Abort returned %ld\n",
- (long)err);
+ fprintf(stderr, "DEBUG: USB class driver WritePipe returned %x\n",
+ iostatus);
+ fprintf(stderr, "DEBUG: USB class driver Abort returned %x\n",
+ err);
status = job_canceled ? CUPS_BACKEND_FAILED : CUPS_BACKEND_STOP;
break;
}
if (get_status != HTTP_OK)
{
+ httpFlush(http);
+
fprintf(stderr, "ERROR: Unable to get PPD file %s: %d - %s\n",
uri, get_status, httpStatus(get_status));
}
--- /dev/null
+<!--
+ "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+ CGI API header for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h1 class='title'>CGI API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+ <th>Header</th>
+ <th>cups/cgi.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+ <th>Library</th>
+ <td>-lcupscgi</td>
+</tr>
+<tr>
+ <th>See Also</th>
+ <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
--- /dev/null
+<!--
+ "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+ CGI API introduction for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The CGI API provides Common Gateway Interface functions for CUPS.</p>
"<head>\n"
"<title>CUPS Documentation</title>\n"
"<link rel='stylesheet' type='text/css' "
- "src='cups-printable.css'>\n"
+ "href='cups-printable.css'>\n"
"</head>\n"
"<body>\n"
- "<h1>CUPS Documentation</h1>\n"
+ "<h1 class='title'>CUPS Documentation</h1>\n"
"<table width='100%' summary=''>\n"
"<tr>\n");
AC_CHECK_HEADER(membershipPriv.h,AC_DEFINE(HAVE_MEMBERSHIPPRIV_H))
AC_CHECK_FUNCS(mbr_uid_to_uuid)
+ dnl Check for the vproc_transaction_begin/end stuff...
+ AC_CHECK_FUNCS(vproc_transaction_begin)
+
dnl Need <dlfcn.h> header...
AC_CHECK_HEADER(dlfcn.h,AC_DEFINE(HAVE_DLFCN_H))
#undef HAVE_LRAND48
+/*
+ * Do we have vproc_transaction_begin/end?
+ */
+
+#undef HAVE_VPROC_TRANSACTION_BEGIN
+
+
/*
* Do we have libusb?
*/
Array API header for the Common UNIX Printing System (CUPS).
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>Array API</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
CUPS API header for the Common UNIX Printing System (CUPS).
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>CUPS API</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
File and Directory API header for the Common UNIX Printing System (CUPS).
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>File and Directory APIs</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
Filter and backend programming header for the Common UNIX Printing System
(CUPS).
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>Filter and Backend Programming</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
Filter and backend programming introduction for the Common UNIX Printing
System (CUPS).
- Copyright 2007-2008 by Apple Inc.
+ Copyright 2007-2009 by Apple Inc.
Copyright 1997-2006 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
output. The backend is the last filter in the chain and writes to the
device.</p>
+<p>Filters are always run as a non-privileged user, typically "lp", with no
+connection to the user's desktop. Backends are run either as a non-privileged
+user or as root if the file permissions do not allow user or group execution.
+The <a href="#PERMISSIONS">file permissions</a> section talks about this in
+more detail.</p>
+
<h3><a name="SECURITY">Security Considerations</a></h3>
<p>It is always important to use security programming practices. Filters and
used by the filter since that can lead to an unauthorized disclosure of
information. <em>Always</em> treat input as suspect and validate it!</p>
-<p>If you are developing a backend that runs as root, make sure to check for
+<p>If you are developing a backend that runs as root , make sure to check for
potential buffer overflows, integer under/overflow conditions, and file
accesses since these can lead to privilege escalations. When writing files,
always validate the file path and <em>never</em> allow a user to determine
directory to write to.</p>
<p>In addition, some operating systems provide additional security mechanisms
-that further limit file system access, even for backends running as root. On
+that further limit file system access, even for backends running as root. On
Mac OS X, for example, no backend may write to a user's home directory.</p>
</blockquote>
+<h3><a name="PERMISSIONS">File Permissions</a></h3>
+
+<p>For security reasons, CUPS will only run filters and backends that are owned
+by root and do not have world write permissions. The recommended permissions for
+filters and backends are 0555 - read and execute but no write. Backends that
+must run as root should use permissions of 0500 - read and execute by root, no
+access for other users. Write permissions can be enabled for the root user
+only.</p>
+
+<p>To avoid a warning message, the directory containing your filter(s) must also
+be owned by root and have world write disabled - permissions of 0755 or 0555 are
+strongly encouraged.</p>
+
<h3><a name="TEMPFILES">Temporary Files</a></h3>
<p>Temporary files should be created in the directory specified by the
HTTP and IPP API header for the Common UNIX Printing System (CUPS).
- Copyright 2007-2008 by Apple Inc.
+ Copyright 2007-2009 by Apple Inc.
Copyright 1997-2006 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>HTTP and IPP APIs</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
Introduction to CUPS programming header for the Common UNIX Printing System
(CUPS).
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>Introduction to CUPS Programming</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
PPD API header for the Common UNIX Printing System (CUPS).
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>PPD API</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
*
* Backend functions for the Common UNIX Printing System (CUPS).
*
- * Copyright 2007-2008 by Apple Inc.
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
* It handles quoting of special characters in the device-make-and-model,
* device-info, device-id, and device-location strings.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
void
* the conflicting options. The returned option array must be freed using
* @link cupsFreeOptions@.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
int /* O - Number of conflicting options */
* choice for the conflicting option, then iterating over all possible choices
* until a non-conflicting option choice is found.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
int /* O - 1 on success, 0 on failure */
* This function tests whether a particular option choice is available based
* on constraints against options in the "InstallableOptions" group.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
int /* O - 1 if conflicting, 0 if not conflicting */
CUPS_PRINTER_AUTHENTICATED = 0x400000,/* Printer requires authentication @since CUPS 1.2/Mac OS X 10.5@ */
CUPS_PRINTER_COMMANDS = 0x800000, /* Printer supports maintenance commands @since CUPS 1.2/Mac OS X 10.5@ */
CUPS_PRINTER_DISCOVERED = 0x1000000, /* Printer was automatically discovered and added @since CUPS 1.3/Mac OS X 10.5@ */
- CUPS_PRINTER_SCANNER = 0x2000000, /* Scanner-only device @since CUPS 1.4@ */
- CUPS_PRINTER_MFP = 0x4000000, /* Printer with scanning capabilities @since CUPS 1.4@ */
+ CUPS_PRINTER_SCANNER = 0x2000000, /* Scanner-only device @since CUPS 1.4/Mac OS X 10.6@ */
+ CUPS_PRINTER_MFP = 0x4000000, /* Printer with scanning capabilities @since CUPS 1.4/Mac OS X 10.6@ */
CUPS_PRINTER_OPTIONS = 0x6fffc /* ~(CLASS | REMOTE | IMPLICIT | DEFAULT | FAX | REJECTING | DELETE | NOT_SHARED | AUTHENTICATED | COMMANDS | DISCOVERED) @private@ */
};
const char *method,
const char *resource,
void *user_data);
- /**** New password callback @since CUPS 1.4@ ****/
+ /**** New password callback @since CUPS 1.4/Mac OS X 10.6@ ****/
typedef void (*cups_device_cb_t)(const char *device_class,
const char *device_id, const char *device_info,
const char *device_make_and_model,
const char *device_uri,
const char *device_location, void *user_data);
- /**** Device callback @since CUPS 1.4@ ****/
+ /**** Device callback @since CUPS 1.4/Mac OS X 10.6@ ****/
typedef struct cups_option_s /**** Printer Options ****/
{
* The returned destination must be freed using @link cupsFreeDests@ with a
* "num_dests" value of 1.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
cups_dest_t * /* O - Destination or @code NULL@ */
if (!strcasecmp(size->name, "Custom") ||
(!manual_feed && !input_slot) ||
(manual_feed && !strcasecmp(manual_feed->choice, "False") &&
- (!input_slot || (input_slot->code && !input_slot->code[0]))))
+ (!input_slot || (input_slot->code && !input_slot->code[0]))) ||
+ (!rpr && ppd->num_filters > 0))
{
/*
* Use PageSize code...
ppdMarkOption(ppd, "PageSize", size->name);
}
- else if ((rpr && rpr->value && !strcasecmp(rpr->value, "True")) ||
- (!rpr && ppd->num_filters > 0))
+ else if (rpr && rpr->value && !strcasecmp(rpr->value, "True"))
{
/*
* Use PageRegion code...
*
* This function handles any comment escaping of the value.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
ssize_t /* O - Number of bytes written or -1 on error */
* parameters provide comma-delimited lists of backends to include or omit from
* the request respectively.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
ipp_status_t /* O - Request status - @code IPP_OK@ on success. */
* need to bracket IPv6 numeric addresses.
*/
- if (strchr(value, ':'))
+ char *ptr = strchr(value, ':');
+
+ if (value[0] != '[' && ptr && strchr(ptr + 1, ':'))
{
/*
* Bracket IPv6 numeric addresses...
* Check for a trailing dot on the hostname...
*/
- char *ptr = http->fields[HTTP_FIELD_HOST];
- /* Pointer into Host: field */
+ ptr = http->fields[HTTP_FIELD_HOST];
if (*ptr)
{
*
* The returned names are defined in RFC 2911 and 3382.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
const char * /* O - Tag name */
*
* The tag names are defined in RFC 2911 and 3382.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
ipp_tag_t /* O - Tag value */
* Internet Printing Protocol definitions for the Common UNIX Printing
* System (CUPS).
*
- * Copyright 2007-2008 by Apple Inc.
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2006 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
CUPS_MOVE_JOB, /* Move a job to a different printer */
CUPS_AUTHENTICATE_JOB, /* Authenticate a job @since CUPS 1.2/Mac OS X 10.5@ */
CUPS_GET_PPD, /* Get a PPD file @since CUPS 1.3/Mac OS X 10.5@ */
- CUPS_GET_DOCUMENT = 0x4027 /* Get a document file @since CUPS 1.4@ */
+ CUPS_GET_DOCUMENT = 0x4027 /* Get a document file @since CUPS 1.4/Mac OS X 10.6@ */
} ipp_op_t;
/* Old names for the operations */
message = _("Media tray needs to be filled.");
else if (!strncmp(reason, "media-jam", 9))
message = _("Media jam!");
- else if (!strncmp(reason, "moving-to-paused", 16) ||
- !strncmp(reason, "offline", 7) ||
- !strncmp(reason, "paused", 6) ||
+ else if (!strncmp(reason, "offline", 7) ||
!strncmp(reason, "shutdown", 8))
message = _("Printer offline.");
else if (!strncmp(reason, "toner-low", 9))
* text from the attribute value. If no localized text for the requested
* name can be found, @code NULL@ is returned.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
const char * /* O - Value or @code NULL@ if not found */
* If the specified PPD file does not support custom page sizes, both
* "minimum" and "maximum" are filled with zeroes.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
int /* O - 1 if custom sizes are supported, 0 otherwise */
cups_array_t *marked; /* Marked choices @since CUPS 1.3/Mac OS X 10.5@ @private@ */
/**** New in CUPS 1.4 ****/
- cups_array_t *cups_uiconstraints; /* cupsUIConstraints @since CUPS 1.4@ @private@ */
+ cups_array_t *cups_uiconstraints; /* cupsUIConstraints @since CUPS 1.4/Mac OS X 10.6@ @private@ */
} ppd_file_t;
* cupsSendDocument() or cupsSendRequest(). For requests that return
* additional data, use httpRead() after getting a successful response.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
ipp_t * /* O - Response or @code NULL@ on HTTP error */
* This function is used after cupsGetResponse() to read the PPD or document
* files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
ssize_t /* O - Bytes read, 0 on EOF, -1 on error */
* Unlike cupsDoFileRequest(), cupsDoIORequest(), and cupsDoRequest(), the
* request is not freed.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
http_status_t /* O - Initial HTTP status */
* This function is used after @link cupsSendRequest@ to provide a PPD and
* after @link cupsStartDocument@ to provide a document file.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
http_status_t /* O - @code HTTP_CONTINUE@ if OK or HTTP status on error */
* support SNMP queries. @code CUPS_SC_STATUS_NO_RESPONSE@ is returned when
* the printer does not respond to the SNMP query.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
cups_sc_status_t /* O - Query status */
* support SNMP queries. @code CUPS_SC_STATUS_NO_RESPONSE@ is returned when
* the printer does not respond to the first SNMP query.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
cups_sc_status_t /* O - Status of first query of @code CUPS_SC_STATUS_OK@ on success */
CUPS_SC_CMD_GET_BIDI = 3, /* Return bidirectional capabilities */
CUPS_SC_CMD_GET_DEVICE_ID = 4, /* Return the IEEE-1284 device ID */
CUPS_SC_CMD_GET_STATE = 5, /* Return the device state */
- CUPS_SC_CMD_SNMP_GET = 6, /* Query an SNMP OID @since CUPS 1.4@ */
- CUPS_SC_CMD_SNMP_GET_NEXT = 7 /* Query the next SNMP OID @since CUPS 1.4@ */
+ CUPS_SC_CMD_SNMP_GET = 6, /* Query an SNMP OID @since CUPS 1.4/Mac OS X 10.6@ */
+ CUPS_SC_CMD_SNMP_GET_NEXT = 7 /* Query the next SNMP OID @since CUPS 1.4/Mac OS X 10.6@ */
};
typedef enum cups_sc_command_e cups_sc_command_t;
/**** Request command codes ****/
* Uses the current password callback function. Returns @code NULL@ if the
* user does not provide a password.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
const char * /* O - Password */
*
* Pass @code NULL@ to restore the default (console) password callback.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
void
* Use the @link cupsLastError@ and @link cupsLastErrorString@ functions to get
* the cause of any failure.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
ipp_status_t /* O - IPP status */
* print, use the @link cupsPrintFile2@ or @link cupsPrintFiles2@ function
* instead.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
int /* O - Job ID or 0 on error */
*
* The document must have been started using @link cupsStartDocument@.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
ipp_status_t /* O - Status of document submission */
* For classes, @code cupsGetPPD3@ returns the PPD file for the first printer
* in the class.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
http_status_t /* O - HTTP status */
* @code CUPS_FORMAT_TEXT@ are provided for the "format" argument, although
* any supported MIME type string can be supplied.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
http_status_t /* O - HTTP status of request */
help/man-lpstat.html \
help/man-mime.convs.html \
help/man-mime.types.html \
+ help/man-notifier.html \
help/man-ppdc.html \
help/man-ppdhtml.html \
help/man-ppdi.html \
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
color: white;
}
+H1.title {
+ display: none;
+}
+
H2.title, H3.title {
border-bottom: solid 1pt #999999;
}
<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>Printer Accounting Basics</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">Printer Accounting Basics</H1>
+
<P>CUPS supports a variety of printer accounting schemes. Aside from the
built-in <A HREF="#QUOTAS">quota</A> and <A HREF="#PAGELOG">page logging</A>
support, there are several third-party solutions that can be found on
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
<body>
<div class='body'>
<!--
- "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+ "$Id: api-array.header 8627 2009-05-13 21:39:17Z mike $"
Array API header for the Common UNIX Printing System (CUPS).
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>Array API</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
</head>
<body>
<div class='body'>
+<!--
+ "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+ CGI API header for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h1 class='title'>CGI API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+ <th>Header</th>
+ <th>cups/cgi.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+ <th>Library</th>
+ <td>-lcupscgi</td>
+</tr>
+<tr>
+ <th>See Also</th>
+ <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
+<ul class="subcontents">
+<li><a href="#OVERVIEW">Overview</a></li>
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
<li><a href="#cgiCheckVariables" title="Check for the presence of "required" variables.">cgiCheckVariables</a></li>
<li><a href="#cgiCompileSearch" title="Compile a search string.">cgiCompileSearch</a></li>
<li><a href="#help_node_s" title="Help node structure...">help_node_s</a></li>
<li><a href="#help_word_s" title="Help word structure...">help_word_s</a></li>
</ul></li>
+<!--
+ "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+ CGI API introduction for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The CGI API provides Common Gateway Interface functions for CUPS.</p>
<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
<h3 class="function"><a name="cgiCheckVariables">cgiCheckVariables</a></h3>
<p class="description">Check for the presence of "required" variables.</p>
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
<body>
<div class='body'>
<!--
- "$Id: api-cups.header 8087 2008-10-27 21:37:05Z mike $"
+ "$Id: api-cups.header 8627 2009-05-13 21:39:17Z mike $"
CUPS API header for the Common UNIX Printing System (CUPS).
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>CUPS API</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
<br>
Use the <a href="#cupsLastError"><code>cupsLastError</code></a> and <a href="#cupsLastErrorString"><code>cupsLastErrorString</code></a> functions to get
the cause of any failure.</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsCancelJob2">cupsCancelJob2</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsCancelJob2">cupsCancelJob2</a></h3>
<p class="description">Cancel or purge a print job.</p>
<p class="code">
ipp_status_t cupsCancelJob2 (<br>
the cause of any failure.
</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsCreateJob">cupsCreateJob</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsCreateJob">cupsCreateJob</a></h3>
<p class="description">Create an empty job for streaming.</p>
<p class="code">
int cupsCreateJob (<br>
environment variable, then the ~/.cups/client.conf file, and finally the
/etc/cups/client.conf file. If not set, the default is
<code>HTTP_ENCRYPT_IF_REQUESTED</code>.</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsFinishDocument">cupsFinishDocument</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsFinishDocument">cupsFinishDocument</a></h3>
<p class="description">Finish sending a document.</p>
<p class="code">
ipp_status_t cupsFinishDocument (<br>
jobs that are stopped, canceled, aborted, or completed.
</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsGetNamedDest">cupsGetNamedDest</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsGetNamedDest">cupsGetNamedDest</a></h3>
<p class="description">Get options for the named destination.</p>
<p class="code">
<a href="#cups_dest_t">cups_dest_t</a> *cupsGetNamedDest (<br>
each call to <a href="#cupsGetPPD"><code>cupsGetPPD</code></a> or <code>cupsGetPPD2</code>.
</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsGetPPD3">cupsGetPPD3</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsGetPPD3">cupsGetPPD3</a></h3>
<p class="description">Get the PPD file for a printer on the specified
server if it has changed.</p>
<p class="code">
<h4 class="discussion">Discussion</h4>
<p class="discussion">Uses the current password callback function. Returns <code>NULL</code> if the
user does not provide a password.</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsGetPassword2">cupsGetPassword2</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsGetPassword2">cupsGetPassword2</a></h3>
<p class="description">Get a password from the user using the advanced
callback.</p>
<p class="code">
</dl>
<h4 class="discussion">Discussion</h4>
<p class="discussion">Pass <code>NULL</code> to restore the default (console) password callback.</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsSetPasswordCB2">cupsSetPasswordCB2</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsSetPasswordCB2">cupsSetPasswordCB2</a></h3>
<p class="description">Set the advanced password callback for CUPS.</p>
<p class="code">
void cupsSetPasswordCB2 (<br>
</dl>
<h4 class="discussion">Discussion</h4>
<p class="discussion">Pass <code>NULL</code> to restore the default user name.</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsStartDocument">cupsStartDocument</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsStartDocument">cupsStartDocument</a></h3>
<p class="description">Add a document to a job created with cupsCreateJob().</p>
<p class="code">
http_status_t cupsStartDocument (<br>
<p class="code">
typedef struct <a href="#cups_dest_s">cups_dest_s</a> cups_dest_t;
</p>
-<h3 class="typedef"><span class="info"> CUPS 1.4 </span><a name="cups_device_cb_t">cups_device_cb_t</a></h3>
+<h3 class="typedef"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cups_device_cb_t">cups_device_cb_t</a></h3>
<p class="description">Device callback </p>
<p class="code">
typedef void (*cups_device_cb_t)(const char *device_class, const char *device_id, const char *device_info, const char *device_make_and_model, const char *device_uri, const char *device_location, void *user_data);
<p class="code">
typedef struct <a href="#cups_option_s">cups_option_s</a> cups_option_t;
</p>
-<h3 class="typedef"><span class="info"> CUPS 1.4 </span><a name="cups_password_cb2_t">cups_password_cb2_t</a></h3>
+<h3 class="typedef"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cups_password_cb2_t">cups_password_cb2_t</a></h3>
<p class="description">New password callback </p>
<p class="code">
typedef const char *(*cups_password_cb2_t)(const char *prompt, http_t *http, const char *method, const char *resource, void *user_data);
<dd class="description">Local printer or class</dd>
<dt>CUPS_PRINTER_MEDIUM </dt>
<dd class="description">Can do Tabloid/B/C/A3/A2</dd>
-<dt>CUPS_PRINTER_MFP <span class="info"> CUPS 1.4 </span></dt>
+<dt>CUPS_PRINTER_MFP <span class="info"> CUPS 1.4/Mac OS X 10.6 </span></dt>
<dd class="description">Printer with scanning capabilities </dd>
<dt>CUPS_PRINTER_NOT_SHARED <span class="info"> CUPS 1.2/Mac OS X 10.5 </span></dt>
<dd class="description">Printer is not shared </dd>
<dd class="description">Printer is rejecting jobs</dd>
<dt>CUPS_PRINTER_REMOTE </dt>
<dd class="description">Remote printer or class</dd>
-<dt>CUPS_PRINTER_SCANNER <span class="info"> CUPS 1.4 </span></dt>
+<dt>CUPS_PRINTER_SCANNER <span class="info"> CUPS 1.4/Mac OS X 10.6 </span></dt>
<dd class="description">Scanner-only device </dd>
<dt>CUPS_PRINTER_SMALL </dt>
<dd class="description">Can do Letter/Legal/A4</dd>
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
</head>
<body>
<div class='body'>
+<!--
+ "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+ Driver API header for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h1 class='title'>Driver API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+ <th>Header</th>
+ <th>cups/driver.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+ <th>Library</th>
+ <td>-lcupsdriver</td>
+</tr>
+<tr>
+ <th>See Also</th>
+ <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
+<ul class="subcontents">
+<li><a href="#OVERVIEW">Overview</a></li>
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
<li><a href="#cupsCMYKDelete" title="Delete a color separation.">cupsCMYKDelete</a></li>
<li><a href="#cupsCMYKDoBlack" title="Do a black separation...">cupsCMYKDoBlack</a></li>
<li><a href="#cups_scmy_lut[256]" title="sRGB gamma lookup table (inverted)">cups_scmy_lut[256]</a></li>
<li><a href="#cups_srgb_lut[256]" title="sRGB gamma lookup table">cups_srgb_lut[256]</a></li>
</ul></li>
+<!--
+ "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+ Driver API introduction for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The driver API provides common dithering, color conversion, and utility
+functions for CUPS drivers.</p>
<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
<h3 class="function"><a name="cupsCMYKDelete">cupsCMYKDelete</a></h3>
<p class="description">Delete a color separation.</p>
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
<body>
<div class='body'>
<!--
- "$Id: api-filedir.header 8087 2008-10-27 21:37:05Z mike $"
+ "$Id: api-filedir.header 8627 2009-05-13 21:39:17Z mike $"
File and Directory API header for the Common UNIX Printing System (CUPS).
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>File and Directory APIs</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">0 on success, -1 on error</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsFilePutConf">cupsFilePutConf</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsFilePutConf">cupsFilePutConf</a></h3>
<p class="description">Write a configuration line.</p>
<p class="code">
ssize_t cupsFilePutConf (<br>
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
<body>
<div class='body'>
<!--
- "$Id: api-filter.header 8087 2008-10-27 21:37:05Z mike $"
+ "$Id: api-filter.header 8627 2009-05-13 21:39:17Z mike $"
Filter and backend programming header for the Common UNIX Printing System
(CUPS).
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>Filter and Backend Programming</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
<ul class="subcontents">
<li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
<li><a href="#SECURITY">Security Considerations</a></li>
+<li><a href="#PERMISSIONS">File Permissions</a></li>
<li><a href="#TEMPFILES">Temporary Files</a></li>
<li><a href="#COPIES">Copy Generation</a></li>
<li><a href="#EXITCODES">Exit Codes</a></li>
Filter and backend programming introduction for the Common UNIX Printing
System (CUPS).
- Copyright 2007-2008 by Apple Inc.
+ Copyright 2007-2009 by Apple Inc.
Copyright 1997-2006 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
output. The backend is the last filter in the chain and writes to the
device.</p>
+<p>Filters are always run as a non-privileged user, typically "lp", with no
+connection to the user's desktop. Backends are run either as a non-privileged
+user or as root if the file permissions do not allow user or group execution.
+The <a href="#PERMISSIONS">file permissions</a> section talks about this in
+more detail.</p>
+
<h3><a name="SECURITY">Security Considerations</a></h3>
<p>It is always important to use security programming practices. Filters and
used by the filter since that can lead to an unauthorized disclosure of
information. <em>Always</em> treat input as suspect and validate it!</p>
-<p>If you are developing a backend that runs as root, make sure to check for
+<p>If you are developing a backend that runs as root , make sure to check for
potential buffer overflows, integer under/overflow conditions, and file
accesses since these can lead to privilege escalations. When writing files,
always validate the file path and <em>never</em> allow a user to determine
directory to write to.</p>
<p>In addition, some operating systems provide additional security mechanisms
-that further limit file system access, even for backends running as root. On
+that further limit file system access, even for backends running as root. On
Mac OS X, for example, no backend may write to a user's home directory.</p>
</blockquote>
+<h3><a name="PERMISSIONS">File Permissions</a></h3>
+
+<p>For security reasons, CUPS will only run filters and backends that are owned
+by root and do not have world write permissions. The recommended permissions for
+filters and backends are 0555 - read and execute but no write. Backends that
+must run as root should use permissions of 0500 - read and execute by root, no
+access for other users. Write permissions can be enabled for the root user
+only.</p>
+
+<p>To avoid a warning message, the directory containing your filter(s) must also
+be owned by root and have world write disabled - permissions of 0755 or 0555 are
+strongly encouraged.</p>
+
<h3><a name="TEMPFILES">Temporary Files</a></h3>
<p>Temporary files should be created in the directory specified by the
first.
</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsBackendReport">cupsBackendReport</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsBackendReport">cupsBackendReport</a></h3>
<p class="description">Write a device line from a backend.</p>
<p class="code">
void cupsBackendReport (<br>
update the value to contain the number of data bytes in the buffer.
</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsSideChannelSNMPGet">cupsSideChannelSNMPGet</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsSideChannelSNMPGet">cupsSideChannelSNMPGet</a></h3>
<p class="description">Query a SNMP OID's value.</p>
<p class="code">
<a href="#cups_sc_status_t">cups_sc_status_t</a> cupsSideChannelSNMPGet (<br>
the printer does not respond to the SNMP query.
</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsSideChannelSNMPWalk">cupsSideChannelSNMPWalk</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsSideChannelSNMPWalk">cupsSideChannelSNMPWalk</a></h3>
<p class="description">Query multiple SNMP OID values.</p>
<p class="code">
<a href="#cups_sc_status_t">cups_sc_status_t</a> cupsSideChannelSNMPWalk (<br>
<dd class="description">Return the IEEE-1284 device ID</dd>
<dt>CUPS_SC_CMD_GET_STATE </dt>
<dd class="description">Return the device state</dd>
-<dt>CUPS_SC_CMD_SNMP_GET <span class="info"> CUPS 1.4 </span></dt>
+<dt>CUPS_SC_CMD_SNMP_GET <span class="info"> CUPS 1.4/Mac OS X 10.6 </span></dt>
<dd class="description">Query an SNMP OID </dd>
-<dt>CUPS_SC_CMD_SNMP_GET_NEXT <span class="info"> CUPS 1.4 </span></dt>
+<dt>CUPS_SC_CMD_SNMP_GET_NEXT <span class="info"> CUPS 1.4/Mac OS X 10.6 </span></dt>
<dd class="description">Query the next SNMP OID </dd>
<dt>CUPS_SC_CMD_SOFT_RESET </dt>
<dd class="description">Do a soft reset</dd>
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
<body>
<div class='body'>
<!--
- "$Id: api-httpipp.header 8087 2008-10-27 21:37:05Z mike $"
+ "$Id: api-httpipp.header 8627 2009-05-13 21:39:17Z mike $"
HTTP and IPP API header for the Common UNIX Printing System (CUPS).
- Copyright 2007-2008 by Apple Inc.
+ Copyright 2007-2009 by Apple Inc.
Copyright 1997-2006 by Easy Software Products, all rights reserved.
These coded instructions, statements, and computer programs are the
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>HTTP and IPP APIs</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
to add the standard groups.
</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsGetDevices">cupsGetDevices</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsGetDevices">cupsGetDevices</a></h3>
<p class="description">Get available printer devices.</p>
<p class="code">
ipp_status_t cupsGetDevices (<br>
<p class="discussion">This function returns <code>HTTP_OK</code> when the file is successfully retrieved.
</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsGetResponse">cupsGetResponse</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsGetResponse">cupsGetResponse</a></h3>
<p class="description">Get a response to an IPP request.</p>
<p class="code">
<a href="#ipp_t">ipp_t</a> *cupsGetResponse (<br>
successfully.
</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsReadResponseData">cupsReadResponseData</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsReadResponseData">cupsReadResponseData</a></h3>
<p class="description">Read additional data after the IPP response.</p>
<p class="code">
ssize_t cupsReadResponseData (<br>
files for CUPS_GET_PPD and CUPS_GET_DOCUMENT requests, respectively.
</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsSendRequest">cupsSendRequest</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsSendRequest">cupsSendRequest</a></h3>
<p class="description">Send an IPP request.</p>
<p class="code">
<a href="#http_status_t">http_status_t</a> cupsSendRequest (<br>
request is not freed.
</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsWriteRequestData">cupsWriteRequestData</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsWriteRequestData">cupsWriteRequestData</a></h3>
<p class="description">Write additional data after an IPP request.</p>
<p class="code">
<a href="#http_status_t">http_status_t</a> cupsWriteRequestData (<br>
<dt>p</dt>
<dd class="description">Port number to use</dd>
</dl>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="ippTagString">ippTagString</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="ippTagString">ippTagString</a></h3>
<p class="description">Return the tag name corresponding to a tag value.</p>
<p class="code">
const char *ippTagString (<br>
<p class="discussion">The returned names are defined in RFC 2911 and 3382.
</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="ippTagValue">ippTagValue</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="ippTagValue">ippTagValue</a></h3>
<p class="description">Return the tag value corresponding to a tag name.</p>
<p class="code">
<a href="#ipp_tag_t">ipp_tag_t</a> ippTagValue (<br>
<dd class="description">Get the default printer</dd>
<dt>CUPS_GET_DEVICES </dt>
<dd class="description">Get a list of supported devices</dd>
-<dt>CUPS_GET_DOCUMENT <span class="info"> CUPS 1.4 </span></dt>
+<dt>CUPS_GET_DOCUMENT <span class="info"> CUPS 1.4/Mac OS X 10.6 </span></dt>
<dd class="description">Get a document file </dd>
<dt>CUPS_GET_PPD <span class="info"> CUPS 1.3/Mac OS X 10.5 </span></dt>
<dd class="description">Get a PPD file </dd>
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
</head>
<body>
<div class='body'>
+<!--
+ "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+ MIME API header for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h1 class='title'>MIME API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+ <th>Header</th>
+ <th>cups/mime.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+ <th>Library</th>
+ <td>-lcupsmime</td>
+</tr>
+<tr>
+ <th>See Also</th>
+ <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
+<ul class="subcontents">
+<li><a href="#OVERVIEW">Overview</a></li>
<li><a href="#FUNCTIONS">Functions</a><ul class="code">
<li><a href="#mimeAddFilter" title="Add a filter to the current MIME database.">mimeAddFilter</a></li>
<li><a href="#mimeAddType" title="Add a MIME type to a database.">mimeAddType</a></li>
<li><a href="#mime_t" title="MIME Database">mime_t</a></li>
<li><a href="#mime_type_t" title="MIME Type Data">mime_type_t</a></li>
</ul></li>
+<!--
+ "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+ MIME API introduction for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The MIME API provides file typing and conversion services for CUPS.</p>
<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
<h3 class="function"><a name="mimeAddFilter">mimeAddFilter</a></h3>
<p class="description">Add a filter to the current MIME database.</p>
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
Introduction to CUPS programming header for the Common UNIX Printing System
(CUPS).
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>Introduction to CUPS Programming</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
<body>
<div class='body'>
<!--
- "$Id: api-ppd.header 8087 2008-10-27 21:37:05Z mike $"
+ "$Id: api-ppd.header 8627 2009-05-13 21:39:17Z mike $"
PPD API header for the Common UNIX Printing System (CUPS).
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>PPD API</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
puts(attr->value);
</pre>
<h2 class="title"><a name="FUNCTIONS">Functions</a></h2>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsGetConflicts">cupsGetConflicts</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsGetConflicts">cupsGetConflicts</a></h3>
<p class="description">Get a list of conflicting options in a marked PPD.</p>
<p class="code">
int cupsGetConflicts (<br>
<p class="discussion">This function maps the IPP "finishings", "media", "mirror",
"multiple-document-handling", "output-bin", "printer-resolution", and
"sides" attributes to their corresponding PPD options and choices.</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="cupsResolveConflicts">cupsResolveConflicts</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="cupsResolveConflicts">cupsResolveConflicts</a></h3>
<p class="description">Resolve conflicts in a marked PPD.</p>
<p class="code">
int cupsResolveConflicts (<br>
<p class="discussion">Options are returned from all groups in ascending alphanumeric order.
</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="ppdInstallableConflict">ppdInstallableConflict</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="ppdInstallableConflict">ppdInstallableConflict</a></h3>
<p class="description">Test whether an option choice conflicts with
an installable option.</p>
<p class="code">
If no value of the requested scheme can be found, NULL is returned.
</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="ppdLocalizeMarkerName">ppdLocalizeMarkerName</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="ppdLocalizeMarkerName">ppdLocalizeMarkerName</a></h3>
<p class="description">Get the localized version of a marker-names
attribute value.</p>
<p class="code">
</dl>
<h4 class="returnvalue">Return Value</h4>
<p class="description">Size record for page or NULL</p>
-<h3 class="function"><span class="info"> CUPS 1.4 </span><a name="ppdPageSizeLimits">ppdPageSizeLimits</a></h3>
+<h3 class="function"><span class="info"> CUPS 1.4/Mac OS X 10.6 </span><a name="ppdPageSizeLimits">ppdPageSizeLimits</a></h3>
<p class="description">Return the custom page size limits.</p>
<p class="code">
int ppdPageSizeLimits (<br>
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
</head>
<body>
<div class='body'>
+<!--
+ "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+ PPD Compiler API header for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h1 class='title'>PPD Compiler API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+ <th>Header</th>
+ <th>cups/ppdc.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+ <th>Library</th>
+ <td>-lcupsppdc</td>
+</tr>
+<tr>
+ <th>See Also</th>
+ <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
<h2 class="title">Contents</h2>
<ul class="contents">
+<ul class="subcontents">
+<li><a href="#OVERVIEW">Overview</a></li>
<li><a href="#CLASSES">Classes</a><ul class="code">
<li><a href="#ppdcArray" title="// Shared Array">ppdcArray</a></li>
<li><a href="#ppdcAttr" title="// Attribute">ppdcAttr</a></li>
<li><a href="#ppdcOptSection" title="// Option section">ppdcOptSection</a></li>
<li><a href="#ppdcOptType" title="// Option type">ppdcOptType</a></li>
</ul></li>
+<!--
+ "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+ PPD Compiler API introduction for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The PPD Compiler API provides access to CUPS driver information files and
+methods for generating and importing PPD files.</p>
<h2 class="title"><a name="CLASSES">Classes</a></h2>
<h3 class="class"><a name="ppdcArray">ppdcArray</a></h3>
<p class="description">// Shared Array</p>
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
Raster API header for the Common UNIX Printing System (CUPS).
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>Raster API</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>Using CGI Programs</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">Using CGI Programs</H1>
+
<P>CUPS provides a dynamic web interface through dedicated CGI programs that
are executed when users open special directories on the CUPS server. Each CGI
performs administration, class, help, job, and printer functions as directed by
<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>Glossary</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">Glossary</H1>
+
<H2><A NAME="A">A</A></H2>
<DL>
<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>Using Kerberos Authentication</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">Using Kerberos Authentication</H1>
+
<P>CUPS allows you to use a Key Distribution Center (KDC) for authentication
on your local CUPS server and when printing to a remote authenticated queue.
This document describes how to configure CUPS to use Kerberos authentication
<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>Software License Agreement</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">Software License Agreement</H1>
+
<P ALIGN="CENTER">Copyright 2007-2009 by Apple Inc.<BR>
1 Infinite Loop<BR>
Cupertino, CA 95014 USA<BR>
<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>Using Network Printers</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">Using Network Printers</H1>
+
<P>This help document describes how to discover, configure, and use TCP/IP network printers with CUPS.</P>
<H2 CLASS="title"><A NAME="ADDRESS">Getting the IP Address</A></H2>
<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>Command-Line Printing and Options</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">Command-Line Printing and Options</H1>
+
<P>CUPS provides both the System V (<A
HREF="man-lp.html">lp(1)</A>) and Berkeley (<A
HREF="man-lpr.html">lpr(1)</A>) printing commands for printing
<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>Overview of CUPS</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">Overview of CUPS</H1>
+
<P>CUPS is the software you use to print from applications like the web browser
you are using to read this page. It converts the <em>page descriptions</em>
produced by your application (put a paragraph here, draw a line there, and so
<H2 CLASS="title"><A NAME="BEGIN">Where Do I Begin?</A></H2>
-<P>Click on the <A HREF="/admin">Administration</A> tab at the top of this page.
-Click on the <VAR>Add Printer</VAR> button and follow the prompts.</P>
+<P>Click on the <A HREF="http://localhost:631/admin">Administration</A> tab at
+the top of this page. Click on the <VAR>Add Printer</VAR> button and follow the
+prompts.</P>
<BLOCKQUOTE>When you are asked for a username and password, enter your login
username and password or the "root" username and password. On MacOS X, the login
options (paper size, output mode, etc.) for the printer. Make any changes as
needed and then click on the <VAR>Set Default Options</VAR> button to save
them. Some printers also support auto-configuration - click on the <VAR>Query
-Printer for Default Options</VAR> button to update the options automaticaly.</P>
+Printer for Default Options</VAR> button to update the options automatically.</P>
<P>Once you have added the printer, you can print to it from any application.
You can also choose <VAR>Print Test Page</VAR> from the maintenance menu to print
<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>Managing Operation Policies</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">Managing Operation Policies</H1>
+
<P>Operation policies are the rules used for each IPP operation
in CUPS. These rules include things like "user must provide a
password", "user must be in the system group", "allow only from
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
</head>
<body>
<div class='body'>
-<p>This document describes how to develop printer drivers for PostScript printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#IMPORT'>importing existing PPD files</a>, <a href='#FILTERS'>using custom filters</a>, <a href='#COLOR'>implementing color management</a>, <a href='#MACOSX'>adding Mac OS X features</a>, and <a href='#DEPLOY'>deploying your driver</a>.</p>
+<h1 class='title'>Developing PostScript Printer Drivers</h1>
+
+<p>This document describes how to develop printer drivers for PostScript printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#IMPORT'>importing existing PPD files</a>, <a href='#FILTERS'>using custom filters</a>, <a href='#COLOR'>implementing color management</a>, and <a href='#MACOSX'>adding Mac OS X features</a>.</p>
<div class='summary'><table summary='General Information'>
<tbody>
<li><a href="#FILTERS">Using Custom Filters</a></li>
<li><a href="#COLOR">Implementing Color Management</a></li>
<li><a href="#MACOSX">Adding Mac OS X Features</a></li>
-<li><a href="#DEPLOY">Deploying Your Driver</a></li>
<h2 class='title'><a name='BASICS'>Printer Driver Basics</a></h2>
<p>A CUPS PostScript printer driver consists of a PostScript Printer Description (PPD) file that describes the features and capabilities of the device, zero or more <em>filter</em> programs that prepare print data for the device, and zero or more support files for color management, online help, and so forth. The PPD file includes references to all of the filters and support files used by the driver.</p>
<h2 class='title'><a name='COLOR'>Implementing Color Management</a></h2>
-<p>Talk about ICC color profiles and sRGB as two best options.</p>
+<p>CUPS uses ICC color profiles to provide more accurate color reproduction. The <a href='spec-ppd.html#cupsICCProfile'><tt>cupsICCProfile</tt></a> attribute defines the color profiles that are available for a given printer, for example:</p>
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "ColorModel.MediaType.Resolution/Description" /path/to/ICC/profile
+</pre>
-<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
+<p>where "ColorModel.MediaType.Resolution" defines a selector based on the corresponding option selections. A simple driver might only define profiles for the color models that are supported, for example a printer supporting Gray and RGB might use:</p>
+
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "Gray../Grayscale Profile" /path/to/ICC/gray-profile
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "RGB../Full Color Profile" /path/to/ICC/rgb-profile
+</pre>
-<p>Talk about help books, icons, and PDEs.</p>
+<p>The options used for profile selection can be customized using the <tt>cupsICCQualifier2</tt> and <tt>cupsICCQualifier3</tt> attributes.</p>
-<h2 class='title'><a name='DEPLOY'>Deploying Your Driver</a></h2>
+<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
+
+<p>Mac OS X printer drivers can provide <a href='spec-ppd.html#MACOSX'>additional attributes</a> to specify additional option panes in the print dialog, an image of the printer, a help book, and option presets for the driver software:</p>
-<p>Talk about install locations, etc.</p>
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APDialogExtension "" /Library/Printers/Vendor/filename.plugin
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APHelpBook "" /Library/Printers/Vendor/filename.bundle
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterIconPath "" /Library/Printers/Vendor/filename.icns
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterPreset "name/text" "*option choice ..."
+</pre>
</div>
</body>
</html>
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
</head>
<body>
<div class='body'>
+<h1 class='title'>Introduction to the PPD Compiler</h1>
+
<P>This document describes how to use the CUPS PostScript Printer Description
(PPD) file compiler. The PPD compiler generates PPD files from simple text files
that describe the features and capabilities of one or more printers.</P>
background: #eeeeee;
border: dotted thin #999999;
margin-left: 36pt;
- padding: 10px;
+ padding: 10pt;
}
PRE.command EM, PRE.example EM {
}
BLOCKQUOTE {
- background: #cccccc;
+ background: #eeeeee;
border: solid thin #999999;
padding: 10pt;
}
font-size: 100%;
}
+H1.title {
+}
+
H2.title, H3.title {
border-bottom: solid 2pt #000000;
}
</head>
<body>
<div class='body'>
-<p>This document describes how to develop printer drivers for raster printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#FILTERS'>using filters</a>, <a href='#COLOR'>implementing color management</a>, <a href='#MACOSX'>adding Mac OS X features</a>, and <a href='#DEPLOY'>deploying your driver</a>.</p>
+<h1 class='title'>Developing Raster Printer Drivers</h1>
+
+<p>This document describes how to develop printer drivers for raster printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#FILTERS'>using filters</a>, <a href='#COLOR'>implementing color management</a>, and <a href='#MACOSX'>adding Mac OS X features</a>.</p>
<div class='summary'><table summary='General Information'>
<tbody>
<li><a href="#FILTERS">Using Filters</a></li>
<li><a href="#COLOR">Implementing Color Management</a></li>
<li><a href="#MACOSX">Adding Mac OS X Features</a></li>
-<li><a href="#DEPLOY">Deploying Your Driver</a></li>
<h2 class='title'><a name='BASICS'>Printer Driver Basics</a></h2>
<p>A CUPS raster printer driver consists of a PostScript Printer Description (PPD) file that describes the features and capabilities of the device, one or more <em>filter</em> programs that prepare print data for the device, and zero or more support files for color management, online help, and so forth. The PPD file includes references to all of the filters and support files used by the driver.</p>
<h2 class='title'><a name='COLOR'>Implementing Color Management</a></h2>
-<p>Talk about ICC color profiles and sRGB as two best options.</p>
+<p>CUPS uses ICC color profiles to provide more accurate color reproduction. The <a href='spec-ppd.html#cupsICCProfile'><tt>cupsICCProfile</tt></a> attribute defines the color profiles that are available for a given printer, for example:</p>
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "ColorModel.MediaType.Resolution/Description" /path/to/ICC/profile
+</pre>
-<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
+<p>where "ColorModel.MediaType.Resolution" defines a selector based on the corresponding option selections. A simple driver might only define profiles for the color models that are supported, for example a printer supporting Gray and RGB might use:</p>
+
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "Gray../Grayscale Profile" /path/to/ICC/gray-profile
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "RGB../Full Color Profile" /path/to/ICC/rgb-profile
+</pre>
+
+<p>The options used for profile selection can be customized using the <tt>cupsICCQualifier2</tt> and <tt>cupsICCQualifier3</tt> attributes.</p>
-<p>Talk about help books, icons, and PDEs.</p>
+<h3><span class='info'>Since Mac OS X 10.5</span>Custom Color Matching Support</h3>
+<p>Mac OS X printer drivers that are based on an existing standard RGB colorspace can tell the system to use the corresponding colorspace instead of an arbitrary ICC color profile when doing color management. The <a href='#APCustom'><tt>APSupportsCustomColorMatching</tt></a> and <tt>APDefaultCustomColorMatchingProfile</tt> attributes can be used to enable this mode:</p>
+
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APSupportsCustomColorMatching "" true
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APDefaultCustomColorMatchingProfile "" sRGB
+</pre>
-<h2 class='title'><a name='DEPLOY'>Deploying Your Driver</a></h2>
-<p>Talk about install locations, etc.</p>
+<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
+
+<p>Mac OS X printer drivers can provide <a href='spec-ppd.html#MACOSX'>additional attributes</a> to specify additional option panes in the print dialog, an image of the printer, a help book, and option presets for the driver software:</p>
+
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APDialogExtension "" /Library/Printers/Vendor/filename.plugin
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APHelpBook "" /Library/Printers/Vendor/filename.bundle
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterIconPath "" /Library/Printers/Vendor/filename.icns
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterPreset "name/text" "*option choice ..."
+</pre>
</div>
</body>
</html>
<!-- SECTION: References -->
<HEAD>
<TITLE>access_log</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">access_log</H1>
+
<P>The <VAR>access_log</VAR> file lists each HTTP resource that
is accessed by a web browser or client. Each line is in an
extended version of the so-called "Common Log Format" used by
<!-- SECTION: References -->
<HEAD>
<TITLE>classes.conf</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">classes.conf</H1>
+
<P>The CUPS scheduler (cupsd) uses the
<VAR>/etc/cups/classes.conf</VAR> file to store the list of
available classes. This file contains only locally defined
<!-- SECTION: References -->
<HEAD>
<TITLE>client.conf</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">client.conf</H1>
+
<P>The <VAR>/etc/cups/client.conf</VAR> and
<VAR>~/.cups/client.conf</VAR> files contain up to two directives
that determine how the client behaves. Each directive is listed
<!-- SECTION: References -->
<HEAD>
<TITLE>cupsd.conf</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">cupsd.conf</H1>
<P>The <VAR>/etc/cups/cupsd.conf</VAR> file contains
configuration <I>directives</I> that control how the server
</TABLE></DIV>
+<H2 CLASS="title"><A NAME="LogDebugHistory">LogDebugHistory</A></H2>
+
+<H3>Examples</H3>
+
+<PRE CLASS="command">
+LogDebugHistory 0
+LogDebugHistory 200
+</PRE>
+
+<H3>Description</H3>
+
+<P>When <A HREF="#LogLevel"><CODE>LogLevel</CODE></A> is not set to
+<CODE>debug</CODE> or <CODE>debug2</CODE>, the <CODE>LogDebugHistory</CODE>
+directive specifies the number of debugging messages that are logged when an
+error occurs during printing. The default is 200 messages. A value of 0
+disables debugging history entirely and is not recommended.</P>
+
+
<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.1.15</SPAN><A NAME="LogFilePerm">LogFilePerm</A></H2>
<H3>Examples</H3>
HREF="#ServerName"><CODE>ServerName</CODE></A>.</P>
+<H2 CLASS="title"><SPAN CLASS="info">CUPS 1.3.10</SPAN><A NAME="ServerAlias">ServerAlias</A></H2>
+
+<H3>Examples</H3>
+
+<PRE CLASS="command">
+ServerAlias althost
+ServerAlias althost.foo.com
+ServerAlias althost.bar.com
+ServerAlias *
+</PRE>
+
+<H3>Description</H3>
+
+<P>The <CODE>ServerAlias</CODE> directive specifies alternate names that the
+server is known by. By default it contains a list of all aliases associated
+with the <A HREF="#ServerName"><CODE>ServerName</CODE></A>. The special name
+"*" can be used to allow any hostname when accessing CUPS via an external
+network interfaces.</P>
+
+<BLOCKQUOTE><B>Note</B>
+
+<P>The <CODE>ServerAlias</CODE> directive is used for HTTP Host header
+validation when clients connect to the scheduler from external interfaces.
+Using the special name "*" can expose your system to known browser-based
+DNS rebinding attacks, even when accessing sites through a firewall. If the
+auto-discovery of alternate names does not work, we recommend listing each
+alternate name with a ServerAlias directive instead of using "*".</P>
+
+</BLOCKQUOTE>
+
+
<H2 CLASS="title"><A NAME="ServerBin">ServerBin</A></H2>
<H3>Examples</H3>
<!-- SECTION: References -->
<HEAD>
<TITLE>error_log</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">error_log</H1>
+
<P>The <VAR>error_log</VAR> file lists messages from the
scheduler - errors, warnings, etc. The <A
HREF="ref-cupsd-conf.html#LogLevel"><CODE>LogLevel</CODE></A>
<!-- SECTION: References -->
<HEAD>
<TITLE>mailto.conf</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">mailto.conf</H1>
+
<P>The <VAR>/etc/cups/mailto.conf</VAR> file contains several
directives that defines the local mail server and email
notification preferences for CUPS. Each directive is listed on a
<!-- SECTION: References -->
<HEAD>
<TITLE>page_log</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">page_log</H1>
+
<P>The <VAR>page_log</VAR> file lists each page that is sent to a
printer. By default, each line contains the following information:</P>
<!-- SECTION: References -->
<HEAD>
<TITLE>PPD Compiler Driver Information File Reference</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">PPD Compiler Driver Information File Reference</H1>
+
<p>The CUPS PPD compiler reads meta files that contain descriptions
of one or more PPD files to be generated by
<a href="man-ppdc.html">ppdc(1)</a> or the corresponding driver interface
<!-- SECTION: References -->
<HEAD>
<TITLE>printers.conf</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">printers.conf</H1>
+
<P>The CUPS scheduler (cupsd) uses the
<VAR>/etc/cups/printers.conf</VAR> file to store the list of
available printers. This file contains only locally defined
<!-- SECTION: References -->
<HEAD>
<TITLE>snmp.conf</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">snmp.conf</H1>
+
<P>The <VAR>/etc/cups/snmp.conf</VAR> file contains several
directives that determine how the SNMP printer discovery backend
behaves. Each directive is listed on a line by itself followed
<!-- SECTION: References -->
<HEAD>
<TITLE>subscriptions.conf</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">subscriptions.conf</H1>
+
<P>The CUPS scheduler (cupsd) uses the
<VAR>/etc/cups/subscriptions.conf</VAR> file to store the list
of active subscriptions. Each directive is listed on a line by
<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>Server Security</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">Server Security</H1>
+
<P>In the default "standalone" configuration, there are few
potential security risks - the CUPS server does not accept remote
connections, and only accepts shared printer information from the
<P>When you enable remote administration, the server will use
Basic authentication for adminstration tasks. The current CUPS
-server supports Basic, Digest, and local certificate
+server supports Basic, Digest, Kerberos, and local certificate
authentication:</P>
<OL>
<!-- SECTION: Getting Started -->
<head>
<title>Printer Sharing</title>
-</head>
-<body>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
+</HEAD>
+<BODY>
+
+<H1 CLASS="title">Printer Sharing</H1>
<p>This document discusses several ways to configure printer sharing.</p>
<head>
<title>CUPS Banner File Format</title>
<meta name='keywords' content='job-sheets'>
- <link rel='stylesheet' type='text/css' href='../cups.css'>
+ <link rel='stylesheet' type='text/css' href='../cups-printable.css'>
</head>
<body>
<!--
Banner file format specification for the Common UNIX Printing System (CUPS).
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<H1 CLASS="title">CUPS Banner File Format</H1>
+
<h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
<p>This specification describes the CUPS banner file format
<head>
<title>CUPS Browse Protocol</title>
<meta name='keywords' content='Programming'>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</head>
<body>
<!--
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<H1 CLASS="title">CUPS Browse Protocol</H1>
+
<h2><a name='INTRO'>Introduction</a></h2>
<p>This specification describes the CUPS browsing protocol which is used for
<!-- SECTION: Specifications -->
<HEAD>
<TITLE>CUPS Developer Guide</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
-<P>This developer guide documents the guidelines and processes we
-use when developing and maintaining the Common UNIX Printing
-System ("CUPS") and related software. Our goal is to provide
-reliable and efficient software and documentation that addresses
-the needs of our users.</P>
+<H1 CLASS="title">CUPS Developer Guide</H1>
+
+<P>This developer guide documents the guidelines and processes we use when developing and maintaining CUPS and related software. Our goal is to provide reliable and efficient software and documentation that addresses the needs of our users.</P>
<H2 CLASS="title"><A NAME="COMMUNICATION">Communication</A></H2>
<head>
<title>CUPS Command File Format</title>
<meta name='keywords' content='Programming, CUPS Command File Format'>
- <link rel='stylesheet' type='text/css' href='../cups.css'>
+ <link rel='stylesheet' type='text/css' href='../cups-printable.css'>
</head>
<body>
<!--
CUPS command file format specification for the Common UNIX Printing
System (CUPS).
- Copyright 2007-2008 by Apple Inc.
+ Copyright 2007-2009 by Apple Inc.
Copyright 1997-2006 by Easy Software Products.
These coded instructions, statements, and computer programs are the
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<H1 CLASS="title">CUPS Command File Format</H1>
+
<h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
<p>This specification describes the CUPS command file format
<!-- SECTION: Specifications -->
<HEAD>
<TITLE>CUPS Design Description</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
-<P><EM>This document is still being updated for CUPS 1.4...</EM></P>
+<H1 CLASS="title">CUPS Design Description</H1>
-<P>This design description documents the overall organization of CUPS. The
-purpose is not to provide a line-by-line description of the CUPS source code,
-but rather to describe the overall architecture and location of key pieces so
-that developers can more easily understand the underlying operation of CUPS.</P>
+<P>This design description documents the overall organization of CUPS. The purpose is not to provide a line-by-line description of the CUPS source code, but rather to describe the overall architecture and location of key pieces so that developers can more easily understand the underlying operation of CUPS.</P>
<H2 CLASS="title"><A NAME="INTRO">Introduction</A></H2>
-<P>Like most printing systems, CUPS is designed around a central
-print scheduling process that dispatches print jobs, processes
-administrative commands, provides printer status information to
-local and remote programs, and informs users as needed. <A
-HREF="#FIGURE1">Figure 1</A> shows the basic organization of
-CUPS.</P>
+<P>Like most printing systems, CUPS is designed around a central print scheduling process that dispatches print jobs, processes administrative commands, provides printer status information to local and remote programs, and informs users as needed. <A HREF="#FIGURE1">Figure 1</A> shows the basic organization of CUPS.</P>
<H3>Scheduler</H3>
-<P>The scheduler is a HTTP/1.1 and IPP/1.1 server application
-manages HTTP and IPP requests, printers, classes, jobs,
-subscriptions, and notifications on the system. HTTP is used for
-normal web browser services as well as IPP operation messages
-passed via HTTP POST requests with the
-<CODE>application/ipp</CODE> content type. The scheduler uses a
-series of helper Common Gateway Interface ("CGI") applications to
-provide dynamic web interfaces, and can be configured to run
-additional, site-specific programs or scripts for the web
-interface.</P>
-
-<P>The scheduler is designed as a traditional monolithic,
-single-threaded server process which runs external processes to
-do longer-term operations such as printing, notification,
-device/driver enumeration, and remote printer monitoring. While
-this design does limit the maximum number of simultaneous clients
-that can be supported on a typical system, it also keep resource
-utilization to a minimum and greatly simplifies the scheduler's
-logic.</P>
+<P>The scheduler is a HTTP/1.1 and IPP/2.1 server application that manages HTTP and IPP requests, printers, classes, jobs, subscriptions, and notifications on the system. HTTP is used for normal web browser services as well as IPP operation messages passed via HTTP POST requests with the <CODE>application/ipp</CODE> content type. The scheduler uses a series of helper applications based on the Common Gateway Interface ("CGI") to provide dynamic web interfaces and can be configured to run additional site-specific programs or scripts for the web interface.</P>
+
+<P>The scheduler is designed as a traditional single-threaded server process which runs external processes to do longer-term operations such as printing, notification, device/driver enumeration, and remote printer monitoring. External processes are normally run as a non-privileged account ("lp") and, on some platforms, with additional restrictions that limit what the processes are allowed to do.</P>
+
+<P>The maximum number of simultaneous clients and print jobs that can be supported is primarily limited by the available server memory, file descriptors, and CPU - the scheduler itself imposes no hard limits.</P>
<DIV CLASS="figure"><TABLE SUMMARY="CUPS Block Diagram">
<CAPTION>Figure 1: <A NAME="FIGURE1">CUPS Block Diagram</A></CAPTION>
<TR><TD ALIGN="CENTER"><IMG SRC="../images/cups-block-diagram.gif"
-WIDTH="768" HEIGHT="768" ALT="CUPS Block Diagram"/></TD></TR>
+WIDTH="768" HEIGHT="768" ALT="CUPS Block Diagram"></TD></TR>
</TABLE></DIV>
+<H4>Config Files</H4>
+
+<P>The scheduler uses several configuration files to store the server settings (<A HREF="ref-cupsd-conf.html">cupsd.conf</A>), available classes (<A HREF="ref-classes-conf.html">classes.conf</A>), available printers (<A HREF="ref-printers-conf.html">printers.conf</A>), current notification subscriptions (<A HREF="ref-subscriptions-conf.html">subscriptions.conf</A>), and supported file types and filters (<A HREF="man-mime.types.html">mime.types</A>, <A HREF="man-mime.convs.html">mime.convs</A>). In addition, PostScript Printer Description ("PPD") files or interface scripts are associated with each printer, and the scheduler has cache files for remote printers, PPD files, and current jobs to optimize the scheduler's startup speed and availability.</P>
+
<H4>Job Files</H4>
-<P>The scheduler stores job files in a <EM>spool directory</EM>,
-typically <VAR>/var/spool/cups</VAR>. Two types of files will be
-found in the spool directory: <EM>control files</EM> starting
-with the letter "c" ("c00001", "c99999", "c100000", etc.) and
-<EM>data files</EM> starting with the letter "d" ("d00001-001",
-"d99999-001", "d100000-001", etc.) Control files are IPP messages
-based on the original IPP Print-Job or Create-Job messages, while
-data files are the original print files that were submitted for
-printing. There is one control file for every job known to the
-system and 0 or more data files for each job. Data files are
-normally removed after a job has successfully printed, however
-this behavior can be configured.</P>
+<P>The scheduler stores job files in a <EM>spool directory</EM>, typically <VAR>/var/spool/cups</VAR>. Two types of files will be found in the spool directory: <EM>control files</EM> starting with the letter "c" ("c00001", "c99999", "c100000", etc.) and <EM>data files</EM> starting with the letter "d" ("d00001-001", "d99999-001", "d100000-001", etc.) Control files are IPP messages based on the original IPP Print-Job or Create-Job messages, while data files are the original print files that were submitted for printing. There is one control file for every job known to the system and 0 or more data files for each job.
-<H4>Log Files</H4>
+<p>Control files are normally cleaned out after the 500th job is submitted, while data files are removed immediately after a job has successfully printed. Both behaviors can be configured.</P>
-<P>The scheduler keeps three kinds of log files which are
-normally stored in the <VAR>/var/log/cups</VAR> directory. The <A
-HREF="ref-access_log.html">access_log</A> file lists every HTTP
-and IPP request that is processed by the scheduler. The <A
-HREF="ref-error_log.html">error_log</A> file contains messages
-from the scheduler and its helper applications that can be used
-to track down problems. The <A
-HREF="ref-page_log.html">page_log</A> file lists every page that
-is printed, allowing for simple print accounting.</P>
-
-<P>Log files are rotated automatically by the scheduler when they
-reach the configured size limit, by default 1MB. If the limit is
-set to 0 then no rotation is performed in the scheduler - this
-mode is often used by Linux distributions so they can use the
-<B>logrotated(8)</B> program to rotate them instead.</P>
+<H4>Log Files</H4>
-<H4>Config Files</H4>
+<P>The scheduler keeps three kinds of log files which are normally stored in the <VAR>/var/log/cups</VAR> directory. The <A HREF="ref-access_log.html">access_log</A> file lists every HTTP and IPP request that is processed by the scheduler. The <A HREF="ref-error_log.html">error_log</A> file contains messages from the scheduler and its helper applications that can be used
+to track down problems. The <A HREF="ref-page_log.html">page_log</A> file lists every page that is printed, allowing for simple print accounting.</P>
-<P>The scheduler uses several configuration files to store the
-server settings (<A HREF="ref-cupsd-conf.html">cupsd.conf</A>),
-available classes (<A
-HREF="ref-classes-conf.html">classes.conf</A>), available
-printers (<A HREF="ref-printers-conf.html">printers.conf</A>),
-current notification subscriptions (<A
-HREF="ref-subscriptions-conf.html">subscriptions.conf</A>), and
-supported file types and filters (<A
-HREF="man-mime.types.html">mime.types</A>, <A
-HREF="man-mime.convs.html">mime.convs</A>). In addition,
-PostScript Printer Description ("PPD") files or interface scripts
-are associated with each printer, and the scheduler has cache
-files for remote printers, PPD files, and current jobs to
-optimize the scheduler's startup speed and availability.</P>
+<P>Log files are rotated automatically by the scheduler when they reach the configured size limit, by default 1MB. If the limit is set to 0 then no rotation is performed in the scheduler - this mode is often used by Linux distributions so they can use the <B>logrotated(8)</B> program to rotate them instead.</P>
<H3>Berkeley Commands</H3>
-<P>CUPS provides the Berkeley <A HREF="man-lpc.html">lpc(8)</A>,
-<A HREF="man-lpq.html">lpq(1)</A>, <A
-HREF="man-lpr.html">lpr(1)</A>, and <A
-HREF="man-lprm.html">lprm(1)</A> commands. In general, they
-function identically to the original Berkeley commands with the
-following exceptions:</P>
+<P>CUPS provides the Berkeley <A HREF="man-lpc.html">lpc(8)</A>, <A HREF="man-lpq.html">lpq(1)</A>, <A HREF="man-lpr.html">lpr(1)</A>, and <A HREF="man-lprm.html">lprm(1)</A> commands. In general, they function identically to the original Berkeley commands with the following exceptions:</P>
<OL>
- <LI>The <B>lpc</B> command currently only supports the
- "status" sub-command.</LI>
+ <LI>The <B>lpc</B> command currently only supports the "status" sub-command.</LI>
- <LI>The <B>lpr</B> command does not support the format
- modifier options "1" (TROFF font set 1), "2" (TROFF font
- set 2), "3" (TROFF font set 3), "4" (TROFF font set 4),
- "c" (CIFPLOT), "d" (DVI), "f" (FORTRAN), "g" (GNU plot),
- "i" (indentation), "n" (Ditroff), "r" (Sun raster), "t"
- (Troff), or "w" (width), as they do not map to the IPP
- MIME media type based document formats.</LI>
+ <LI>The <B>lpr</B> command does not support the format modifier options "1" (TROFF font set 1), "2" (TROFF font set 2), "3" (TROFF font set 3), "4" (TROFF font set 4), "c" (CIFPLOT), "d" (DVI), "f" (FORTRAN), "g" (GNU plot), "i" (indentation), "n" (Ditroff), "r" (Sun raster), "t" (Troff), or "w" (width), as they do not map to the IPP MIME media type based document formats.</LI>
</OL>
<H3>System V Commands</H3>
-<P>CUPS provides the System V <A
-HREF="man-accept.html">accept(8)</A>, <A
-HREF="man-cancel.html">cancel(1)</A>, <A
-HREF="man-lp.html">lp(1)</A>, <A
-HREF="man-lpadmin.html">lpadmin(8)</A>, <A
-HREF="man-lpmove.html">lpmove(8)</A>, <A
-HREF="man-lpstat.html">lpstat(1)</A>, and <A
-HREF="man-accept.html">reject(8)</A> commands. In general, they
-function identically to the original System V commands with the
-following exceptions:</P>
+<P>CUPS provides the System V <A HREF="man-cancel.html">cancel(1)</A>, <A HREF="man-lp.html">lp(1)</A>, <A HREF="man-lpadmin.html">lpadmin(8)</A>, <A HREF="man-lpmove.html">lpmove(8)</A>, and <A HREF="man-lpstat.html">lpstat(1)</A> commands. In general, they function identically to the original System V commands with the following exceptions:</P>
<OL>
- <LI>All commands may ask for a password; the System V
- print spooler requires root access to perform
- administration tasks, while CUPS allows for more flexible
- configurations.</LI>
+ <LI>All commands may ask for a password; the System V print spooler requires root access to perform administration tasks, while CUPS allows for more flexible configurations.</LI>
- <LI>The <B>lpadmin</B> command does not implement the
- Solaris "-A" (alert), "-F" (fault recovery), "-M" (mount
- form/wheel), "-P" (paper list), "-S" (print wheels), "-T"
- (type list), "-U" (dialer info), "-W" (wait), "-f" (form
- name), "-l" (content-type list), "-s" (remote printer),
- or "-t" (number of trays) options.</LI>
+ <LI>The <B>lpadmin</B> command does not implement the Solaris "-A" (alert), "-F" (fault recovery), "-M" (mount form/wheel), "-P" (paper list), "-S" (print wheels), "-T" (type list), "-U" (dialer info), "-W" (wait), "-f" (form name), "-l" (content-type list), "-s" (remote printer), or "-t" (number of trays) options.</LI>
</OL>
<H3>CUPS Commands</H3>
-<P>CUPS provides the <A
-HREF="man-cupsaddsmb.html">cupsaddsmb(8)</A>, <A
-HREF="man-cupsenable.html">cupsdisable(8)</A>, <A
-HREF="man-cupsenable.html">cupsenable(8)</A>, <A
-HREF="man-cupstestppd.html">cupstestppd(1)</A>, <A
-HREF="man-lpinfo.html">lpinfo(8)</A>, and <A
-HREF="man-lppasswd.html">lppasswd(1)</A> commands. The
-<B>cupsdisable</B> and <B>cupsenable</B> commands correspond to
-the System V <B>disable</B> and <B>enable</B> commands but have
-been renamed to avoid conflicts with the <B>bash(1)</B> internal
-commands of the same name.</P>
+<P>CUPS provides the <A HREF="man-cupsaccept.html">cupsaccept(8)</A>, <A HREF="man-cupsaddsmb.html">cupsaddsmb(8)</A>, <A HREF="man-cupsenable.html">cupsdisable(8)</A>, <A HREF="man-cupsenable.html">cupsenable(8)</A>, <A HREF="man-cupsaccept.html">cupsreject(8)</A>, <A HREF="man-cupstestppd.html">cupstestppd(1)</A>, <A HREF="man-lpinfo.html">lpinfo(8)</A>, and <A HREF="man-lppasswd.html">lppasswd(1)</A> commands. The <B>cupsaccept</B>, <B>cupsdisable</B>, <B>cupsenable</B>, and <B>cupsreject</B> commands correspond to the System V <B>accept</B>, <B>disable</B>, <B>enable</B>, and <B>reject</B> commands but have been renamed to avoid confusion and conflicts with the <B>bash(1)</B> internal <B>enable</B> command of the same name.</P>
<H3>LPD Support</H3>
-<P>LPD client support is provided via the <A
-HREF="man-cups-lpd.html">cups-lpd(8)</A> program. Incoming LPD
-requests are accepted on TCP port 515 by the local
-<B>inetd(8)</B>, <B>launchd(8)</B>, or <B>xinetd(8)</B> process
-and forwarded to the <B>cups-lpd</B> program for conversion to
-the corresponding IPP request(s).</P>
-
-<P>The <B>cups-lpd</B> program conforms, for the most part, to
-RFC 1179: Line Printer Daemon Protocol, but does not enforce the
-privileged source port restriction specified in that document. In
-addition, the banner page and output format options are usually
-overridden via command-line options to the <B>cups-lpd</B>
-program when it is invoked by the corresponding super-daemon
-program.</P>
+<P>LPD client support is provided via the <A HREF="man-cups-lpd.html">cups-lpd(8)</A> program. Incoming LPD requests are accepted on TCP port 515 by the local <B>inetd(8)</B>, <B>launchd(8)</B>, or <B>xinetd(8)</B> process and forwarded to the <B>cups-lpd</B> program for conversion to the corresponding IPP request(s).</P>
+
+<P>The <B>cups-lpd</B> program conforms, for the most part, to RFC 1179: Line Printer Daemon Protocol, but does not enforce the privileged source port restriction specified in that document. In addition, the banner page and output format options are usually overridden via command-line options to the <B>cups-lpd</B> program when it is invoked by the corresponding super-daemon program.</P>
<H3>Web Interface</H3>
-<P>The web interface is supported by five CGI programs. Table 1
-describes the purpose of each of the programs.</P>
+<P>The web interface is supported by five CGI programs. <A HREF="#TABLE1">Table 1</A> describes the purpose of each of the programs.</P>
<DIV CLASS="table"><TABLE SUMMARY="CGI Programs">
<CAPTION>Table 1: <A NAME="TABLE1">CGI Programs</A></CAPTION>
<TR>
<TD>help.cgi</TD>
<TD>/help</TD>
- <TD>Provides access to on-line help documents</TD>
+ <TD>Provides access to online help documents</TD>
</TR>
<TR>
<TD>jobs.cgi</TD>
<H3>Notifiers</H3>
-<P>Notifiers provide the means for sending event notifications
-from the scheduler. Notifiers are executed with the recipient
-information on the command-line and the event data on the
-standard input.</P>
+<P>Notifiers (<A HREF="man-notifier.html">notifier(7)</A>) provide the means for sending asynchronous event notifications from the scheduler. Notifiers are executed with the recipient information on the command-line and the event data on the standard input. For example:</P>
+
+<PRE CLASS="command">
+CUPS_SERVERBIN/notifier/foo recipient user-data
+</PRE>
-<P>The <B>mailto</B> notifier is the only notifier included with
-CUPS 1.2 and handles email notifications for the scheduler.
-Additional notifiers can be added as needed without additional
-configuration.</P>
+<P>CUPS includes two notifiers: <B>mailto</B> to provide SMTP-based email notifications and <B>rss</B> to provide Really Simple Syndication ("RSS") notifications from the scheduler. Additional notifiers can be installed in the <VAR>notifier</VAR> directory as needed to support other methods.</P>
<H3>Filters</H3>
-<P>Filters convert job files into a printable format. Multiple
-filters are run, as needed, to convert from the job file format
-to the printable format. A filter program reads from the standard
-input or from a file if a filename is supplied. All filters must
-support a common set of options including printer name, job ID,
-username, job title, number of copies, and job options. All
-output is sent to the standard output.</P>
+<P>Filters (<A HREF="man-filter.html">filter(7)</A>) convert job files into a printable format. Multiple filters are run, as needed, to convert from the job file format to the printable format. A filter program reads from the standard input or from a file if a filename is supplied. All filters must support a common set of options including printer name, job ID, username, job title, number of copies, and job options. All output is sent to the standard output.</P>
-<P>CUPS provides filters for printing text, PostScript, PDF,
-HP-GL/2, and many types of image files. CUPS also provides
-printer driver filters for HP-PCL, ESC/P, and several types of
-label printers. Additional filters can be added through the use
-of mime.convs and PPD files.</P>
+<P>CUPS provides filters for printing text, PostScript, PDF, HP-GL/2, and many types of image files. CUPS also provides printer driver filters for HP-PCL, ESC/P, and several types of label printers. Additional filters can be registered with CUPS via mime.convs and PPD files.</P>
<H3>Port Monitors</H3>
-<P>Port monitors handle the device- and channel-specific data
-formatting for a printer. Port monitors use the same interface as
-filters.</P>
+<P>Port monitors handle the device- and channel-specific data formatting for a printer. Port monitors use the same interface as filters.</P>
-<P>CUPS includes two port monitors: the <B>bcp</B> port monitor
-which supports the PostScript Binary Communications Protocol
-("BCP") and the <b>tbcp</b> port monitor which supports the
-PostScript Tagged Binary Communications Protocol ("TBCP").
-Additional port monitors can be added through PPD files.</P>
+<P>CUPS includes two port monitors: the <B>bcp</B> port monitor which supports the PostScript Binary Communications Protocol ("BCP") and the <b>tbcp</b> port monitor which supports the PostScript Tagged Binary Communications Protocol ("TBCP"). Additional port monitors can be registered in PPD files.</P>
<H3>Backends</H3>
-<P>Backends send print data to the printer and enumerate
-available printers/devices as needed. Backends use the same
-interface as filters.</P>
+<P>Backends (<A HREF="man-backend.html">backend(7)</A>) send print data to the printer and enumerate available printers/devices as needed. Backends use the same interface as filters.</P>
-<P>CUPS includes backends for parallel, serial, SCSI, USB, LPD,
-IPP, and AppSocket (JetDirect) connections. Additional backends
-can be added as needed without additional configuration.</P>
-
-<H2 CLASS="title"><A NAME="PROGRAMMING">Programming Interfaces</A></H2>
+<P>CUPS includes backends for AppSocket (JetDirect), IPP, LPD, parallel, SCSI, serial, and USB connections. Additional backends can be added as needed without additional configuration.</P>
-<P>CUPS makes use of two general-purpose libraries to provide its
-printing services. The CUPS library provides the general
-communications and management infrastructure while the CUPS
-imaging library provides the image file and raster data
-support.</P>
-
-<H3>CUPS Libary</H3>
-
-<P>The CUPS library contains CUPS-specific convenience functions
-for queuing print jobs, getting printer information, accessing
-resources via HTTP and IPP, and manipulating PPD files. Unlike
-the rest of CUPS, the CUPS API is provided under the terms of the
-GNU LGPL so it may be used by non-GPL applications.</P>
-
-<H3>CUPS Imaging Library</H3>
-
-<P>The CUPS imaging library provides functions for managing large
-images, doing colorspace conversion and color management, scaling
-images for printing, and managing raster page streams. It is used
-by the CUPS image file filters, the PostScript RIP, and all
-raster printers drivers.</P>
-
-<!--<H2 CLASS="title">Network Printing</H2>
-
-<P>Traditionally, network printing has been one of the hardest
-things to get working under UNIX. One reason is because each
-vendor added their own extensions to the LPD protocol (the
-previous standard for network printing), making cross-platform
-printing difficult if not impossible.</P>
-
-<P>Another reason is that you have to administer every network
-printer on every client machine. In some cases you can "clone'
-the printer configuration from a "master' client to each of the
-others, but even that can be time-consuming and error-prone.
-Something better is needed.</P>
-
-<P>CUPS provides "printer browsing", which allows clients to
-automatically see and use printers from any server on a LAN.
-This means that you only need to configure the server and the
-clients will automatically see the printers and classes on
-it.</P>
-
-<P>In addition, CUPS can automatically merge multiple identical
-network printers into "implicit classes". This allows clients to
-send jobs to the implicit class and have them print on the first
-available printer or server. In addition, failsafe and
-load-balancing functions are enabled simply by defining the same
-printer on multiple servers!</P>
-<H3>Scheduler</H3>
-
-<P>The scheduler is a HTTP/1.1 server application that handles
-HTTP requests. Besides handling printer requests via IPP POST
-requests, the scheduler also acts as a full-featured web server
-for documentation, status monitoring, and administration.</P>
+<H2 CLASS="title"><A NAME="PROGRAMMING">Programming Interfaces</A></H2>
-<P>The scheduler also manages a list of available printers on
-the LAN and dispatches print jobs as needed using the
-appropriate filters and backends.</P>
+<P>CUPS makes use of several general-purpose libraries to provide its printing services. Unlike the rest of CUPS, the libraries are provided under the terms of the GNU LGPL so they may be used by non-GPL applications.</P>
-<H3>Configuration Files</H3>
+<H3>CUPS Library (libcups)</H3>
-<P>The configuration files consist of:</P>
+<P>The CUPS library contains all of the core HTTP and IPP communications code as well as convenience functions for queuing print jobs, getting printer information, accessing resources via HTTP and IPP, and manipulating PPD files. The scheduler and all commands, filters, and backends use this library.</P>
-<ul>
+<H3>CUPS CGI Library (libcupscgi)</H3>
- <LI>The HTTP server configuration file.</LI>
+<P>The CUPS CGI library provides all of the web interface support functions. It is used by the CGI programs to provide the CUPS web interface.</P>
- <LI>Printer and class definition files.</LI>
+<H3>CUPS Driver Library (libcupsdriver)</H3>
- <LI>MIME type and conversion rule files.</LI>
+<P>The CUPS driver library provides access to the dithering, color conversion, and helper functions used by the CUPS sample printer drivers.</P>
- <LI>PostScript Printer Description (PPD) files.</LI>
+<H3>CUPS Imaging Library (libcupsimage)</H3>
-</ul>
+<P>The CUPS imaging library provides functions for managing large images, doing colorspace conversion and color management, scaling images for printing, and managing raster page streams. It is used by the CUPS image file filters, the PostScript RIP, and all raster printers drivers.</P>
-<P>The HTTP server configuration file is purposely similar to
-the Apache server configuration file and defines all of the
-access control properties for the server.</P>
+<H3>CUPS MIME Library (libcupsmime)</H3>
-<P>The printer and class definition files list the available
-printer queues and classes. Printer classes are collections of
-printers. Jobs sent to a class are forwarded to the first
-available printer in the class, round-robin fashion.</P>
+<P>The CUPS MIME library provides file typing and conversion functions and is used by the scheduler and <A HREF="man-cupsfilter.html">cupsfilter(8)</A> command to auto-type and convert print files to a printable format.</P>
-<P>The MIME type files list the supported MIME types
-(text/plain, application/postscript, etc.) and "magic' rules for
-automatically detecting the format of a file. These are used by
-the HTTP server to determine the <tt>Content-Type</tt> field for
-<tt>GET</tt> and <tt>HEAD</tt> requests and by the IPP request
-handler to determine the file type when a <tt>Print-Job</tt> or
-<tt>Send-File</tt> request is received with a
-<tt>document-format</tt> of
-<tt>application/octet-stream</tt>.</P>
+<H3>CUPS PPD Compiler Library (libcupsppdc)</H3>
-<P>The MIME conversion rule files list the available filters.
-The filters are used when a job is dispatched so that an
-application can send a convenient file format to the printing
-system which then converts the document into a printable format
-as needed. Each filter has a relative cost associated with it,
-and the filtering algorithm chooses the set of filters that will
-convert the file to the needed format with the lowest total
-"cost".</P>
+<P>The CUPS PPD compiler library provides access to driver information files and is used by the PPD compiler tools as well as the <A HREF="man-cups-driverd.html">cups-driverd(8)</A> helper program to generate PPD files and message catalogs for localization.</P>
-<P>The PPD files describe the capabilities of all printers, not
-just PostScript printers. There is one PPD file for each
-printer. PPD files for non-PostScript printers define additional
-filters through <tt>cupsFilter</tt> attributes to support
-printer drivers.</P>
--->
</BODY>
</HTML>
<head>
<title>CUPS Implementation of IPP</title>
<meta name='keywords' content='Programming, Internet Printing Protocol'>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</head>
<body>
<!--
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<H1 CLASS="title">CUPS Implementation of IPP</H1>
+
<h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
<p>CUPS implements IPP/1.1 and the operations and attributes
<!-- SECTION: Specifications -->
<HEAD>
<TITLE>CUPS PDF Format</TITLE>
- <LINK REL="STYLESHEET" TYPE="test/css" HREF="../cups.css">
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">CUPS PDF Format</H1>
+
<P>CUPS PDF files (application/vnd.cups-pdf) are device-dependent
PDF/A files that contain a job ticket information. These files
are typically produced by the CUPS <CODE>pdftopdf</CODE> filter
<head>
<title>Generating PostScript for CUPS</title>
<meta name='keywords' content='Programming, PostScript, Document Structuring Conventions'>
- <link rel='stylesheet' type='text/css' href='../cups.css'>
+ <link rel='stylesheet' type='text/css' href='../cups-printable.css'>
</head>
<body>
<!--
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<H1 CLASS="title">Generating PostScript for CUPS</H1>
+
<h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
<p>This document describes how to generate PostScript output for
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<H1 CLASS="title">CUPS PPD Extensions</H1>
+
<h2 class='title'><a name='INTRODUCTION'>Introduction</a></h2>
<p>This specification describes the attributes and extensions
<p class='summary'>*APCustomColorMatchingProfile: name</p>
<p>This attribute defines a supported RGB color profile that can be used
-when doing custom color matching. Currently only <tt>sRGB</tt> and
-<tt>AdobeRGB</tt> are supported. If not specified, RGB data will use the
-Generic RGB colorspace.</p>
+when doing custom color matching. Currently only <tt>sRGB</tt>,
+<tt>AdobeRGB</tt>, and <tt>GenericRGB</tt> are supported. If not specified, RGB
+data will use the GenericRGB colorspace.</p>
<blockquote><b>Note:</b>
<p class='summary'>*APDefaultCustomColorMatchingProfile: name</p>
<p>This attribute defines the default RGB color profile that will be used
-when doing custom color matching. Currently only <tt>sRGB</tt> and
-<tt>AdobeRGB</tt> are supported.</p>
+when doing custom color matching. Currently only <tt>sRGB</tt>,
+<tt>AdobeRGB</tt>, and <tt>GenericRGB</tt> are supported.</p>
<p>Examples:</p>
<p>This attribute specifies that the driver provides its own custom color
matching. When <tt>true</tt>, the default hand-off colorspace will be
-Generic Gray, Generic RGB, or Generic CMYK depending on the number of
+GenericGray, GenericRGB, or GenericCMYK depending on the number of
components the driver requests. The <a
href='#APDefaultCustomColorMatchingProfile'><tt>APDefaultCustomColorMatchingProfile</tt></a>
attribute can be used to override the default 3-component (RGB) colorspace.</p>
<!-- SECTION: Specifications -->
<HEAD>
<TITLE>CUPS Raster Format</TITLE>
- <LINK REL="STYLESHEET" TYPE="test/css" HREF="../cups.css">
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">CUPS Raster Format</H1>
+
<P>CUPS raster files are device-dependent raster image files that
contain a PostScript page device dictionary and device-dependent
raster imagery for each page in the document. These files are
a printable format.</P>
<P>CUPS 1.0 and 1.1 used a version 1 raster format. CUPS 1.2
-introduces version 2 (compressed) and version 3 (uncompressed)
+introduced version 2 (compressed) and version 3 (uncompressed)
formats that are a superset of the version 1 format. Applications
using the CUPS Imaging API (the cupsRaster* functions) can read
all formats without code changes.</P>
<!-- SECTION: Specifications -->
<HEAD>
<TITLE>CUPS Software Test Plan</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">CUPS Software Test Plan</H1>
+
<P>This software test plan provides detailed tests that are used
-to evaluate the stability and compliance of the Common UNIX
-Printing System ("CUPS") Version 1.2.</P>
+to evaluate the stability and compliance of CUPS.</P>
<H2 CLASS="title"><A NAME="PROCEDURE">Test Procedure</A></H2>
<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>Standard Configuration</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">Standard Configuration</H1>
+
<P>This document describes the standard configuration for this CUPS
server.</P>
if you make any changes to the standard CUPS distribution that are
not automatically updated by the configure script. -->
<P>This file reflects the standard CUPS configuration as distributed
-by Easy Software Products, the creator of CUPS.</P>
+by Apple Inc, the developer of CUPS.</P>
</BLOCKQUOTE>
<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>Translating and Customizing CUPS</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
+<H1 CLASS="title">Translating and Customizing CUPS</H1>
+
<P>Thanks to its extensive use of templates, images, and message
catalogs, CUPS can be easily translated (or customized!) to suit
your needs. This help file will guide you through the CUPS
localization files so you can get the most out of it.</P>
+
<H2 CLASS="title"><A NAME="INTRO">Getting Started</A></H2>
<P>Start by downloading the CUPS source code from <A
<!-- SECTION: Getting Started -->
<HEAD>
<TITLE>What's New in CUPS 1.4</TITLE>
+ <LINK REL="STYLESHEET" TYPE="text/css" HREF="../cups-printable.css">
</HEAD>
<BODY>
-<P>CUPS 1.4 adds over 65 changes and new features to CUPS 1.3.x. This page provides a high-level outline of these changes. If you have never used CUPS before, read the <A HREF="overview.html">"Overview of CUPS"</A> document instead.</P>
+<H1 CLASS="title">What's New in CUPS 1.4</H1>
+
+<P>CUPS 1.4 adds over 67 changes and new features to CUPS 1.3.x. This page provides a high-level outline of these changes. If you have never used CUPS before, read the <A HREF="overview.html">"Overview of CUPS"</A> document instead.</P>
<H2 CLASS="title"><A NAME="COMMANDS">Commands</A></H2>
<LI><EM>Default LogLevel;</EM> the default LogLevel is now "warn" instead of "info".</LI>
+ <LI><EM>Automatic debug logging;</EM> the scheduler now records up to the last N (default 200) debug messages for failed print jobs.</LI>
+
<LI><EM>Default paper size;</EM> the scheduler now supports a DefaultPaperSize directive to override the default paper size defined by the locale or libpaper configuration.</LI>
<LI><EM>Encryption support;</EM> the scheduler now supports a SSLOptions directive to optionally support Windows clients in "FIPS" mode. It also now loads both the server and CA certificates (if present) from the ServerCertificate file.</LI>
<H2 CLASS="title"><A NAME="DRIVERS">Printer Drivers</A></H2>
-<OL START="49">
+<OL START="50">
<LI><EM>Device discovery;</EM> the cups-deviced helper now runs backends in parallel for faster discovery and streams the results of discovery as the backends provide them.</LI>
<H2 CLASS="title"><A NAME="FILTERS">Print Filters</A></H2>
-<OL START="58">
+<OL START="59">
<LI><EM>Banner filter;</EM> the bundled banner ("job-sheets") pages are now generated using a new banner filter provides easier customization and better support for UTF-8 text.</LI>
<H2 CLASS="title"><A NAME="CUPSAPI">CUPS API</A></H2>
-<OL START="61">
+<OL START="62">
<LI><EM>Backend API;</EM> a new cupsBackendReport function is provided to report a device from a backend and handles any needed quoting of the make-and-model, info, device-id, and location strings.</LI>
+<!--
+ "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+ Driver API header for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h1 class='title'>Driver API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+ <th>Header</th>
+ <th>cups/driver.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+ <th>Library</th>
+ <td>-lcupsdriver</td>
+</tr>
+<tr>
+ <th>See Also</th>
+ <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
+<!--
+ "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+ Driver API introduction for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The driver API provides common dithering, color conversion, and utility
+functions for CUPS drivers.</p>
Raster API header for the Common UNIX Printing System (CUPS).
- Copyright 2008 by Apple Inc.
+ Copyright 2008-2009 by Apple Inc.
These coded instructions, statements, and computer programs are the
property of Apple Inc. and are protected by Federal copyright
file is missing or damaged, see the license at "http://www.cups.org/".
-->
+<h1 class='title'>Raster API</h1>
+
<div class='summary'><table summary='General Information'>
<thead>
<tr>
-<p>This document describes how to develop printer drivers for PostScript printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#IMPORT'>importing existing PPD files</a>, <a href='#FILTERS'>using custom filters</a>, <a href='#COLOR'>implementing color management</a>, <a href='#MACOSX'>adding Mac OS X features</a>, and <a href='#DEPLOY'>deploying your driver</a>.</p>
+<h1 class='title'>Developing PostScript Printer Drivers</h1>
+
+<p>This document describes how to develop printer drivers for PostScript printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#IMPORT'>importing existing PPD files</a>, <a href='#FILTERS'>using custom filters</a>, <a href='#COLOR'>implementing color management</a>, and <a href='#MACOSX'>adding Mac OS X features</a>.</p>
<div class='summary'><table summary='General Information'>
<tbody>
<h2 class='title'><a name='COLOR'>Implementing Color Management</a></h2>
-<p>Talk about ICC color profiles and sRGB as two best options.</p>
+<p>CUPS uses ICC color profiles to provide more accurate color reproduction. The <a href='spec-ppd.html#cupsICCProfile'><tt>cupsICCProfile</tt></a> attribute defines the color profiles that are available for a given printer, for example:</p>
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "ColorModel.MediaType.Resolution/Description" /path/to/ICC/profile
+</pre>
-<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
+<p>where "ColorModel.MediaType.Resolution" defines a selector based on the corresponding option selections. A simple driver might only define profiles for the color models that are supported, for example a printer supporting Gray and RGB might use:</p>
+
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "Gray../Grayscale Profile" /path/to/ICC/gray-profile
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "RGB../Full Color Profile" /path/to/ICC/rgb-profile
+</pre>
+
+<p>The options used for profile selection can be customized using the <tt>cupsICCQualifier2</tt> and <tt>cupsICCQualifier3</tt> attributes.</p>
-<p>Talk about help books, icons, and PDEs.</p>
+<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
-<h2 class='title'><a name='DEPLOY'>Deploying Your Driver</a></h2>
+<p>Mac OS X printer drivers can provide <a href='spec-ppd.html#MACOSX'>additional attributes</a> to specify additional option panes in the print dialog, an image of the printer, a help book, and option presets for the driver software:</p>
-<p>Talk about install locations, etc.</p>
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APDialogExtension "" /Library/Printers/Vendor/filename.plugin
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APHelpBook "" /Library/Printers/Vendor/filename.bundle
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterIconPath "" /Library/Printers/Vendor/filename.icns
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterPreset "name/text" "*option choice ..."
+</pre>
+<h1 class='title'>Introduction to the PPD Compiler</h1>
+
<P>This document describes how to use the CUPS PostScript Printer Description
(PPD) file compiler. The PPD compiler generates PPD files from simple text files
that describe the features and capabilities of one or more printers.</P>
-<p>This document describes how to develop printer drivers for raster printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#FILTERS'>using filters</a>, <a href='#COLOR'>implementing color management</a>, <a href='#MACOSX'>adding Mac OS X features</a>, and <a href='#DEPLOY'>deploying your driver</a>.</p>
+<h1 class='title'>Developing Raster Printer Drivers</h1>
+
+<p>This document describes how to develop printer drivers for raster printers. Topics include: <a href='#BASICS'>printer driver basics</a>, <a href='#CREATE'>creating new PPD files</a>, <a href='#FILTERS'>using filters</a>, <a href='#COLOR'>implementing color management</a>, and <a href='#MACOSX'>adding Mac OS X features</a>.</p>
<div class='summary'><table summary='General Information'>
<tbody>
<h2 class='title'><a name='COLOR'>Implementing Color Management</a></h2>
-<p>Talk about ICC color profiles and sRGB as two best options.</p>
+<p>CUPS uses ICC color profiles to provide more accurate color reproduction. The <a href='spec-ppd.html#cupsICCProfile'><tt>cupsICCProfile</tt></a> attribute defines the color profiles that are available for a given printer, for example:</p>
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "ColorModel.MediaType.Resolution/Description" /path/to/ICC/profile
+</pre>
-<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
+<p>where "ColorModel.MediaType.Resolution" defines a selector based on the corresponding option selections. A simple driver might only define profiles for the color models that are supported, for example a printer supporting Gray and RGB might use:</p>
+
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "Gray../Grayscale Profile" /path/to/ICC/gray-profile
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> cupsICCProfile "RGB../Full Color Profile" /path/to/ICC/rgb-profile
+</pre>
-<p>Talk about help books, icons, and PDEs.</p>
+<p>The options used for profile selection can be customized using the <tt>cupsICCQualifier2</tt> and <tt>cupsICCQualifier3</tt> attributes.</p>
+<h3><span class='info'>Since Mac OS X 10.5</span>Custom Color Matching Support</h3>
-<h2 class='title'><a name='DEPLOY'>Deploying Your Driver</a></h2>
+<p>Mac OS X printer drivers that are based on an existing standard RGB colorspace can tell the system to use the corresponding colorspace instead of an arbitrary ICC color profile when doing color management. The <a href='#APCustom'><tt>APSupportsCustomColorMatching</tt></a> and <tt>APDefaultCustomColorMatchingProfile</tt> attributes can be used to enable this mode:</p>
-<p>Talk about install locations, etc.</p>
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APSupportsCustomColorMatching "" true
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APDefaultCustomColorMatchingProfile "" sRGB
+</pre>
+
+
+<h2 class='title'><a name='MACOSX'>Adding Mac OS X Features</a></h2>
+
+<p>Mac OS X printer drivers can provide <a href='spec-ppd.html#MACOSX'>additional attributes</a> to specify additional option panes in the print dialog, an image of the printer, a help book, and option presets for the driver software:</p>
+
+<pre class='example'>
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APDialogExtension "" /Library/Printers/Vendor/filename.plugin
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APHelpBook "" /Library/Printers/Vendor/filename.bundle
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterIconPath "" /Library/Printers/Vendor/filename.icns
+<a href='ref-ppdcfile.html#Attribute'>Attribute</a> APPrinterPreset "name/text" "*option choice ..."
+</pre>
* EPSON ESC/P and ESC/P2 filter for the Common UNIX Printing System
* (CUPS).
*
- * Copyright 2007-2008 by Apple Inc.
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1993-2007 by Easy Software Products.
*
* These coded instructions, statements, and computer programs are the
void
Setup(void)
{
- const char *device_uri; /* The device for the printer... */
+ const char *device_uri; /* The device for the printer... */
/*
*/
void
-StartPage(const ppd_file_t *ppd, /* I - PPD file */
- const cups_page_header2_t *header) /* I - Page header */
+StartPage(
+ const ppd_file_t *ppd, /* I - PPD file */
+ const cups_page_header2_t *header) /* I - Page header */
{
- int n, t; /* Numbers */
- int plane; /* Looping var */
+ int n, t; /* Numbers */
+ int plane; /* Looping var */
/*
* See which type of printer we are using...
*/
- EjectPage = header->Margins[0] || header->Margins[1];
-
switch (Model)
{
case EPSON_9PIN :
printf("\033l%c\033Q%c", 0, /* Side margins */
(int)(10.0 * header->PageSize[0] / 72.0 + 0.5));
- printf("\033C%c%c", 0, /* Page length */
- (int)(header->PageSize[1] / 72.0 + 0.5));
+ printf("\033\062\033C%c", /* Page length in 1/6th inches */
+ (int)(header->PageSize[1] / 12.0 + 0.5));
printf("\033N%c", 0); /* Bottom margin */
printf("\033O"); /* No perforation skip */
*/
void
-EndPage(const cups_page_header2_t *header) /* I - Page header */
+EndPage(
+ const cups_page_header2_t *header) /* I - Page header */
{
if (DotBytes && header)
{
* Eject the current page...
*/
- if (EjectPage)
- putchar(12); /* Form feed */
+ putchar(12); /* Form feed */
fflush(stdout);
/*
*/
void
-OutputLine(const cups_page_header2_t *header) /* I - Page header */
+OutputLine(
+ const cups_page_header2_t *header) /* I - Page header */
{
if (header->cupsRowCount)
{
*/
void
-OutputRows(const cups_page_header2_t *header, /* I - Page image header */
- int row) /* I - Row number (0 or 1) */
+OutputRows(
+ const cups_page_header2_t *header, /* I - Page image header */
+ int row) /* I - Row number (0 or 1) */
{
- unsigned i, n; /* Looping vars */
- int dot_count, /* Number of bytes to print */
- dot_min; /* Minimum number of bytes */
- unsigned char *dot_ptr, /* Pointer to print data */
- *ptr; /* Current data */
+ unsigned i, n; /* Looping vars */
+ int dot_count, /* Number of bytes to print */
+ dot_min; /* Minimum number of bytes */
+ unsigned char *dot_ptr, /* Pointer to print data */
+ *ptr; /* Current data */
dot_min = DotBytes * DotColumns;
<dict>
<key>Label</key>
<string>org.cups.cupsd</string>
+ <key>EnableTransactions</key>
+ <true/>
+ <key>ExitTimeOut</key>
+ <integer>60</integer>
<key>KeepAlive</key>
<dict>
<key>PathState</key>
msgstr "帐单信息:"
msgid "Bond Paper"
-msgstr "证券纸"
+msgstr "半透明纸"
msgid "C0 Envelope"
msgstr "C0 信封"
msgstr "打印和撕纸"
msgid "Printed For: "
-msgstr "打印用于:"
+msgstr "打印人:"
msgid "Printed From: "
msgstr "打印自:"
printers.conf.$(MAN5EXT) \
subscriptions.conf.$(MAN5EXT)
MAN7 = backend.$(MAN7EXT) \
- commandtoescpx.$(MAN7EXT) \
- commandtopclx.$(MAN7EXT) \
drv.$(MAN7EXT) \
filter.$(MAN7EXT) \
- rastertoescpx.$(MAN7EXT) \
- rastertopclx.$(MAN7EXT)
+ notifier.$(MAN7EXT)
MAN8 = cupsaccept.$(MAN8EXT) \
cupsaddsmb.$(MAN8EXT) \
cupsctl.$(MAN8EXT) \
.\" 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/".
.\"
-.TH backend 7 "CUPS" "28 July 2008" "Apple Inc."
+.TH backend 7 "CUPS" "12 May 2009" "Apple Inc."
.SH NAME
backend \- cups backend transmission interfaces
interface.
.LP
-The command name (argv[0]) is set to the device URI of the
-destination printer. Starting with CUPS 1.1.22, any
-authentication information in argv[0] is removed, so
-backend developers are urged to use the DEVICE_URI environment
-variable whenever authentication information is required. The
-CUPS API includes a \fIcupsBackendDeviceURI\fR function for
-retrieving the correct device URI.
+The command name (argv[0]) is set to the device URI of the destination printer.
+Starting with CUPS 1.1.22, any authentication information in argv[0] is removed,
+so backend developers are urged to use the DEVICE_URI environment variable
+whenever authentication information is required. The CUPS API includes a
+\fIcupsBackendDeviceURI\fR function for retrieving the correct device URI.
.LP
Back-channel data from the device should be relayed to the job
All other exit code values are reserved.
.SH SEE ALSO
-\fIcupsd(8)\fR, \fIcupsd.conf(5)\fR, \fIfilter(7)\fR
+\fIcupsd(8)\fR, \fIcupsd.conf(5)\fR, \fIfilter(7)\fR,
.br
http://localhost:631/help
+++ /dev/null
-.\"
-.\" "$Id: commandtoescpx.man 7600 2008-05-20 21:06:23Z mike $"
-.\"
-.\" commandtoescpx man page for the CUPS Driver Development Kit.
-.\"
-.\" Copyright 2007-2009 by Apple Inc.
-.\" Copyright 1997-2007 by Easy Software Products.
-.\"
-.\" 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 "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/".
-.\"
-.TH commandtoescpx 1 "CUPS" "9 March 2009" "Apple Inc."
-.SH NAME
-commandtoescpx \- enhanced esc/p command filter for cups
-.SH SYNOPSIS
-.B commandtoescpx
-jobid user title copies options [
-.I filename.ras
-]
-.SH DESCRIPTION
-\fIcommandtoescpx\fR converts a CUPS command file to ESC/P or
-ESC/P2. It is used to support printing to a variety of EPSON and
-EPSON-compatible printers and plotters.
-.SH SEE ALSO
-ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5), CUPS Driver Developer Kit Manual.
-.SH COPYRIGHT
-Copyright 2007-2009 by Apple Inc.
-.\"
-.\" End of "$Id: commandtoescpx.man 7600 2008-05-20 21:06:23Z mike $".
-.\"
+++ /dev/null
-.\"
-.\" "$Id: commandtopclx.man 7600 2008-05-20 21:06:23Z mike $"
-.\"
-.\" commandtopclx man page for the CUPS Driver Development Kit.
-.\"
-.\" Copyright 2007-2009 by Apple Inc.
-.\" Copyright 1997-2007 by Easy Software Products.
-.\"
-.\" 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 "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/".
-.\"
-.TH commandtopclx 1 "CUPS" "9 March 2009" "Apple Inc."
-.SH NAME
-commandtopclx \- enhanced pcl command filter for cups
-.SH SYNOPSIS
-.B commandtopclx
-jobid user title copies options [
-.I filename.ras
-]
-.SH DESCRIPTION
-\fIcommandtopclx\fR converts a CUPS command file to HP-PCL. It is
-used to support printing to a variety of HP and HP-compatible
-printers and plotters.
-.SH SEE ALSO
-ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5), CUPS Driver Developer Kit Manual.
-.SH COPYRIGHT
-Copyright 2007-2009 by Apple Inc.
-.\"
-.\" End of "$Id: commandtopclx.man 7600 2008-05-20 21:06:23Z mike $".
-.\"
.br
Specifies access control for the named location.
.TP 5
+LogDebugHistory #-messages
+.br
+Specifies the number of debugging messages that are logged when an error
+occurs in a print job.
+.TP 5
LogFilePerm mode
.br
Specifies the permissions for all log files that the scheduler writes.
.\" 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/".
.\"
-.TH filter 7 "CUPS" "18 September 2008" "Apple Inc."
+.TH filter 7 "CUPS" "13 May 2009" "Apple Inc."
.SH NAME
filter \- cups file conversion filter interface
.SH SYNOPSIS
file as required by the file format. All output \fBmust\fR be sent to the
standard output.
.LP
-The command name (argv[0]) is set to the name of the destination printer.
+The command name (argv[0]) is set to the name of the destination printer but is
+also available in the PRINTER environment variable.
+
+.SH OPTIONS
+Options passed on the command-line typically do not include the default choices
+the printer's PPD file. In addition, some options may be specified in multiple
+ways - "landscape" is a synonym for "orientation-requested=4", "media" is a
+synonym for "PageSize", "PageRegion", "InputSlot", and "MediaType", and "sides"
+is a synonym for the various "Duplex" options. Non-raster filters \fBmust\fR
+support both explicit and implicit specification of PPD options - use the
+ppdMarkDefaults and cupsMarkOptions functions in the CUPS library to use the
+correct mapping, and ppdFindMarkedChoice to get the user-selected choice.
+.LP
+Raster filters should use option choices set through the raster page header, as
+those reflect the options in effect for a given page. Options specified on the
+command-line determine the default values for the entire job, which can be
+overridden on a per-page basis.
+
.SH LOG MESSAGES
Messages sent to stderr are generally logged to
printer-state-message attribute and the current \fIErrorLog\fR.
only filter. Typically the interface script will be provided via the
\fIlpadmin(8)\fR command using the \fI-i\fR option.
.SH SEE ALSO
-\fIbackend(1)\fR, \fIcupsd(8)\fR,
+\fIbackend(7)\fR, \fIcupsd(8)\fR,
.br
http://localhost:631/help
.SH COPYRIGHT
"<html>\n"
"<!-- SECTION: Man Pages -->\n"
"<head>\n"
- "\t<style type='text/css'><!--\n"
- "\th1, h2, h3, p { font-family: sans-serif; text-align: justify; }\n"
- "\ttt, pre a:link, pre a:visited, tt a:link, tt a:visited { font-weight: bold; color: #7f0000; }\n"
- "\tpre { font-weight: bold; color: #7f0000; margin-left: 2em; }\n"
- "\th1.title, h2.title, h3.title { border-bottom: solid 2px #000000; }\n"
- "\t--></style>\n", outfile);
+ "\t<link rel=\"stylesheet\" type=\"text/css\" "
+ "href=\"../cups-printable.css\">\n", outfile);
blist = 0;
font = 0;
"\t<title>%s(%d)</title>\n"
"</head>\n"
"<body>\n"
+ "<h1 class=\"title\">%s(%d)</h1>\n"
"%s",
- name, section, start_fonts[font]);
+ name, section, name, section, start_fonts[font]);
}
else if (section < 0)
continue;
line[strlen(line) - 1] = '\0'; /* Strip LF */
if (line[2] == 'H')
- fputs("<h2><a name='", outfile);
+ fputs("<h2 class=\"title\"><a name=\"", outfile);
else
- fputs("<h3><a name='", outfile);
+ fputs("<h3><a name=\"", outfile);
for (lineptr = line + 4; *lineptr; lineptr ++)
if (*lineptr == '\"')
else
putc_entity(*lineptr, outfile);
- fputs("'>", outfile);
+ fputs("\">", outfile);
for (lineptr = line + 4; *lineptr; lineptr ++)
if (*lineptr == '\"')
+++ /dev/null
-.\"
-.\" "$Id: rastertoescpx.man 7600 2008-05-20 21:06:23Z mike $"
-.\"
-.\" rastertoescpx man page for the Common UNIX Printing System.
-.\"
-.\" Copyright 2007-2009 by Apple Inc.
-.\" Copyright 1997-2007 by Easy Software Products.
-.\"
-.\" 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 "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/".
-.\"
-.TH rastertoescpx 1 "CUPS" "20 May 2008" "Apple Inc."
-.SH NAME
-rastertoescpx \- enhanced esc/p raster driver for cups
-.SH SYNOPSIS
-.B rastertoescpx
-jobid user title copies options [
-.I filename.ras
-]
-.SH DESCRIPTION
-\fIrastertoescpx\fR converts a CUPS raster stream to ESC/P or
-ESC/P2. It is used to support printing to a variety of EPSON and
-EPSON-compatible printers and plotters.
-.SH SEE ALSO
-ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5)
-.br
-http://localhost:631/help
-.SH COPYRIGHT
-Copyright 2007-2009 by Apple Inc.
-.\"
-.\" End of "$Id: rastertoescpx.man 7600 2008-05-20 21:06:23Z mike $".
-.\"
+++ /dev/null
-.\"
-.\" "$Id: rastertopclx.man 7600 2008-05-20 21:06:23Z mike $"
-.\"
-.\" rastertopclx man page for the Common UNIX Printing System.
-.\"
-.\" Copyright 2007-2009 by Apple Inc.
-.\" Copyright 1997-2007 by Easy Software Products.
-.\"
-.\" 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 "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/".
-.\"
-.TH rastertopclx 1 "CUPS" "20 May 2008" "Apple Inc."
-.SH NAME
-rastertopclx \- enhanced pcl raster driver for cups
-.SH SYNOPSIS
-.B rastertopclx
-jobid user title copies options [
-.I filename.ras
-]
-.SH DESCRIPTION
-\fIrastertopclx\fR converts a CUPS raster stream to HP-PCL and HP-RTL. It is
-used to support printing to a variety of HP and HP-compatible
-printers and plotters.
-.SH SEE ALSO
-ppdc(1), ppdhtml(1), ppdi(1), ppdmerge(1), ppdpo(1), ppdcfile(5)
-.br
-http://localhost:631/help
-.SH COPYRIGHT
-Copyright 2007-2009 by Apple Inc.
-.\"
-.\" End of "$Id: rastertopclx.man 7600 2008-05-20 21:06:23Z mike $".
-.\"
f 0644 root sys $MANDIR/man5/mime.types.$MAN5EXT man/mime.types.$MAN5EXT
f 0644 root sys $MANDIR/man5/printers.conf.$MAN5EXT man/printers.conf.$MAN5EXT
-f 0644 root sys $MANDIR/man7/backend.$MAN7EXT man/backend.$MAN7EXT
-f 0644 root sys $MANDIR/man7/commandtoescpx.$MAN7EXT man/commandtoescpx.$MAN7EXT
-f 0644 root sys $MANDIR/man7/commandtopclx.$MAN7EXT man/commandtopclx.$MAN7EXT
f 0644 root sys $MANDIR/man7/drv.$MAN7EXT man/drv.$MAN7EXT
-f 0644 root sys $MANDIR/man7/filter.$MAN7EXT man/filter.$MAN7EXT
-f 0644 root sys $MANDIR/man7/rastertoescpx.$MAN7EXT man/rastertoescpx.$MAN7EXT
-f 0644 root sys $MANDIR/man7/rastertopclx.$MAN7EXT man/rastertopclx.$MAN7EXT
l 0644 root sys $AMANDIR/man$MAN8DIR/accept.$MAN8EXT cupsaccept.$MAN8EXT
f 0644 root sys $AMANDIR/man$MAN8DIR/cupsaccept.$MAN8EXT man/cupsaccept.$MAN8EXT
f 0644 root sys $MANDIR/man1/cups-config.$MAN1EXT man/cups-config.$MAN1EXT
f 0644 root sys $MANDIR/man1/ man/ppd*.$MAN1EXT
f 0644 root sys $MANDIR/man5/ppdcfile.$MAN5EXT man/ppdcfile.$MAN5EXT
+f 0644 root sys $MANDIR/man7/backend.$MAN7EXT man/backend.$MAN7EXT
+f 0644 root sys $MANDIR/man7/filter.$MAN7EXT man/filter.$MAN7EXT
+f 0644 root sys $MANDIR/man7/notifier.$MAN7EXT man/notifier.$MAN7EXT
%subpackage lpd
d 0755 root sys $AMANDIR/man$MAN8DIR -
/usr/share/man/man5/*.conf.5.gz
/usr/share/man/man5/mime.*.5.gz
%dir /usr/share/man/man7
-/usr/share/man/man7/commandto*
/usr/share/man/man7/drv*
-/usr/share/man/man7/rasterto*
%dir /usr/share/man/man8
/usr/share/man/man8/accept.8.gz
/usr/share/man/man8/cupsaddsmb.8.gz
/usr/share/man/man5/ppdcfile.5.gz
/usr/share/man/man7/backend.7.gz
/usr/share/man/man7/filter.7.gz
+/usr/share/man/man7/notifier.7.gz
/usr/bin/cups-config
/usr/bin/ppd*
--- /dev/null
+<!--
+ "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+ PPD Compiler API header for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h1 class='title'>PPD Compiler API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+ <th>Header</th>
+ <th>cups/ppdc.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+ <th>Library</th>
+ <td>-lcupsppdc</td>
+</tr>
+<tr>
+ <th>See Also</th>
+ <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
--- /dev/null
+<!--
+ "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+ PPD Compiler API introduction for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The PPD Compiler API provides access to CUPS driver information files and
+methods for generating and importing PPD files.</p>
--- /dev/null
+<!--
+ "$Id: api-array.header 8087 2008-10-27 21:37:05Z mike $"
+
+ MIME API header for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h1 class='title'>MIME API</h1>
+
+<div class='summary'><table summary='General Information'>
+<thead>
+<tr>
+ <th>Header</th>
+ <th>cups/mime.h</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+ <th>Library</th>
+ <td>-lcupsmime</td>
+</tr>
+<tr>
+ <th>See Also</th>
+ <td>Programming: <a href='api-overview.html' target='_top'>Introduction to CUPS Programming</a></td>
+</tr>
+</tbody>
+</table></div>
--- /dev/null
+<!--
+ "$Id: api-array.shtml 7616 2008-05-28 00:34:13Z mike $"
+
+ MIME API introduction for CUPS.
+
+ Copyright 2009 by Apple Inc.
+
+ 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 "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/".
+-->
+
+<h2 class='title'><a name='OVERVIEW'>Overview</a></h2>
+
+<p>The MIME API provides file typing and conversion services for CUPS.</p>
#endif /* HAVE_LAUNCHD */
{ "LimitRequestBody", &MaxRequestSize, CUPSD_VARTYPE_INTEGER },
{ "ListenBackLog", &ListenBackLog, CUPSD_VARTYPE_INTEGER },
+ { "LogDebugHistory", &LogDebugHistory, CUPSD_VARTYPE_INTEGER },
{ "LogFilePerm", &LogFilePerm, CUPSD_VARTYPE_INTEGER },
{ "LPDConfigFile", &LPDConfigFile, CUPSD_VARTYPE_STRING },
{ "MaxActiveJobs", &MaxActiveJobs, CUPSD_VARTYPE_INTEGER },
KeepAlive = TRUE;
KeepAliveTimeout = DEFAULT_KEEPALIVE;
ListenBackLog = SOMAXCONN;
+ LogDebugHistory = 200;
LogFilePerm = CUPS_DEFAULT_LOG_FILE_PERM;
LogLevel = CUPSD_LOG_WARN;
LogTimeFormat = CUPSD_TIME_STANDARD;
/* Allow overrides? */
ConfigFilePerm VALUE(0640),
/* Permissions for config files */
+ LogDebugHistory VALUE(200),
+ /* Amount of automatic debug history */
FatalErrors VALUE(CUPSD_FATAL_CONFIG),
/* Which errors are fatal? */
LogFilePerm VALUE(0644);
* cat_drv() - Generate a PPD from a driver info file.
* cat_ppd() - Copy a PPD file to stdout.
* copy_static() - Copy a static PPD file to stdout.
+ * compare_inodes() - Compare two inodes.
* compare_matches() - Compare PPD match scores for sorting.
* compare_names() - Compare PPD filenames for sorting.
* compare_ppds() - Compare PPD file make and model names for sorting.
* Globals...
*/
-cups_array_t *PPDsByName = NULL, /* PPD files sorted by filename and name */
+cups_array_t *Inodes = NULL, /* Inodes of directories we've visited */
+ *PPDsByName = NULL, /* PPD files sorted by filename and name */
*PPDsByMakeModel = NULL;/* PPD files sorted by make and model */
int ChangedPPD; /* Did we change the PPD database? */
static int cat_drv(const char *name, int request_id);
static int cat_ppd(const char *name, int request_id);
static int cat_static(const char *name, int request_id);
+static int compare_inodes(struct stat *a, struct stat *b);
static int compare_matches(const ppd_info_t *p0,
const ppd_info_t *p1);
static int compare_names(const ppd_info_t *p0,
}
+/*
+ * 'compare_inodes()' - Compare two inodes.
+ */
+
+static int /* O - Result of comparison */
+compare_inodes(struct stat *a, /* I - First inode */
+ struct stat *b) /* I - Second inode */
+{
+ if (a->st_dev != b->st_dev)
+ return (a->st_dev - b->st_dev);
+ else
+ return (a->st_ino - b->st_ino);
+}
+
+
/*
* 'compare_matches()' - Compare PPD match scores for sorting.
*/
if ((cups_datadir = getenv("CUPS_DATADIR")) == NULL)
cups_datadir = CUPS_DATADIR;
+ Inodes = cupsArrayNew((cups_array_func_t)compare_inodes, NULL);
+
snprintf(model, sizeof(model), "%s/model", cups_datadir);
load_ppds(model, "", 1);
const char *p, /* I - Virtual path in name */
int descend) /* I - Descend into directories? */
{
+ struct stat dinfo, /* Directory information */
+ *dinfoptr; /* Pointer to match */
int i; /* Looping var */
cups_file_t *fp; /* Pointer to file */
cups_dir_t *dir; /* Directory pointer */
};
- fprintf(stderr, "DEBUG: [cups-driverd] Loading \"%s\"...\n", d);
+ /*
+ * See if we've loaded this directory before...
+ */
+
+ if (stat(d, &dinfo))
+ {
+ if (errno != ENOENT)
+ fprintf(stderr, "ERROR: [cups-driverd] Unable to stat \"%s\": %s\n", d,
+ strerror(errno));
+
+ return (0);
+ }
+ else if (cupsArrayFind(Inodes, &dinfo))
+ {
+ fprintf(stderr, "ERROR: [cups-driverd] Skipping \"%s\": loop detected!\n",
+ d);
+ return (0);
+ }
+
+ /*
+ * Nope, add it to the Inodes array and continue...
+ */
+
+ dinfoptr = (struct stat *)malloc(sizeof(struct stat));
+ memcpy(dinfoptr, &dinfo, sizeof(struct stat));
+ cupsArrayAdd(Inodes, dinfoptr);
if ((dir = cupsDirOpen(d)) == NULL)
{
return (0);
}
+ fprintf(stderr, "DEBUG: [cups-driverd] Loading \"%s\"...\n", d);
+
while ((dent = cupsDirRead(dir)) != NULL)
{
/*
*/
static char *dequote(char *d, const char *s, int dlen);
+static char *get_auth_info_required(cupsd_printer_t *p, char *buffer,
+ size_t bufsize);
#ifdef __APPLE__
static int get_hostconfig(const char *name);
#endif /* __APPLE__ */
cupsd_printer_t *p, /* I - Printer information */
int for_lpd) /* I - 1 = LPD, 0 = IPP */
{
- int i, j; /* Looping vars */
+ int i; /* Looping var */
char type_str[32], /* Type to string buffer */
state_str[32], /* State to string buffer */
rp_str[1024], /* Queue name string buffer */
air_str[1024], /* auth-info-required string buffer */
*keyvalue[32][2]; /* Table of key/value pairs */
- ipp_attribute_t *air_attr; /* auth-info-required attribute */
/*
keyvalue[i ][0] = "pdl";
keyvalue[i++][1] = p->pdl ? p->pdl : "application/postscript";
- if ((air_attr = ippFindAttribute(p->attrs, "auth-info-required",
- IPP_TAG_KEYWORD)) != NULL &&
- strcmp(air_attr->values[0].string.text, "none"))
+ if (get_auth_info_required(p, air_str, sizeof(air_str)))
{
- char *air = air_str; /* Pointer into string */
-
-
- for (j = 0; j < air_attr->num_values; j ++)
- {
- if (air >= (air_str + sizeof(air_str) - 2))
- break;
-
- if (j)
- *air++ = ',';
-
- strlcpy(air, air_attr->values[j].string.text,
- sizeof(air_str) - (air - air_str));
- air += strlen(air);
- }
-
keyvalue[i ][0] = "air";
keyvalue[i++][1] = air_str;
}
#endif /* HAVE_DNSSD */
+/*
+ * 'get_auth_info_required()' - Get the auth-info-required value to advertise.
+ */
+
+static char * /* O - String or NULL if none */
+get_auth_info_required(
+ cupsd_printer_t *p, /* I - Printer */
+ char *buffer, /* I - Value buffer */
+ size_t bufsize) /* I - Size of value buffer */
+{
+ cupsd_location_t *auth; /* Pointer to authentication element */
+ char resource[1024]; /* Printer/class resource path */
+
+
+ /*
+ * If auth-info-required is set for this printer, return that...
+ */
+
+ if (p->num_auth_info_required > 0 && strcmp(p->auth_info_required[0], "none"))
+ {
+ int i; /* Looping var */
+ char *bufptr; /* Pointer into buffer */
+
+ for (i = 0, bufptr = buffer; i < p->num_auth_info_required; i ++)
+ {
+ if (bufptr >= (buffer + bufsize - 2))
+ break;
+
+ if (i)
+ *bufptr++ = ',';
+
+ strlcpy(bufptr, p->auth_info_required[i], bufsize - (bufptr - buffer));
+ bufptr += strlen(bufptr);
+ }
+
+ return (buffer);
+ }
+
+ /*
+ * Figure out the authentication data requirements to advertise...
+ */
+
+ if (p->type & CUPS_PRINTER_CLASS)
+ snprintf(resource, sizeof(resource), "/classes/%s", p->name);
+ else
+ snprintf(resource, sizeof(resource), "/printers/%s", p->name);
+
+ if ((auth = cupsdFindBest(resource, HTTP_POST)) == NULL ||
+ auth->type == CUPSD_AUTH_NONE)
+ auth = cupsdFindPolicyOp(p->op_policy_ptr, IPP_PRINT_JOB);
+
+ if (auth)
+ {
+ int auth_type; /* Authentication type */
+
+ if ((auth_type = auth->type) == CUPSD_AUTH_DEFAULT)
+ auth_type = DefaultAuthType;
+
+ switch (auth_type)
+ {
+ case CUPSD_AUTH_NONE :
+ return (NULL);
+
+ case CUPSD_AUTH_NEGOTIATE :
+ strlcpy(buffer, "negotiate", bufsize);
+ break;
+
+ default :
+ strlcpy(buffer, "username,password", bufsize);
+ break;
+ }
+
+ return (buffer);
+ }
+
+ return (NULL);
+}
+
+
#ifdef __APPLE__
/*
* 'get_hostconfig()' - Get an /etc/hostconfig service setting.
uri[1024], /* Printer URI */
location[1024], /* printer-location */
info[1024], /* printer-info */
- make_model[1024];
+ make_model[1024],
/* printer-make-and-model */
+ air[1024]; /* auth-info-required */
cupsd_netif_t *iface; /* Network interface */
else
strlcpy(make_model, "Local System V Printer", sizeof(make_model));
+ if (get_auth_info_required(p, packet, sizeof(packet)))
+ snprintf(air, sizeof(air), " auth-info-required=%s", packet);
+ else
+ air[0] = '\0';
+
/*
* Send a packet to each browse address...
*/
(p->type & CUPS_PRINTER_CLASS) ? "/classes/%s" :
"/printers/%s",
p->name);
- snprintf(packet, sizeof(packet), "%x %x %s \"%s\" \"%s\" \"%s\" %s\n",
+ snprintf(packet, sizeof(packet), "%x %x %s \"%s\" \"%s\" \"%s\" %s%s\n",
type, p->state, uri, location, info, make_model,
- p->browse_attrs ? p->browse_attrs : "");
+ p->browse_attrs ? p->browse_attrs : "", air);
bytes = strlen(packet);
(p->type & CUPS_PRINTER_CLASS) ? "/classes/%s" :
"/printers/%s",
p->name);
- snprintf(packet, sizeof(packet), "%x %x %s \"%s\" \"%s\" \"%s\" %s\n",
+ snprintf(packet, sizeof(packet),
+ "%x %x %s \"%s\" \"%s\" \"%s\" %s%s\n",
type, p->state, uri, location, info, make_model,
- p->browse_attrs ? p->browse_attrs : "");
+ p->browse_attrs ? p->browse_attrs : "", air);
bytes = strlen(packet);
* the default server name...
*/
- snprintf(packet, sizeof(packet), "%x %x %s \"%s\" \"%s\" \"%s\" %s\n",
+ snprintf(packet, sizeof(packet), "%x %x %s \"%s\" \"%s\" \"%s\" %s%s\n",
type, p->state, p->uri, location, info, make_model,
- p->browse_attrs ? p->browse_attrs : "");
+ p->browse_attrs ? p->browse_attrs : "", air);
bytes = strlen(packet);
cupsdLogMessage(CUPSD_LOG_DEBUG2,
* compare_active_jobs() - Compare the job IDs and priorities of two
* jobs.
* compare_jobs() - Compare the job IDs of two jobs.
+ * dump_job_history() - Dump any debug messages for a job.
+ * free_job_history() - Free any log history.
* finalize_job() - Cleanup after job filter processes and support
* data.
* get_options() - Get a string containing the job options.
static int compare_active_jobs(void *first, void *second, void *data);
static int compare_jobs(void *first, void *second, void *data);
+static void dump_job_history(cupsd_job_t *job);
static void finalize_job(cupsd_job_t *job);
+static void free_job_history(cupsd_job_t *job);
static char *get_options(cupsd_job_t *job, int banner_page, char *copies,
size_t copies_size, char *title,
size_t title_size);
cupsdSetPrinterState(job->printer, IPP_PRINTER_IDLE, 0);
update_job_attrs(job, 0);
+ if (job->history)
+ free_job_history(job);
+
cupsArrayRemove(PrintingJobs, job);
/*
job->num_files = 0;
}
+ if (job->history)
+ free_job_history(job);
+
unload_job(job);
cupsArrayRemove(Jobs, job);
}
+/*
+ * 'dump_job_history()' - Dump any debug messages for a job.
+ */
+
+static void
+dump_job_history(cupsd_job_t *job) /* I - Job */
+{
+ int i, /* Looping var */
+ oldsize; /* Current MaxLogSize */
+ struct tm *date; /* Date/time value */
+ cupsd_joblog_t *message; /* Current message */
+ char temp[2048], /* Log message */
+ *ptr, /* Pointer into log message */
+ start[256], /* Start time */
+ end[256]; /* End time */
+ cupsd_printer_t *printer; /* Printer for job */
+
+
+ /*
+ * See if we have anything to dump...
+ */
+
+ if (!job->history)
+ return;
+
+ /*
+ * Disable log rotation temporarily...
+ */
+
+ oldsize = MaxLogSize;
+ MaxLogSize = 0;
+
+ /*
+ * Copy the debug messages to the log...
+ */
+
+ message = (cupsd_joblog_t *)cupsArrayFirst(job->history);
+ date = localtime(&(message->time));
+ strftime(start, sizeof(start), "%X", date);
+
+ message = (cupsd_joblog_t *)cupsArrayLast(job->history);
+ date = localtime(&(message->time));
+ strftime(end, sizeof(end), "%X", date);
+
+ snprintf(temp, sizeof(temp),
+ "[Job %d] The following messages were recorded from %s to %s",
+ job->id, start, end);
+ cupsdWriteErrorLog(CUPSD_LOG_DEBUG, temp);
+
+ for (message = (cupsd_joblog_t *)cupsArrayFirst(job->history);
+ message;
+ message = (cupsd_joblog_t *)cupsArrayNext(job->history))
+ cupsdWriteErrorLog(CUPSD_LOG_DEBUG, message->message);
+
+ snprintf(temp, sizeof(temp), "[Job %d] End of messages", job->id);
+ cupsdWriteErrorLog(CUPSD_LOG_DEBUG, temp);
+
+ /*
+ * Log the printer state values...
+ */
+
+ if ((printer = job->printer) == NULL)
+ printer = cupsdFindDest(job->dest);
+
+ if (printer)
+ {
+ snprintf(temp, sizeof(temp), "[Job %d] printer-state=%d(%s)", job->id,
+ printer->state,
+ printer->state == IPP_PRINTER_IDLE ? "idle" :
+ printer->state == IPP_PRINTER_PROCESSING ? "processing" :
+ "stopped");
+ cupsdWriteErrorLog(CUPSD_LOG_DEBUG, temp);
+
+ snprintf(temp, sizeof(temp), "[Job %d] printer-state-message=\"%s\"",
+ job->id, printer->state_message);
+ cupsdWriteErrorLog(CUPSD_LOG_DEBUG, temp);
+
+ snprintf(temp, sizeof(temp), "[Job %d] printer-state-reasons=", job->id);
+ ptr = temp + strlen(temp);
+ if (printer->num_reasons == 0)
+ strlcpy(ptr, "none", sizeof(temp) - (ptr - temp));
+ else
+ {
+ for (i = 0;
+ i < printer->num_reasons && ptr < (temp + sizeof(temp) - 2);
+ i ++)
+ {
+ if (i)
+ *ptr++ = ',';
+
+ strlcpy(ptr, printer->reasons[i], sizeof(temp) - (ptr - temp));
+ ptr += strlen(ptr);
+ }
+ }
+ cupsdWriteErrorLog(CUPSD_LOG_DEBUG, temp);
+ }
+
+ /*
+ * Restore log file rotation...
+ */
+
+ MaxLogSize = oldsize;
+
+ /*
+ * Free all messages...
+ */
+
+ free_job_history(job);
+}
+
+
+/*
+ * 'free_job_history()' - Free any log history.
+ */
+
+static void
+free_job_history(cupsd_job_t *job) /* I - Job */
+{
+ char *message; /* Current message */
+
+
+ if (!job->history)
+ return;
+
+ for (message = (char *)cupsArrayFirst(job->history);
+ message;
+ message = (char *)cupsArrayNext(job->history))
+ free(message);
+
+ cupsArrayDelete(job->history);
+ job->history = NULL;
+}
+
+
/*
* 'finalize_job()' - Cleanup after job filter processes and support data.
*/
printer_state == IPP_PRINTER_STOPPED);
update_job_attrs(job, 0);
+ if (job->history)
+ {
+ if (job->status)
+ dump_job_history(job);
+ else
+ free_job_history(job);
+ }
+
cupsArrayRemove(PrintingJobs, job);
/*
{
int i; /* Looping var */
int copies; /* Number of copies printed */
- char message[1024], /* Message text */
+ char message[CUPSD_SB_BUFFER_SIZE],
+ /* Message text */
*ptr; /* Pointer update... */
int loglevel, /* Log level for message */
event = 0; /* Events? */
* Job request structure...
*/
-struct cupsd_job_s
+struct cupsd_job_s /**** Job request ****/
{
int id, /* Job ID */
priority, /* Job priority */
*auth_password; /* AUTH_PASSWORD environment variable,
* if any */
void *profile; /* Security profile */
+ cups_array_t *history; /* Debug log history */
int progress; /* Printing progress */
#ifdef HAVE_GSSAPI
krb5_ccache ccache; /* Kerberos credential cache */
#endif /* HAVE_GSSAPI */
};
+typedef struct cupsd_joblog_s /**** Job log message ****/
+{
+ time_t time; /* Time of message */
+ char message[1]; /* Message string */
+} cupsd_joblog_t;
+
/*
* Globals...
if (TestConfigFile || !ErrorLog)
return (1);
- if (level > LogLevel ||
- (level == CUPSD_LOG_INFO && LogLevel < CUPSD_LOG_DEBUG))
+ if ((level > LogLevel ||
+ (level == CUPSD_LOG_INFO && LogLevel < CUPSD_LOG_DEBUG)) &&
+ LogDebugHistory <= 0)
return (1);
/*
va_end(ap);
}
while (status == 0);
-
+
if (status > 0)
- return (cupsdWriteErrorLog(level, log_line));
+ {
+ if ((level > LogLevel ||
+ (level == CUPSD_LOG_INFO && LogLevel < CUPSD_LOG_DEBUG)) &&
+ LogDebugHistory > 0)
+ {
+ /*
+ * Add message to the job history...
+ */
+
+ cupsd_joblog_t *temp; /* Copy of log message */
+
+
+ if ((temp = malloc(sizeof(cupsd_joblog_t) + strlen(log_line))) != NULL)
+ {
+ temp->time = time(NULL);
+ strcpy(temp->message, log_line);
+ }
+
+ if (!job->history)
+ job->history = cupsArrayNew(NULL, NULL);
+
+ if (job->history && temp)
+ {
+ cupsArrayAdd(job->history, temp);
+
+ if (cupsArrayCount(job->history) > LogDebugHistory)
+ {
+ /*
+ * Remove excess messages...
+ */
+
+ temp = cupsArrayFirst(job->history);
+ cupsArrayRemove(job->history, temp);
+ free(temp);
+ }
+ }
+ else if (temp)
+ free(temp);
+
+ return (1);
+ }
+ else if (level <= LogLevel &&
+ (level != CUPSD_LOG_INFO || LogLevel >= CUPSD_LOG_DEBUG))
+ return (cupsdWriteErrorLog(level, log_line));
+ else
+ return (1);
+ }
else
return (cupsdWriteErrorLog(CUPSD_LOG_ERROR,
"Unable to allocate memory for log line!"));
ipp_attribute_t *attr; /* Attribute data */
cups_option_t *option; /* Current printer option */
char *filter; /* Current filter */
+ static const char * const air_none[] =
+ { /* No authentication */
+ "none"
+ };
static const char * const air_userpass[] =
{ /* Basic/Digest authentication */
"username",
"password"
};
-#ifdef HAVE_GSSAPI
- static const char * const air_negotiate[] =
- { /* Kerberos authentication */
- "negotiate"
- };
-#endif /* HAVE_GSSAPI */
- static const char * const air_none[] =
- { /* No authentication */
- "none"
- };
DEBUG_printf(("cupsdSetPrinterAttrs: entering name = %s, type = %x\n", p->name,
{
num_air = p->num_auth_info_required;
air = p->auth_info_required;
-
- if (!strcmp(air[0], "username"))
- auth_supported = "basic";
- else
- auth_supported = "negotiate";
}
- else if (!(p->type & CUPS_PRINTER_DISCOVERED))
+ else if ((p->type & CUPS_PRINTER_AUTHENTICATED) &&
+ (p->type & CUPS_PRINTER_DISCOVERED))
{
- if (p->type & CUPS_PRINTER_CLASS)
- snprintf(resource, sizeof(resource), "/classes/%s", p->name);
- else
- snprintf(resource, sizeof(resource), "/printers/%s", p->name);
+ num_air = 2;
+ air = air_userpass;
+ }
- if ((auth = cupsdFindBest(resource, HTTP_POST)) == NULL ||
- auth->type == CUPSD_AUTH_NONE)
- auth = cupsdFindPolicyOp(p->op_policy_ptr, IPP_PRINT_JOB);
+ if (p->type & CUPS_PRINTER_CLASS)
+ snprintf(resource, sizeof(resource), "/classes/%s", p->name);
+ else
+ snprintf(resource, sizeof(resource), "/printers/%s", p->name);
- if (auth)
- {
- int auth_type; /* Authentication type */
+ if ((auth = cupsdFindBest(resource, HTTP_POST)) == NULL ||
+ auth->type == CUPSD_AUTH_NONE)
+ auth = cupsdFindPolicyOp(p->op_policy_ptr, IPP_PRINT_JOB);
+ if (auth)
+ {
+ int auth_type; /* Authentication type */
- if ((auth_type = auth->type) == CUPSD_AUTH_DEFAULT)
- auth_type = DefaultAuthType;
- if (auth_type == CUPSD_AUTH_BASIC || auth_type == CUPSD_AUTH_BASICDIGEST)
- {
- auth_supported = "basic";
- num_air = 2;
- air = air_userpass;
- }
- else if (auth_type == CUPSD_AUTH_DIGEST)
- {
- auth_supported = "digest";
- num_air = 2;
- air = air_userpass;
- }
+ if ((auth_type = auth->type) == CUPSD_AUTH_DEFAULT)
+ auth_type = DefaultAuthType;
+
+ if (auth_type == CUPSD_AUTH_BASIC || auth_type == CUPSD_AUTH_BASICDIGEST)
+ auth_supported = "basic";
+ else if (auth_type == CUPSD_AUTH_DIGEST)
+ auth_supported = "digest";
#ifdef HAVE_GSSAPI
- else if (auth_type == CUPSD_AUTH_NEGOTIATE)
- {
- auth_supported = "negotiate";
- num_air = 1;
- air = air_negotiate;
- }
+ else if (auth_type == CUPSD_AUTH_NEGOTIATE)
+ auth_supported = "negotiate";
#endif /* HAVE_GSSAPI */
+ if (!(p->type & CUPS_PRINTER_DISCOVERED))
+ {
if (auth_type != CUPSD_AUTH_NONE)
- p->type |= CUPS_PRINTER_AUTHENTICATED;
+ p->type |= CUPS_PRINTER_AUTHENTICATED;
else
- p->type &= ~CUPS_PRINTER_AUTHENTICATED;
+ p->type &= ~CUPS_PRINTER_AUTHENTICATED;
}
- else
- p->type &= ~CUPS_PRINTER_AUTHENTICATED;
- }
- else if (p->type & CUPS_PRINTER_AUTHENTICATED)
- {
- num_air = 2;
- air = air_userpass;
}
+ else if (!(p->type & CUPS_PRINTER_DISCOVERED))
+ p->type &= ~CUPS_PRINTER_AUTHENTICATED;
/*
* Create the required IPP attributes for a printer...
if (BrowseLocalOptions)
length += 12 + strlen(BrowseLocalOptions);
- if (p->num_auth_info_required > 0)
- {
- length += 18; /* auth-info-required */
-
- for (i = 0; i < p->num_auth_info_required; i ++)
- length += strlen(p->auth_info_required[i]) + 1;
- }
-
/*
* Allocate the new string...
*/
}
}
}
-
- if (p->num_auth_info_required > 0)
- {
- strcpy(attrptr, "auth-info-required");
- attrptr += 18;
-
- for (i = 0; i < p->num_auth_info_required; i ++)
- {
- *attrptr++ = i ? ',' : '=';
- strcpy(attrptr, p->auth_info_required[i]);
- attrptr += strlen(attrptr);
- }
- }
- else
- *attrptr = '\0';
}
}
cupsdSetPrinterState(p, IPP_PRINTER_IDLE, 1);
if (strcmp(reason, "connecting-to-device"))
+ {
cupsdMarkDirty(CUPSD_DIRTY_PRINTERS);
- if (PrintcapFormat == PRINTCAP_PLIST)
- cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP);
-
+ if (PrintcapFormat == PRINTCAP_PLIST)
+ cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP);
+ }
break;
}
}
cupsdSetPrinterState(p, IPP_PRINTER_STOPPED, 1);
if (strcmp(reason, "connecting-to-device"))
+ {
cupsdMarkDirty(CUPSD_DIRTY_PRINTERS);
- if (PrintcapFormat == PRINTCAP_PLIST)
- cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP);
+ if (PrintcapFormat == PRINTCAP_PLIST)
+ cupsdMarkDirty(CUPSD_DIRTY_PRINTCAP);
+ }
}
}
}
}
ippAddString(p->ppd_attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD,
- "output-bin-default", NULL, output_bin->defchoice);
+ "output-bin-default", NULL, output_bin->defchoice);
}
/*
*/
#include "cupsd.h"
+#ifdef HAVE_VPROC_TRANSACTION_BEGIN
+# include <vproc.h>
+#endif /* HAVE_VPROC_TRANSACTION_BEGIN */
/*
"Active clients and printing jobs",
"Active clients, printing jobs, and dirty files"
};
+#ifdef HAVE_VPROC_TRANSACTION_BEGIN
+ static vproc_transaction_t vtran = 0; /* Current busy transaction */
+#endif /* HAVE_VPROC_TRANSACTION_BEGIN */
newbusy = (DirtyCleanTime ? 1 : 0) |
{
busy = newbusy;
+#ifdef HAVE_VPROC_TRANSACTION_BEGIN
+ if (busy && !vtran)
+ vtran = vproc_transaction_begin(NULL);
+ else if (!busy && vtran)
+ {
+ vproc_transaction_end(NULL, vtran);
+ vtran = 0;
+ }
+#endif /* HAVE_VPROC_TRANSACTION_BEGIN */
+
cupsdLogMessage(CUPSD_LOG_DEBUG, "cupsdSetBusyState: %s", busy_text[busy]);
}
}
#
RFCS = \
+ rfc1155.txt \
+ rfc1157.txt \
rfc1179.txt \
+ rfc1213.txt \
rfc1321.txt \
rfc2222.txt \
rfc2246.txt \
rfc2567.txt \
rfc2568.txt \
rfc2569.txt \
+ rfc2578.txt \
rfc2595.txt \
rfc2616.txt \
rfc2617.txt \
rfc2712.txt \
+ rfc2790.txt \
rfc2817.txt \
rfc2818.txt \
rfc2821.txt \
rfc3391.txt \
rfc3510.txt \
rfc3712.txt \
+ rfc3805.txt \
+ rfc3875.txt \
rfc3986.txt \
rfc3995.txt \
rfc3996.txt \
rfc3997.txt \
- rfc3998.txt
+ rfc3998.txt \
+ rfc4122.txt \
+ rfc4234.txt
.SUFFIXES: .html .txt
.txt.html: rfctohtml
rfctohtml: rfctohtml.o ../cups/libcups.a
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ rfctohtml.o ../cups/libcups.a \
- $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
+ $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ)
#
*outfile; /* Output file */
char line[1024], /* Line from file */
*lineptr, /* Pointer into line */
+ title[2048], /* Title string */
+ *titleptr, /* Pointer into title */
name[1024], /* Heading anchor name */
*nameptr; /* Pointer into anchor name */
int rfc, /* RFC # */
"<html>\n"
"<!-- SECTION: Specifications -->\n"
"<head>\n"
- "\t<style type='text/css'><!--\n"
- "\th1, h2, h3 { font-family: sans-serif; }\n"
- "\tp, pre { font-family: monospace; }\n"
- "\th2.title, h3.title, h3.title { border-bottom: solid "
- "2px #000000; }\n"
- "\t--></style>\n");
+ "\t<link rel=\"stylesheet\" type=\"text/css\" "
+ "href=\"../cups-printable.css\">\n");
/*
* Skip the initial header stuff (working group ID, RFC #, authors, and
for (lineptr = line; isspace(*lineptr & 255); lineptr ++);
- cupsFilePrintf(outfile, "<title>RFC %d: %s", rfc, lineptr);
+ snprintf(title, sizeof(title), "RFC %d: %s", rfc, lineptr);
+ titleptr = title + strlen(title);
while (cupsFileGets(infile, line, sizeof(line)))
{
else
{
for (lineptr = line; isspace(*lineptr & 255); lineptr ++);
- cupsFilePrintf(outfile, " %s", lineptr);
+
+ snprintf(titleptr, sizeof(title) - (titleptr - title), " %s", lineptr);
+ titleptr += strlen(titleptr);
}
}
- cupsFilePuts(outfile, "</title>\n"
- "</head>\n"
- "<body>\n");
+ cupsFilePrintf(outfile, "\t<title>%s</title>\n"
+ "</head>\n"
+ "<body>\n"
+ "<h1 class='title'>%s</h1>\n", title, title);
/*
* Read the rest of the file...
if (inheading)
{
if (inheading < 0)
- cupsFilePuts(outfile, "</h1>\n");
+ cupsFilePuts(outfile, "</h2>\n");
else
cupsFilePrintf(outfile, "</a></h%d>\n", inheading);
if (inheading)
{
if (inheading < 0)
- cupsFilePuts(outfile, "</h1>\n");
+ cupsFilePuts(outfile, "</h2>\n");
else
cupsFilePrintf(outfile, "</a></h%d>\n", inheading);
{
"MAY",
"MUST",
+ "NEED",
"NOT",
+ "OPTIONAL",
+ "OPTIONALLY",
+ "RECOMMENDED",
+ "REQUIRED",
"SHALL",
"SHOULD"
};
for (i = 0; i < (int)(sizeof(keywords) / sizeof(sizeof(keywords[0]))); i ++)
{
len = strlen(keywords[i]);
- if (!strncmp(s, keywords[i], len) && (isspace(s[len] & 255) || !*s))
+ if (!strncmp(s, keywords[i], len) &&
+ (isspace(s[len] & 255) || ispunct(s[len] & 255) || !*s))
{
cupsFilePrintf(fp, "<b>%s</b>", keywords[i]);
s += len;
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
</HEAD>
<BODY>
-
-<H1>{HELPTITLE}</H1>
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
</HEAD>
<BODY>
-
-<H1>{HELPTITLE}</H1>
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
</HEAD>
<BODY>
-
-<H1>{HELPTITLE}</H1>
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
</HEAD>
<BODY>
-
-<H1>{HELPTITLE}</H1>
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
</HEAD>
<BODY>
-
-<H1>{HELPTITLE}</H1>
<LINK REL="SHORTCUT ICON" HREF="/images/cups-icon.png" TYPE="image/png">
</HEAD>
<BODY>
-
-<H1>{HELPTITLE}</H1>