This commit is contained in:
yuuki-hirano
2019-09-25 14:33:12 +09:00
parent face7270f9
commit ac391fa912
208 changed files with 21593 additions and 28445 deletions

View File

@@ -1,43 +1,26 @@
error.o: error.c ../cups/raster-private.h ../cups/raster.h ../cups/cups.h \
../cups/file.h ../cups/versioning.h ../cups/ipp.h ../cups/http.h \
../cups/array.h ../cups/language.h ../cups/pwg.h \
../cups/debug-private.h ../cups/string-private.h ../config.h
interpret.o: interpret.c ../cups/raster-private.h ../cups/raster.h \
../cups/cups.h ../cups/file.h ../cups/versioning.h ../cups/ipp.h \
../cups/http.h ../cups/array.h ../cups/language.h ../cups/pwg.h \
../cups/debug-private.h ../cups/string-private.h ../config.h \
../cups/ppd.h
raster.o: raster.c ../cups/raster-private.h ../cups/raster.h \
../cups/cups.h ../cups/file.h ../cups/versioning.h ../cups/ipp.h \
../cups/http.h ../cups/array.h ../cups/language.h ../cups/pwg.h \
../cups/debug-private.h ../cups/string-private.h ../config.h
commandtops.o: commandtops.c ../cups/cups-private.h \
../cups/string-private.h ../config.h ../cups/debug-private.h \
../cups/versioning.h ../cups/array-private.h ../cups/array.h \
../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
../cups/ppd.h ../cups/raster.h ../cups/sidechannel.h
gziptoany.o: gziptoany.c ../cups/cups-private.h ../cups/string-private.h \
../config.h ../cups/debug-private.h ../cups/versioning.h \
../cups/string-private.h ../config.h ../cups/versioning.h \
../cups/array-private.h ../cups/array.h ../cups/ipp-private.h \
../cups/ipp.h ../cups/http.h ../cups/http-private.h ../cups/language.h \
../cups/md5-private.h ../cups/language-private.h ../cups/transcode.h \
../cups/pwg-private.h ../cups/cups.h ../cups/file.h ../cups/pwg.h \
../cups/thread-private.h
../cups/cups.h ../cups/file.h ../cups/ipp.h ../cups/http.h \
../cups/language.h ../cups/pwg.h ../cups/http-private.h \
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
../cups/thread-private.h ../cups/ppd.h ../cups/raster.h \
../cups/sidechannel.h
gziptoany.o: gziptoany.c ../cups/cups-private.h ../cups/string-private.h \
../config.h ../cups/versioning.h ../cups/array-private.h \
../cups/array.h ../cups/ipp-private.h ../cups/cups.h ../cups/file.h \
../cups/ipp.h ../cups/http.h ../cups/language.h ../cups/pwg.h \
../cups/http-private.h ../cups/language-private.h ../cups/transcode.h \
../cups/pwg-private.h ../cups/thread-private.h
common.o: common.c common.h ../cups/string-private.h ../config.h \
../cups/cups.h ../cups/file.h ../cups/versioning.h ../cups/ipp.h \
../cups/versioning.h ../cups/cups.h ../cups/file.h ../cups/ipp.h \
../cups/http.h ../cups/array.h ../cups/language.h ../cups/pwg.h \
../cups/ppd.h ../cups/raster.h
pstops.o: pstops.c common.h ../cups/string-private.h ../config.h \
../cups/cups.h ../cups/file.h ../cups/versioning.h ../cups/ipp.h \
../cups/versioning.h ../cups/cups.h ../cups/file.h ../cups/ipp.h \
../cups/http.h ../cups/array.h ../cups/language.h ../cups/pwg.h \
../cups/ppd.h ../cups/raster.h ../cups/language-private.h \
../cups/transcode.h
rasterbench.o: rasterbench.c ../config.h ../cups/raster.h ../cups/cups.h \
../cups/file.h ../cups/versioning.h ../cups/ipp.h ../cups/http.h \
../cups/array.h ../cups/language.h ../cups/pwg.h
rastertoepson.o: rastertoepson.c ../cups/cups.h ../cups/file.h \
../cups/versioning.h ../cups/ipp.h ../cups/http.h ../cups/array.h \
../cups/language.h ../cups/pwg.h ../cups/ppd.h ../cups/raster.h \
@@ -54,15 +37,10 @@ rastertolabel.o: rastertolabel.c ../cups/cups.h ../cups/file.h \
../cups/string-private.h ../config.h ../cups/language-private.h \
../cups/transcode.h
rastertopwg.o: rastertopwg.c ../cups/cups-private.h \
../cups/string-private.h ../config.h ../cups/debug-private.h \
../cups/versioning.h ../cups/array-private.h ../cups/array.h \
../cups/ipp-private.h ../cups/ipp.h ../cups/http.h \
../cups/http-private.h ../cups/language.h ../cups/md5-private.h \
../cups/string-private.h ../config.h ../cups/versioning.h \
../cups/array-private.h ../cups/array.h ../cups/ipp-private.h \
../cups/cups.h ../cups/file.h ../cups/ipp.h ../cups/http.h \
../cups/language.h ../cups/pwg.h ../cups/http-private.h \
../cups/language-private.h ../cups/transcode.h ../cups/pwg-private.h \
../cups/cups.h ../cups/file.h ../cups/pwg.h ../cups/thread-private.h \
../cups/ppd-private.h ../cups/ppd.h ../cups/raster.h
testraster.o: testraster.c ../cups/raster-private.h ../cups/raster.h \
../cups/cups.h ../cups/file.h ../cups/versioning.h ../cups/ipp.h \
../cups/http.h ../cups/array.h ../cups/language.h ../cups/pwg.h \
../cups/debug-private.h ../cups/string-private.h ../config.h \
../cups/ppd.h
../cups/thread-private.h ../cups/ppd-private.h ../cups/ppd.h \
../cups/raster.h

View File

@@ -1,22 +1,17 @@
#
# Filter makefile for CUPS.
#
# Copyright 2007-2012 by Apple Inc.
# Copyright 1997-2006 by Easy Software Products.
# Copyright © 2007-2019 by Apple Inc.
# Copyright © 1997-2006 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
# missing or damaged, see the license at "http://www.cups.org/".
#
# This file is subject to the Apple OS-Developed Software exception.
# Licensed under Apache License v2.0. See the file "LICENSE" for more
# information.
#
include ../Makedefs
FILTERS = \
TARGETS = \
commandtops \
gziptoany \
pstops \
@@ -24,21 +19,10 @@ FILTERS = \
rastertohp \
rastertolabel \
rastertopwg
LIBTARGETS = \
$(LIBCUPSIMAGE) \
libcupsimage.a
UNITTARGETS = \
rasterbench \
testraster
TARGETS = \
$(LIBTARGETS) \
$(FILTERS)
IMAGEOBJS = error.o interpret.o raster.o
OBJS = $(IMAGEOBJS) \
commandtops.o gziptoany.o common.o pstops.o \
rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
rastertopwg.o testraster.o
OBJS = commandtops.o gziptoany.o common.o pstops.o \
rastertoepson.o rastertohp.o rastertolabel.o \
rastertopwg.o
#
@@ -52,14 +36,14 @@ all: $(TARGETS)
# Make library targets...
#
libs: $(LIBTARGETS)
libs:
#
# Make unit tests...
#
unittests: $(UNITTARGETS)
unittests:
#
@@ -67,8 +51,7 @@ unittests: $(UNITTARGETS)
#
clean:
$(RM) $(OBJS) $(TARGETS) $(UNITTARGETS)
$(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib
$(RM) $(OBJS) $(TARGETS)
#
@@ -99,14 +82,12 @@ install-data:
install-exec:
$(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
for file in $(FILTERS); do \
for file in $(TARGETS); do \
$(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
done
$(RM) $(SERVERBIN)/filter/rastertodymo
$(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo
if test "x$(SYMROOT)" != "x"; then \
$(INSTALL_DIR) $(SYMROOT); \
for file in $(FILTERS); do \
for file in $(TARGETS); do \
cp $$file $(SYMROOT); \
dsymutil $(SYMROOT)/$$file; \
done \
@@ -124,28 +105,7 @@ install-headers:
# Install libraries...
#
install-libs: $(INSTALLSTATIC)
$(INSTALL_DIR) -m 755 $(LIBDIR)
$(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR)
-if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \
$(RM) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
$(LN) $(LIBCUPSIMAGE) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
fi
-if test $(LIBCUPSIMAGE) = "libcupsimage.2.dylib"; then \
$(RM) $(LIBDIR)/libcupsimage.dylib; \
$(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \
fi
if test "x$(SYMROOT)" != "x"; then \
$(INSTALL_DIR) $(SYMROOT); \
cp $(LIBCUPSIMAGE) $(SYMROOT); \
dsymutil $(SYMROOT)/$(LIBCUPSIMAGE); \
fi
installstatic:
$(INSTALL_DIR) -m 755 $(LIBDIR)
$(INSTALL_LIB) -m 755 libcupsimage.a $(LIBDIR)
$(RANLIB) $(LIBDIR)/libcupsimage.a
$(CHMOD) 555 $(LIBDIR)/libcupsimage.a
install-libs:
#
@@ -153,21 +113,11 @@ installstatic:
#
uninstall:
for file in $(FILTERS); do \
for file in $(TARGETS); do \
$(RM) $(SERVERBIN)/filter/$$file; \
done
$(RM) $(SERVERBIN)/filter/rastertodymo
-$(RMDIR) $(SERVERBIN)/filter
-$(RMDIR) $(SERVERBIN)
$(RM) $(LIBDIR)/libcupsimage.2.dylib
$(RM) $(LIBDIR)/libcupsimage.a
$(RM) $(LIBDIR)/libcupsimage.dylib
$(RM) $(LIBDIR)/libcupsimage_s.a
$(RM) $(LIBDIR)/libcupsimage.sl
$(RM) $(LIBDIR)/libcupsimage.sl.2
$(RM) $(LIBDIR)/libcupsimage.so
$(RM) $(LIBDIR)/libcupsimage.so.2
-$(RMDIR) $(LIBDIR)
#
@@ -176,37 +126,29 @@ uninstall:
apihelp:
echo Generating CUPS API help files...
mxmldoc --section "Programming" --title "Raster API" \
--css ../doc/cups-printable.css \
--header api-raster.header --intro api-raster.shtml \
api-raster.xml \
../cups/raster.h interpret.c raster.c \
>../doc/help/api-raster.html
mxmldoc --tokens help/api-raster.html api-raster.xml >../doc/help/api-raster.tokens
$(RM) api-raster.xml
mxmldoc --section "Programming" \
codedoc --section "Programming" \
--title "Developing PostScript Printer Drivers" \
--css ../doc/cups-printable.css \
--header postscript-driver.header \
--intro postscript-driver.shtml \
--body postscript-driver.shtml \
>../doc/help/postscript-driver.html
mxmldoc --section "Programming" \
codedoc --section "Programming" \
--title "Introduction to the PPD Compiler" \
--css ../doc/cups-printable.css \
--header ppd-compiler.header \
--intro ppd-compiler.shtml \
--body ppd-compiler.shtml \
>../doc/help/ppd-compiler.html
mxmldoc --section "Programming" \
codedoc --section "Programming" \
--title "Developing Raster Printer Drivers" \
--css ../doc/cups-printable.css \
--header raster-driver.header \
--intro raster-driver.shtml \
--body raster-driver.shtml \
>../doc/help/raster-driver.html
mxmldoc --section "Specifications" \
codedoc --section "Specifications" \
--title "CUPS PPD Extensions" \
--css ../doc/cups-printable.css \
--header spec-ppd.header \
--intro spec-ppd.shtml \
--body spec-ppd.shtml \
>../doc/help/spec-ppd.html
@@ -216,7 +158,8 @@ apihelp:
commandtops: commandtops.o ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ commandtops.o $(LIBS)
$(LD_CC) $(ALL_LDFLAGS) -o $@ commandtops.o $(LINKCUPS)
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
#
@@ -225,68 +168,8 @@ commandtops: commandtops.o ../cups/$(LIBCUPS)
gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
#
# libcupsimage.so.2, libcupsimage.sl.2
#
libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS)
echo Linking $@...
$(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \
-L../cups $(LINKCUPS)
$(RM) `basename $@ .2`
$(LN) $@ `basename $@ .2`
#
# libcupsimage.2.dylib
#
libcupsimage.2.dylib: $(IMAGEOBJS) $(LIBCUPSIMAGEORDER)
echo Linking $@...
$(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
-install_name $(libdir)/$@ \
-current_version 2.3.0 \
-compatibility_version 2.0.0 \
$(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS)
$(RM) libcupsimage.dylib
$(LN) $@ libcupsimage.dylib
#
# libcupsimage_s.a
#
libcupsimage_s.a: $(IMAGEOBJS) libcupsimage_s.exp
echo Linking $@...
$(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \
-o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS)
$(RM) $@
$(AR) $(ARFLAGS) $@ libcupsimage_s.o
#
# libcupsimage.la
#
libcupsimage.la: $(IMAGEOBJS)
echo Linking $@...
$(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \
-L../cups $(LINKCUPS) \
-rpath $(LIBDIR) -version-info 2:3
#
# libcupsimage.a
#
libcupsimage.a: $(IMAGEOBJS)
echo Archiving $@...
$(RM) $@
$(AR) $(ARFLAGS) $@ $(IMAGEOBJS)
$(RANLIB) $@
$(LD_CC) $(ALL_LDFLAGS) -o $@ gziptoany.o $(LINKCUPS)
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
#
@@ -295,71 +178,53 @@ libcupsimage.a: $(IMAGEOBJS)
pstops: pstops.o common.o ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS)
$(LD_CC) $(ALL_LDFLAGS) -o $@ pstops.o common.o $(LINKCUPS)
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
#
# rastertoepson
#
rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
rastertoepson: rastertoepson.o ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
$(LD_CC) $(ALL_LDFLAGS) -o $@ rastertoepson.o $(LINKCUPS)
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
#
# rastertohp
#
rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
rastertohp: rastertohp.o ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
$(LD_CC) $(ALL_LDFLAGS) -o $@ rastertohp.o $(LINKCUPS)
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
#
# rastertolabel
#
rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
rastertolabel: rastertolabel.o ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
$(LD_CC) $(ALL_LDFLAGS) -o $@ rastertolabel.o $(LINKCUPS)
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
#
# rastertopwg
#
rastertopwg: rastertopwg.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
rastertopwg: rastertopwg.o ../cups/$(LIBCUPS)
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ rastertopwg.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
$(LD_CC) $(ALL_LDFLAGS) -o $@ rastertopwg.o $(LINKCUPS)
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
rastertopwg-static: rastertopwg.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
rastertopwg-static: rastertopwg.o ../cups/$(LIBCUPSSTATIC)
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ rastertopwg.o libcupsimage.a \
../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
$(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
#
# testraster
#
testraster: testraster.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
echo Linking $@...
$(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testraster.o libcupsimage.a \
../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
$(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
echo Running raster API tests...
./testraster
#
# rasterbench
#
rasterbench: rasterbench.o libcupsimage.a
echo Linking $@...
$(CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS)
$(LD_CC) $(ALL_LDFLAGS) -o $@ rastertopwg.o $(LINKCUPSSTATIC)
$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
#

View File

@@ -1,35 +0,0 @@
<!--
Raster API documentation for CUPS.
Copyright 2008-2010 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'>Raster API</h1>
<div class='summary'><table summary='General Information'>
<thead>
<tr>
<th>Header</th>
<th>cups/raster.h</th>
</tr>
</thead>
<tbody>
<tr>
<th>Library</th>
<td>-lcupsimage</td>
</tr>
<tr>
<th>See Also</th>
<td>Programming: <a href='api-overview.html'>Introduction to CUPS Programming</a><br>
Programming: <a href='api-cups.html'>CUPS API</a><br>
Programming: <a href='api-cups.html'>PPD API</a><br>
References: <a href='spec-ppd.html'>CUPS PPD Specification</a></td>
</tr>
</tbody>
</table></div>

View File

@@ -1,158 +0,0 @@
<!--
Raster API introduction for CUPS.
Copyright 2007-2013 by Apple Inc.
Copyright 1997-2006 by Easy Software Products, all rights reserved.
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 CUPS raster API provides a standard interface for reading and writing
CUPS raster streams which are used for printing to raster printers. Because the
raster format is updated from time to time, it is important to use this API to
avoid incompatibilities with newer versions of CUPS.</p>
<p>Two kinds of CUPS filters use the CUPS raster API - raster image processor
(RIP) filters such as <code>pstoraster</code> and <code>cgpdftoraster</code>
(macOS) that produce CUPS raster files and printer driver filters that
convert CUPS raster files into a format usable by the printer. Printer
driver filters are by far the most common.</p>
<p>CUPS raster files (<code>application/vnd.cups-raster</code>) consists of
a stream of raster page descriptions produced by one of the RIP filters such as
<var>pstoraster</var>, <var>imagetoraster</var>, or
<var>cgpdftoraster</var>. CUPS raster files are referred to using the
<a href='#cups_raster_t'><code>cups_raster_t</code></a> type and are
opened using the <a href='#cupsRasterOpen'><code>cupsRasterOpen</code></a>
function. For example, to read raster data from the standard input, open
file descriptor 0:</p>
<pre class="example">
#include &lt;cups/raster.h&gt;
<a href="#cups_raster_t">cups_raster_t</a> *ras = <a href="#cupsRasterOpen">cupsRasterOpen</a>(0, CUPS_RASTER_READ);
</pre>
<p>Each page of data begins with a page dictionary structure called
<a href="#cups_page_header2_t"><code>cups_page_header2_t</code></a>. This
structure contains the colorspace, bits per color, media size, media type,
hardware resolution, and so forth used for the page.</p>
<blockquote><b>Note:</b>
<p>Do not confuse the colorspace in the page header with the PPD
<tt>ColorModel</tt> keyword. <tt>ColorModel</tt> refers to the general type of
color used for a device (Gray, RGB, CMYK, DeviceN) and is often used to
select a particular colorspace for the page header along with the associate
color profile. The page header colorspace (<tt>cupsColorSpace</tt>) describes
both the type and organization of the color data, for example KCMY (black
first) instead of CMYK and RGBA (RGB + alpha) instead of RGB.</p>
</blockquote>
<p>You read the page header using the
<a href="#cupsRasterReadHeader2"><code>cupsRasterReadHeader2</code></a>
function:</p>
<pre class="example">
#include &lt;cups/raster.h&gt;
<a href="#cups_raster_t">cups_raster_t</a> *ras = <a href="#cupsRasterOpen">cupsRasterOpen</a>(0, CUPS_RASTER_READ);
<a href="#cups_page_header2_t">cups_page_header2_t</a> header;
while (<a href="#cupsRasterReadHeader2">cupsRasterReadHeader2</a>(ras, &amp;header))
{
/* setup this page */
/* read raster data */
/* finish this page */
}
</pre>
<p>After the page dictionary comes the page data which is a full-resolution,
possibly compressed bitmap representing the page in the printer's output
colorspace. You read uncompressed raster data using the
<a href="#cupsRasterReadPixels"><code>cupsRasterReadPixels</code></a>
function. A <code>for</code> loop is normally used to read the page one line
at a time:</p>
<pre class="example">
#include &lt;cups/raster.h&gt;
<a href="#cups_raster_t">cups_raster_t</a> *ras = <a href="#cupsRasterOpen">cupsRasterOpen</a>(0, CUPS_RASTER_READ);
<a href="#cups_page_header2_t">cups_page_header2_t</a> header;
int page = 0;
int y;
char *buffer;
while (<a href="#cupsRasterReadHeader2">cupsRasterReadHeader2</a>(ras, &amp;header))
{
/* setup this page */
page ++;
fprintf(stderr, "PAGE: %d %d\n", page, header.NumCopies);
/* allocate memory for 1 line */
buffer = malloc(header.cupsBytesPerLine);
/* read raster data */
for (y = 0; y &lt; header.cupsHeight; y ++)
{
if (<a href="#cupsRasterReadPixels">cupsRasterReadPixels</a>(ras, buffer, header.cupsBytesPerLine) == 0)
break;
/* write raster data to printer on stdout */
}
/* finish this page */
}
</pre>
<p>When you are done reading the raster data, call the
<a href="#cupsRasterClose"><code>cupsRasterClose</code></a> function to free
the memory used to read the raster file:</p>
<pre class="example">
<a href="#cups_raster_t">cups_raster_t</a> *ras;
<a href="#cupsRasterClose">cupsRasterClose</a>(ras);
</pre>
<h2 class='title'><a name="TASKS">Functions by Task</a></h2>
<h3><a name="OPENCLOSE">Opening and Closing Raster Streams</a></h3>
<ul class="code">
<li><a href="#cupsRasterClose" title="Close a raster stream.">cupsRasterClose</a></li>
<li><a href="#cupsRasterOpen" title="Open a raster stream.">cupsRasterOpen</a></li>
</ul>
<h3><a name="READING">Reading Raster Streams</a></h3>
<ul class="code">
<li><a href="#cupsRasterReadHeader" title="Read a raster page header and store it in a version 1 page header structure.">cupsRasterReadHeader</a> <span class="info">Deprecated in CUPS 1.2/macOS 10.5</span></li>
<li><a href="#cupsRasterReadHeader2" title="Read a raster page header and store it in a version 2 page header structure.">cupsRasterReadHeader2</a></li>
<li><a href="#cupsRasterReadPixels" title="Read raster pixels.">cupsRasterReadPixels</a></li>
</ul>
<h3><a name="WRITING">Writing Raster Streams</a></h3>
<ul class="code">
<li><a href="#cupsRasterInterpretPPD" title="Interpret PPD commands to create a page header.">cupsRasterInterpretPPD</a></li>
<li><a href="#cupsRasterWriteHeader" title="Write a raster page header from a version 1 page header structure.">cupsRasterWriteHeader</a> <span class="info">Deprecated in CUPS 1.2/macOS 10.5</span></li>
<li><a href="#cupsRasterWriteHeader2" title="Write a raster page header from a version 2 page header structure.">cupsRasterWriteHeader2</a></li>
<li><a href="#cupsRasterWritePixels" title="Write raster pixels.">cupsRasterWritePixels</a></li>
</ul>

View File

@@ -3,11 +3,7 @@
*
* Copyright 2008-2014 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
* missing or damaged, see the license at "http://www.cups.org/".
* Licensed under Apache License v2.0. See the file "LICENSE" for more information.
*/
/*

View File

@@ -4,13 +4,7 @@
* Copyright 2007-2014 by Apple Inc.
* Copyright 1997-2006 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
* missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
* Licensed under Apache License v2.0. See the file "LICENSE" for more information.
*/
/*

View File

@@ -4,13 +4,7 @@
* Copyright 2007-2010 by Apple Inc.
* Copyright 1997-2006 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
* missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
* Licensed under Apache License v2.0. See the file "LICENSE" for more information.
*/
/*

View File

@@ -1,272 +0,0 @@
/*
* Raster error handling for CUPS.
*
* Copyright 2007-2015 by Apple Inc.
* Copyright 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
* missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*/
/*
* Include necessary headers...
*/
#include <cups/raster-private.h>
/*
* Local structures...
*/
typedef struct _cups_raster_error_s /**** Error buffer structure ****/
{
char *start, /* Start of buffer */
*current, /* Current position in buffer */
*end; /* End of buffer */
} _cups_raster_error_t;
/*
* Local functions...
*/
static _cups_raster_error_t *get_error_buffer(void);
/*
* '_cupsRasterAddError()' - Add an error message to the error buffer.
*/
void
_cupsRasterAddError(const char *f, /* I - Printf-style error message */
...) /* I - Additional arguments as needed */
{
_cups_raster_error_t *buf = get_error_buffer();
/* Error buffer */
va_list ap; /* Pointer to additional arguments */
char s[2048]; /* Message string */
ssize_t bytes; /* Bytes in message string */
DEBUG_printf(("_cupsRasterAddError(f=\"%s\", ...)", f));
va_start(ap, f);
bytes = vsnprintf(s, sizeof(s), f, ap);
va_end(ap);
if (bytes <= 0)
return;
DEBUG_printf(("1_cupsRasterAddError: %s", s));
bytes ++;
if ((size_t)bytes >= sizeof(s))
return;
if (bytes > (ssize_t)(buf->end - buf->current))
{
/*
* Allocate more memory...
*/
char *temp; /* New buffer */
size_t size; /* Size of buffer */
size = (size_t)(buf->end - buf->start + 2 * bytes + 1024);
if (buf->start)
temp = realloc(buf->start, size);
else
temp = malloc(size);
if (!temp)
return;
/*
* Update pointers...
*/
buf->end = temp + size;
buf->current = temp + (buf->current - buf->start);
buf->start = temp;
}
/*
* Append the message to the end of the current string...
*/
memcpy(buf->current, s, (size_t)bytes);
buf->current += bytes - 1;
}
/*
* '_cupsRasterClearError()' - Clear the error buffer.
*/
void
_cupsRasterClearError(void)
{
_cups_raster_error_t *buf = get_error_buffer();
/* Error buffer */
buf->current = buf->start;
if (buf->start)
*(buf->start) = '\0';
}
/*
* 'cupsRasterErrorString()' - Return the last error from a raster function.
*
* If there are no recent errors, NULL is returned.
*
* @since CUPS 1.3/macOS 10.5@
*/
const char * /* O - Last error */
cupsRasterErrorString(void)
{
_cups_raster_error_t *buf = get_error_buffer();
/* Error buffer */
if (buf->current == buf->start)
return (NULL);
else
return (buf->start);
}
#ifdef HAVE_PTHREAD_H
/*
* Implement per-thread globals...
*/
# include <pthread.h>
/*
* Local globals...
*/
static pthread_key_t raster_key = 0; /* Thread local storage key */
static pthread_once_t raster_key_once = PTHREAD_ONCE_INIT;
/* One-time initialization object */
/*
* Local functions...
*/
static void raster_init(void);
static void raster_destructor(void *value);
/*
* 'get_error_buffer()' - Return a pointer to thread local storage.
*/
_cups_raster_error_t * /* O - Pointer to error buffer */
get_error_buffer(void)
{
_cups_raster_error_t *buf; /* Pointer to error buffer */
/*
* Initialize the global data exactly once...
*/
DEBUG_puts("3get_error_buffer()");
pthread_once(&raster_key_once, raster_init);
/*
* See if we have allocated the data yet...
*/
if ((buf = (_cups_raster_error_t *)pthread_getspecific(raster_key))
== NULL)
{
DEBUG_puts("4get_error_buffer: allocating memory for thread.");
/*
* No, allocate memory as set the pointer for the key...
*/
buf = calloc(1, sizeof(_cups_raster_error_t));
pthread_setspecific(raster_key, buf);
DEBUG_printf(("4get_error_buffer: buf=%p", (void *)buf));
}
/*
* Return the pointer to the data...
*/
return (buf);
}
/*
* 'raster_init()' - Initialize error buffer once.
*/
static void
raster_init(void)
{
pthread_key_create(&raster_key, raster_destructor);
DEBUG_printf(("3raster_init(): raster_key=%x(%u)", (unsigned)raster_key, (unsigned)raster_key));
}
/*
* 'raster_destructor()' - Free memory allocated by get_error_buffer().
*/
static void
raster_destructor(void *value) /* I - Data to free */
{
_cups_raster_error_t *buf = (_cups_raster_error_t *)value;
/* Error buffer */
DEBUG_printf(("3raster_destructor(value=%p)", value));
if (buf->start)
free(buf->start);
free(value);
}
#else
/*
* Implement static globals...
*/
/*
* 'get_error_buffer()' - Return a pointer to thread local storage.
*/
_cups_raster_error_t * /* O - Pointer to error buffer */
get_error_buffer(void)
{
static _cups_raster_error_t buf = { 0, 0, 0 };
/* Error buffer */
return (&buf);
}
#endif /* HAVE_PTHREAD_H */

View File

@@ -4,13 +4,7 @@
* Copyright 2007-2015 by Apple Inc.
* Copyright 1993-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
* missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
* Licensed under Apache License v2.0. See the file "LICENSE" for more information.
*/
/*

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +0,0 @@
LIBRARY libcupsimage2
VERSION 2.3
EXPORTS
cupsRasterClose
cupsRasterErrorString
cupsRasterInterpretPPD
cupsRasterOpen
cupsRasterOpenIO
cupsRasterReadHeader
cupsRasterReadHeader2
cupsRasterReadPixels
cupsRasterWriteHeader
cupsRasterWriteHeader2
cupsRasterWritePixels

View File

@@ -1,16 +0,0 @@
_cupsImagePutCol
_cupsImagePutRow
_cupsImageReadBMP
_cupsImageReadGIF
_cupsImageReadJPEG
_cupsImageReadPIX
_cupsImageReadPNG
_cupsImageReadPNM
_cupsImageReadPhotoCD
_cupsImageReadSGI
_cupsImageReadSunRaster
_cupsImageReadTIFF
_cupsImageZoomDelete
_cupsImageZoomFill
_cupsImageZoomNew
_cupsRasterExecPS

View File

@@ -1,14 +1,11 @@
<!--
PostScript printer driver documentation for CUPS.
Copyright 2007-2012 by Apple Inc.
Copyright 1997-2007 by Easy Software Products.
Copyright © 2007-2012 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/".
Licensed under Apache License v2.0. See the file "LICENSE" for more
information.
-->
<h1 class='title'>Developing PostScript Printer Drivers</h1>

View File

@@ -1,14 +1,11 @@
<!--
PPD compiler documentation for CUPS.
Copyright 2007-2012 by Apple Inc.
Copyright 1997-2007 by Easy Software Products.
Copyright © 2007-2012 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/".
Licensed under Apache License v2.0. See the file "LICENSE" for more
information.
-->
<h1 class='title'>Introduction to the PPD Compiler</h1>

View File

@@ -1,16 +1,11 @@
/*
* PostScript filter for CUPS.
*
* Copyright 2007-2015 by Apple Inc.
* Copyright 1993-2007 by Easy Software Products.
* Copyright © 2007-2018 by Apple Inc.
* Copyright © 1993-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
* missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
* Licensed under Apache License v2.0. See the file "LICENSE" for more
* information.
*/
/*
@@ -162,8 +157,7 @@ static ssize_t copy_trailer(cups_file_t *fp, pstops_doc_t *doc,
ssize_t linelen, size_t linesize);
static void do_prolog(pstops_doc_t *doc, ppd_file_t *ppd);
static void do_setup(pstops_doc_t *doc, ppd_file_t *ppd);
static void doc_printf(pstops_doc_t *doc, const char *format, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
static void doc_printf(pstops_doc_t *doc, const char *format, ...) _CUPS_FORMAT(2, 3);
static void doc_puts(pstops_doc_t *doc, const char *s);
static void doc_write(pstops_doc_t *doc, const char *s, size_t len);
static void end_nup(pstops_doc_t *doc, int number);
@@ -2235,7 +2229,7 @@ parse_text(const char *start, /* I - Start of text value */
bufptr = buffer;
bufend = buffer + bufsize - 1;
while (bufptr < bufend)
while (*start && bufptr < bufend)
{
if (isspace(*start & 255) && !level)
break;

View File

@@ -1,14 +1,11 @@
<!--
Raster printer driver documentation for CUPS.
Copyright 2007-2012 by Apple Inc.
Copyright 1997-2007 by Easy Software Products.
Copyright © 2007-2018 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/".
Licensed under Apache License v2.0. See the file "LICENSE" for more
information.
-->
<h1 class='title'>Developing Raster Printer Drivers</h1>

File diff suppressed because it is too large Load Diff

View File

@@ -1,342 +0,0 @@
/*
* Raster benchmark program for CUPS.
*
* Copyright 2007-2016 by Apple Inc.
* Copyright 1997-2006 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
* missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
*/
/*
* Include necessary headers...
*/
#include <config.h>
#include <cups/raster.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>
/*
* Constants...
*/
#define TEST_WIDTH 1024
#define TEST_HEIGHT 1024
#define TEST_PAGES 16
#define TEST_PASSES 20
/*
* Local functions...
*/
static double compute_median(double *secs);
static double get_time(void);
static void read_test(int fd);
static int run_read_test(void);
static void write_test(int fd, cups_mode_t mode);
/*
* 'main()' - Benchmark the raster read/write functions.
*/
int /* O - Exit status */
main(int argc, /* I - Number of command-line args */
char *argv[]) /* I - Command-line arguments */
{
int i; /* Looping var */
int ras_fd, /* File descriptor for read process */
status; /* Exit status of read process */
double start_secs, /* Start time */
write_secs, /* Write time */
read_secs, /* Read time */
pass_secs[TEST_PASSES]; /* Total test times */
cups_mode_t mode; /* Write mode */
/*
* See if we have anything on the command-line...
*/
if (argc > 2 || (argc == 2 && strcmp(argv[1], "-z")))
{
puts("Usage: rasterbench [-z]");
return (1);
}
mode = argc > 1 ? CUPS_RASTER_WRITE_COMPRESSED : CUPS_RASTER_WRITE;
/*
* Ignore SIGPIPE...
*/
signal(SIGPIPE, SIG_IGN);
/*
* Run the tests several times to get a good average...
*/
printf("Test read/write speed of %d pages, %dx%d pixels...\n\n",
TEST_PAGES, TEST_WIDTH, TEST_HEIGHT);
for (i = 0; i < TEST_PASSES; i ++)
{
printf("PASS %2d: ", i + 1);
fflush(stdout);
ras_fd = run_read_test();
start_secs = get_time();
write_test(ras_fd, mode);
write_secs = get_time();
printf(" %.3f write,", write_secs - start_secs);
fflush(stdout);
close(ras_fd);
wait(&status);
read_secs = get_time();
pass_secs[i] = read_secs - start_secs;
printf(" %.3f read, %.3f total\n", read_secs - write_secs, pass_secs[i]);
}
printf("\nMedian Total Time: %.3f seconds per document\n",
compute_median(pass_secs));
return (0);
}
/*
* 'compute_median()' - Compute the median time for a test.
*/
static double /* O - Median time in seconds */
compute_median(double *secs) /* I - Array of time samples */
{
int i, j; /* Looping vars */
double temp; /* Swap variable */
/*
* Sort the array into ascending order using a quicky bubble sort...
*/
for (i = 0; i < (TEST_PASSES - 1); i ++)
for (j = i + 1; j < TEST_PASSES; j ++)
if (secs[i] > secs[j])
{
temp = secs[i];
secs[i] = secs[j];
secs[j] = temp;
}
/*
* Return the average of the middle two samples...
*/
return (0.5 * (secs[TEST_PASSES / 2 - 1] + secs[TEST_PASSES / 2]));
}
/*
* 'get_time()' - Get the current time in seconds.
*/
static double /* O - Time in seconds */
get_time(void)
{
struct timeval curtime; /* Current time */
gettimeofday(&curtime, NULL);
return (curtime.tv_sec + 0.000001 * curtime.tv_usec);
}
/*
* 'read_test()' - Benchmark the raster read functions.
*/
static void
read_test(int fd) /* I - File descriptor to read from */
{
unsigned y; /* Looping var */
cups_raster_t *r; /* Raster stream */
cups_page_header2_t header; /* Page header */
unsigned char buffer[8 * TEST_WIDTH];
/* Read buffer */
/*
* Test read speed...
*/
if ((r = cupsRasterOpen(fd, CUPS_RASTER_READ)) == NULL)
{
perror("Unable to create raster input stream");
return;
}
while (cupsRasterReadHeader2(r, &header))
{
for (y = 0; y < header.cupsHeight; y ++)
cupsRasterReadPixels(r, buffer, header.cupsBytesPerLine);
}
cupsRasterClose(r);
}
/*
* 'run_read_test()' - Run the read test as a child process via pipes.
*/
static int /* O - Standard input of child */
run_read_test(void)
{
int ras_pipes[2]; /* Raster data pipes */
int pid; /* Child process ID */
if (pipe(ras_pipes))
return (-1);
if ((pid = fork()) < 0)
{
/*
* Fork error - return -1 on error...
*/
close(ras_pipes[0]);
close(ras_pipes[1]);
return (-1);
}
else if (pid == 0)
{
/*
* Child comes here - read data from the input pipe...
*/
close(ras_pipes[1]);
read_test(ras_pipes[0]);
exit(0);
}
else
{
/*
* Parent comes here - return the output pipe...
*/
close(ras_pipes[0]);
return (ras_pipes[1]);
}
}
/*
* 'write_test()' - Benchmark the raster write functions.
*/
static void
write_test(int fd, /* I - File descriptor to write to */
cups_mode_t mode) /* I - Write mode */
{
unsigned page, x, y; /* Looping vars */
unsigned count; /* Number of bytes to set */
cups_raster_t *r; /* Raster stream */
cups_page_header2_t header; /* Page header */
unsigned char data[32][8 * TEST_WIDTH];
/* Raster data to write */
/*
* Create a combination of random data and repeated data to simulate
* text with some whitespace.
*/
CUPS_SRAND(time(NULL));
memset(data, 0, sizeof(data));
for (y = 0; y < 28; y ++)
{
for (x = CUPS_RAND() & 127, count = (CUPS_RAND() & 15) + 1;
x < sizeof(data[0]);
x ++, count --)
{
if (count <= 0)
{
x += (CUPS_RAND() & 15) + 1;
count = (CUPS_RAND() & 15) + 1;
if (x >= sizeof(data[0]))
break;
}
data[y][x] = (unsigned char)CUPS_RAND();
}
}
/*
* Test write speed...
*/
if ((r = cupsRasterOpen(fd, mode)) == NULL)
{
perror("Unable to create raster output stream");
return;
}
for (page = 0; page < TEST_PAGES; page ++)
{
memset(&header, 0, sizeof(header));
header.cupsWidth = TEST_WIDTH;
header.cupsHeight = TEST_HEIGHT;
header.cupsBytesPerLine = TEST_WIDTH;
if (page & 1)
{
header.cupsBytesPerLine *= 4;
header.cupsColorSpace = CUPS_CSPACE_CMYK;
header.cupsColorOrder = CUPS_ORDER_CHUNKED;
}
else
{
header.cupsColorSpace = CUPS_CSPACE_K;
header.cupsColorOrder = CUPS_ORDER_BANDED;
}
if (page & 2)
{
header.cupsBytesPerLine *= 2;
header.cupsBitsPerColor = 16;
header.cupsBitsPerPixel = (page & 1) ? 64 : 16;
}
else
{
header.cupsBitsPerColor = 8;
header.cupsBitsPerPixel = (page & 1) ? 32 : 8;
}
cupsRasterWriteHeader2(r, &header);
for (y = 0; y < TEST_HEIGHT; y ++)
cupsRasterWritePixels(r, data[y & 31], header.cupsBytesPerLine);
}
cupsRasterClose(r);
}

View File

@@ -1,16 +1,11 @@
/*
* EPSON ESC/P and ESC/P2 filter for CUPS.
*
* Copyright 2007-2015 by Apple Inc.
* Copyright 2007-2018 by Apple Inc.
* Copyright 1993-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
* missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
* Licensed under Apache License v2.0. See the file "LICENSE" for more
* information.
*/
/*
@@ -307,7 +302,7 @@ StartPage(
if (DotBytes)
{
if ((LineBuffers[0] = calloc((size_t)DotBytes, header->cupsWidth * (size_t)(Shingling + 1))) == NULL)
if ((LineBuffers[0] = calloc((size_t)DotBytes, (header->cupsWidth + 7) * (size_t)(Shingling + 1))) == NULL)
{
fputs("ERROR: Unable to allocate memory\n", stderr);
exit(1);

View File

@@ -4,13 +4,7 @@
* Copyright 2007-2015 by Apple Inc.
* Copyright 1993-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
* missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
* Licensed under Apache License v2.0. See the file "LICENSE" for more information.
*/
/*
@@ -37,8 +31,8 @@ unsigned char *Planes[4], /* Output buffers */
unsigned NumPlanes, /* Number of color planes */
ColorBits, /* Number of bits per color */
Feed; /* Number of lines to skip */
int Duplex, /* Current duplex mode */
Page, /* Current page number */
cups_bool_t Duplex; /* Current duplex mode */
int Page, /* Current page number */
Canceled; /* Has the current job been canceled? */

View File

@@ -1,16 +1,11 @@
/*
* Label printer filter for CUPS.
*
* Copyright 2007-2016 by Apple Inc.
* Copyright 2001-2007 by Easy Software Products.
* Copyright © 2007-2019 by Apple Inc.
* Copyright © 2001-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
* missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
* Licensed under Apache License v2.0. See the file "LICENSE" for more
* information.
*/
/*
@@ -305,7 +300,7 @@ StartPage(ppd_file_t *ppd, /* I - PPD file */
header->HWResolution[1], header->cupsHeight,
header->NumCopies);
printf("PAGE-WIDTH %u\r\n", header->cupsWidth);
printf("PAGE-HEIGHT %u\r\n", header->cupsWidth);
printf("PAGE-HEIGHT %u\r\n", header->cupsHeight);
break;
case INTELLITECH_PCL :
@@ -374,7 +369,7 @@ StartPage(ppd_file_t *ppd, /* I - PPD file */
if (header->cupsCompression != ~0U)
/* inPrintDensity */
printf("\033&d%uA", 30 * header->cupsCompression / 100 - 15);
printf("\033&d%dA", 30 * header->cupsCompression / 100 - 15);
if ((choice = ppdFindMarkedChoice(ppd, "inPrintMode")) != NULL)
{
@@ -619,7 +614,14 @@ EndPage(ppd_file_t *ppd, /* I - PPD file */
*/
puts("^XZ");
/*
* Delete the label image...
*/
puts("^XA");
puts("^IDR:CUPS.GRF^FS");
puts("^XZ");
/*
* Cut the label as needed...

View File

@@ -1,15 +1,10 @@
/*
* CUPS raster to PWG raster format filter for CUPS.
*
* Copyright 2011, 2014-2017 Apple Inc.
* Copyright © 2011, 2014-2017 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
* missing or damaged, see the license at "http://www.cups.org/".
*
* This file is subject to the Apple OS-Developed Software exception.
* Licensed under Apache License v2.0. See the file "LICENSE" for more
* information.
*/
/*

View File

@@ -1,14 +1,11 @@
<!--
PPD extension documentation for CUPS.
Copyright 2007-2011 by Apple Inc.
Copyright 1997-2007 by Easy Software Products.
Copyright © 2007-2011 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/".
Licensed under Apache License v2.0. See the file "LICENSE" for more
information.
-->
<H1 CLASS="title">CUPS PPD Extensions</H1>

View File

@@ -30,7 +30,8 @@ LINE-END = CR / LF / CR LF
<p>CUPS supports several methods of auto-configuration via PPD keywords.</p>
<h3><span class='info'>macOS 10.5</span><a name='APAutoSetupTool'>APAutoSetupTool</a></h3>
<h3 class="title"><span class='info'>macOS 10.5</span><a name='APAutoSetupTool'>APAutoSetupTool</a></h3>
<p class='summary'>*APAutoSetupTool: "/LibraryPrinters/vendor/filename"</p>
@@ -45,7 +46,8 @@ LINE-END = CR / LF / CR LF
*APAutoSetupTool: "/Library/Printers/vendor/Tools/autosetuptool"
</pre>
<h3><span class='info'>macOS 10.2/CUPS 1.4</span><a name='QUERYKEYWORD'>?MainKeyword</a></h3>
<h3 class="title"><span class='info'>macOS 10.2/CUPS 1.4</span><a name='QUERYKEYWORD'>?MainKeyword</a></h3>
<p class='summary'>*?<i>MainKeyword</i>: "<br>
PostScript query code that writes a message using the = operator...<br>
@@ -74,7 +76,8 @@ LINE-END = CR / LF / CR LF
*CloseUI: OptionDuplex
</pre>
<h3><span class='info'>macOS 10.4/CUPS 1.5</span><a name='OID'>OIDMainKeyword</a></h3>
<h3 class="title"><span class='info'>macOS 10.4/CUPS 1.5</span><a name='OID'>OIDMainKeyword</a></h3>
<p class='summary'>*?OID<i>MainKeyword</i>: ".n.n.n..."<br>
*OID<i>MainKeyword</i> <i>OptionKeyword1</i>: "value"<br>
@@ -105,7 +108,8 @@ LINE-END = CR / LF / CR LF
</blockquote>
<h3><span class='info'>Deprecated</span><a name='cupsColorProfile'>cupsColorProfile</a></h3>
<h3 class="title"><span class='info'>Deprecated</span><a name='cupsColorProfile'>cupsColorProfile</a></h3>
<p class='summary'>*cupsColorProfile Resolution/MediaType: "density gamma m00 m01 m02 m10 m11 m12 m20 m21 m22"</p>
@@ -142,7 +146,7 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
</pre>
<h3><span class='info'>macOS 10.3/CUPS 1.2</span><a name='cupsICCProfile'>cupsICCProfile</a></h3>
<h3 class="title"><span class='info'>macOS 10.3/CUPS 1.2</span><a name='cupsICCProfile'>cupsICCProfile</a></h3>
<p class='summary'>*cupsICCProfile ColorModel.MediaType.Resolution/Description: "filename"</p>
@@ -163,7 +167,7 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
*cupsICCProfile ../Default: "/Library/Printers/vendor/Profiles/foo-default.icc"
</pre>
<h4>Customizing the Profile Selection Keywords</h4>
<h4 class="title">Customizing the Profile Selection Keywords</h4>
<p>The <tt>ColorModel</tt>, <tt>MediaType</tt>, and <tt>Resolution</tt> main keywords can be reassigned to different main keywords, allowing drivers to do color profile selection based on different parameters. The <tt>cupsICCQualifier1</tt>, <tt>cupsICCQualifier2</tt>, and <tt>cupsICCQualifier3</tt> keywords define the mapping from selector to main keyword:</p>
@@ -181,7 +185,8 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
*cupsICCQualifier3: Resolution
</pre>
<h3><span class='info'>macOS 10.4</span><a name='APCustom'>Custom Color Matching Support</a></h3>
<h3 class="title"><span class='info'>macOS 10.4</span><a name='APCustom'>Custom Color Matching Support</a></h3>
<p class='summary'>*<a href='#APSupportsCustomColorMatching'>APSupportsCustomColorMatching</a>: true<br>
*<a href='#APCustomColorMatchingName'>APCustomColorMatchingName</a> name/text: ""<br>
@@ -196,7 +201,7 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
</blockquote>
<h4><span class='info'>macOS 10.5</span><a name='APCustomColorMatchingName'>APCustomColorMatchingName</a></h4>
<h4 class="title"><span class='info'>macOS 10.5</span><a name='APCustomColorMatchingName'>APCustomColorMatchingName</a></h4>
<p class='summary'>*APCustomColorMatchingName name/text: ""</p>
@@ -210,7 +215,7 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
*fr.APCustomColorMatchingName name/La AcmeColor(tm): ""
</pre>
<h4><span class='info'>macOS 10.5</span><a name='APCustomColorMatchingProfile'>APCustomColorMatchingProfile</a></h4>
<h4 class="title"><span class='info'>macOS 10.5</span><a name='APCustomColorMatchingProfile'>APCustomColorMatchingProfile</a></h4>
<p class='summary'>*APCustomColorMatchingProfile: name</p>
@@ -232,7 +237,7 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
*APCustomColorMatchingProfile: AdobeRGB
</pre>
<h4><span class='info'>macOS 10.5</span><a name='APDefaultCustomColorMatchingProfile'>APDefaultCustomColorMatchingProfile</a></h4>
<h4 class="title"><span class='info'>macOS 10.5</span><a name='APDefaultCustomColorMatchingProfile'>APDefaultCustomColorMatchingProfile</a></h4>
<p class='summary'>*APDefaultCustomColorMatchingProfile: name</p>
@@ -246,7 +251,7 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
*APDefaultCustomColorMatchingProfile: sRGB
</pre>
<h4><span class='info'>macOS 10.4</span><a name='APSupportsCustomColorMatching'>APSupportsCustomColorMatching</a></h4>
<h4 class="title"><span class='info'>macOS 10.4</span><a name='APSupportsCustomColorMatching'>APSupportsCustomColorMatching</a></h4>
<p class='summary'>*APSupportsCustomColorMatching: boolean</p>
@@ -282,7 +287,8 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
</blockquote>
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsUIConstraints'>cupsUIConstraints</a></h3>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsUIConstraints'>cupsUIConstraints</a></h3>
<p class='summary'>*cupsUIConstraints resolver: "*Keyword1 *Keyword2 ..."<br>
*cupsUIConstraints resolver: "*Keyword1 OptionKeyword1 *Keyword2 ..."<br>
@@ -312,7 +318,8 @@ f(x) = density * x <sup style='font-size: 100%'>gamma</sup>
*cupsUIConstraints photo: "*OutputMode Photo *MediaType Transparency *Resolution 1200dpi"
</pre>
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsUIResolver'>cupsUIResolver</a></h3>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsUIResolver'>cupsUIResolver</a></h3>
<p class='summary'>*cupsUIResolver resolver: "*Keyword1 OptionKeyword1 *Keyword2 OptionKeyword2 ..."</p>
@@ -529,7 +536,8 @@ option value is "1234" then CUPS will output the string "@PJL SET PASSCODE=1234"
<p>The resulting dictionary sets the page device attributes that are sent to your raster driver in the page header.</p>
<h3>Custom Page Size Code</h3>
<h3 class="title">Custom Page Size Code</h3>
<p>There are many possible implementations of the <tt>CustomPageSize</tt> code. For CUPS raster drivers, the following code is recommended:</p>
@@ -542,7 +550,8 @@ option value is "1234" then CUPS will output the string "@PJL SET PASSCODE=1234"
*CustomPageSize True: "pop pop pop &lt;&lt;/PageSize[5 -2 roll]/ImagingBBox null&gt;&gt;setpagedevice"
</pre>
<h3>Supported PostScript Operators</h3>
<h3 class="title">Supported PostScript Operators</h3>
<p>CUPS supports the following PostScript operators in addition to the usual PostScript number, string (literal and hex-encoded), boolean, null, and name values:</p>
@@ -601,7 +610,8 @@ PRE B {
</blockquote>
<h3>Supported Page Device Attributes</h3>
<h3 class="title">Supported Page Device Attributes</h3>
<p>Table 2 shows the supported page device attributes along with PostScript code examples.</p>
@@ -872,7 +882,8 @@ PRE B {
<p>The CUPS media keywords allow drivers to specify alternate custom page
size limits based on up to two options.</p>
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMediaQualifier2'>cupsMediaQualifier2</a></h3>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMediaQualifier2'>cupsMediaQualifier2</a></h3>
<p class='summary'>*cupsMediaQualifier2: MainKeyword</p>
@@ -891,7 +902,8 @@ custom page size limits.</p>
*cupsMinSize ..Photo: "300 300"
</pre>
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMediaQualifier3'>cupsMediaQualifier3</a></h3>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMediaQualifier3'>cupsMediaQualifier3</a></h3>
<p class='summary'>*cupsMediaQualifier3: MainKeyword</p>
@@ -910,7 +922,8 @@ custom page size limits.</p>
*cupsMinSize ..Photo: "300 300"
</pre>
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMinSize'>cupsMinSize</a></h3>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMinSize'>cupsMinSize</a></h3>
<p class='summary'>*cupsMinSize .Qualifier2.Qualifier3: "width length"<br>
*cupsMinSize .Qualifier2.: "width length"<br>
@@ -933,7 +946,8 @@ are used to identify options to use for matching.</p>
*cupsMinSize ..Photo: "300 300"
</pre>
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMaxSize'>cupsMaxSize</a></h3>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMaxSize'>cupsMaxSize</a></h3>
<p class='summary'>*cupsMaxSize .Qualifier2.Qualifier3: "width length"<br>
*cupsMaxSize .Qualifier2.: "width length"<br>
@@ -957,7 +971,7 @@ are used to identify options to use for matching.</p>
</pre>
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsPageSizeCategory'>cupsPageSizeCategory</a></h3>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsPageSizeCategory'>cupsPageSizeCategory</a></h3>
<p class="summary">*cupsPageSizeCategory name/text: "name name2 ... nameN"</p>
@@ -974,7 +988,7 @@ are used to identify options to use for matching.</p>
<h2 class='title'><a name='ATTRIBUTES'>General Attributes</a></h2>
<h3><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsBackSide'>cupsBackSide</a></h3>
<h3 class="title"><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsBackSide'>cupsBackSide</a></h3>
<p class='summary'>*cupsBackSide: keyword</p>
@@ -1070,7 +1084,8 @@ will be ignored.</p>
<p>Also see the related <a href='#APDuplexRequiresFlippedMargin'><tt>APDuplexRequiresFlippedMargin</tt></a>
keyword.</p>
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsCommands'>cupsCommands</a></h3>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsCommands'>cupsCommands</a></h3>
<p class='summary'>*cupsCommands: "name name2 ... nameN"</p>
@@ -1086,7 +1101,7 @@ by whitespace.</p>
</pre>
<h3><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsEvenDuplex'>cupsEvenDuplex</a></h3>
<h3 class="title"><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsEvenDuplex'>cupsEvenDuplex</a></h3>
<p class='summary'>*cupsEvenDuplex: boolean</p>
@@ -1101,7 +1116,8 @@ printing is selected. The default value is <code>false</code>.</p>
*cupsEvenDuplex: true
</pre>
<h3><a name='cupsFax'>cupsFax</a></h3>
<h3 class="title"><a name='cupsFax'>cupsFax</a></h3>
<p class='summary'>*cupsFax: boolean</p>
@@ -1113,7 +1129,8 @@ printing is selected. The default value is <code>false</code>.</p>
*cupsFax: true
</pre>
<h3><a name='cupsFilter'>cupsFilter</a></h3>
<h3 class="title"><a name='cupsFilter'>cupsFilter</a></h3>
<p class='summary'>*cupsFilter: "source/type cost program"</p>
@@ -1135,7 +1152,8 @@ the special filter program "-" may be specified.</p>
*cupsFilter: "application/vnd.cups-postscript 0 -"
</pre>
<h3><span class='info'>CUPS 1.5</span><a name='cupsFilter2'>cupsFilter2</a></h3>
<h3 class="title"><span class='info'>CUPS 1.5</span><a name='cupsFilter2'>cupsFilter2</a></h3>
<p class='summary'>*cupsFilter2: "source/type destination/type cost program"</p>
@@ -1160,7 +1178,27 @@ the special filter program "-" may be specified.</p>
*cupsFilter2: "application/vnd.cups-postscript application/postscript 0 -"
</pre>
<h3><span class='info'>Deprecated</span><a name='cupsFlipDuplex'>cupsFlipDuplex</a></h3>
<h3 class="title"><span class='info'>CUPS 2.3</span><a name='cupsFinishingTemplate'>cupsFinishingTemplate</a></h3>
<p class='summary'>*cupsFinishingTemplate name/text: ""</p>
<p>This option keyword specifies a finishing template (preset) that applies zero or more finishing processes to a job. Unlike <a href="#cupsIPPFinishings"><tt>cupsIPPFinishings</tt></a>, only one template can be selected by the user. PPD files also generally apply a constraint between this option and other finishing options like <tt>Booklet</tt>, <tt>FoldType</tt>, <tt>PunchMedia</tt>, and <tt>StapleWhen</tt>.</p>
<p>Examples:</p>
<pre class='command'>
*cupsFinishingTemplate none/None: ""
*cupsFinishingTemplate fold/Letter Fold: ""
*cupsFinishingTemplate punch/2/3-Hole Punch: ""
*cupsFinishingTemplate staple/Corner Staple: ""
*cupsFinishingTemplate staple-dual/Double Staple: ""
*cupsFinishingTemplate staple-and-fold/Corner Staple and Letter Fold: ""
*cupsFinishingTemplate staple-and-punch/Corner Staple and 2/3-Hole Punch: ""
</pre>
<h3 class="title"><span class='info'>Deprecated</span><a name='cupsFlipDuplex'>cupsFlipDuplex</a></h3>
<p class='summary'>*cupsFlipDuplex: boolean</p>
@@ -1195,7 +1233,8 @@ Ghostscript can use:</p>
*cupsFlipDuplex: true
</pre></blockquote>
<h3><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsIPPFinishings'>cupsIPPFinishings</a></h3>
<h3 class="title"><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsIPPFinishings'>cupsIPPFinishings</a></h3>
<p class='summary'>*cupsIPPFinishings number/text: "*Option Choice ..."</p>
@@ -1211,7 +1250,8 @@ values to PPD options and choices.</p>
*cupsIPPFinishings 21/staple-bottom-left: "*StapleLocation SingleLandscape"
</pre>
<h3><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsIPPReason'>cupsIPPReason</a></h3>
<h3 class="title"><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsIPPReason'>cupsIPPReason</a></h3>
<p class='summary'>*cupsIPPReason reason/Reason Text: "optional URIs"</p>
@@ -1251,7 +1291,8 @@ http://www.vendor.com/help"
*End
</pre>
<h3><span class='info'>CUPS 1.5</span><a name='cupsIPPSupplies'>cupsIPPSupplies</a></h3>
<h3 class="title"><span class='info'>CUPS 1.5</span><a name='cupsIPPSupplies'>cupsIPPSupplies</a></h3>
<p class='summary'>*cupsIPPSupplies: boolean</p>
@@ -1265,7 +1306,7 @@ http://www.vendor.com/help"
</pre>
<h3><span class='info'>CUPS 1.7/macOS 10.9</span><a name='cupsJobAccountId'>cupsJobAccountId</a></h3>
<h3 class="title"><span class='info'>CUPS 1.7/macOS 10.9</span><a name='cupsJobAccountId'>cupsJobAccountId</a></h3>
<p class='summary'>*cupsJobAccountId: boolean</p>
@@ -1279,7 +1320,7 @@ http://www.vendor.com/help"
</pre>
<h3><span class='info'>CUPS 1.7/macOS 10.9</span><a name='cupsJobAccountingUserId'>cupsJobAccountingUserId</a></h3>
<h3 class="title"><span class='info'>CUPS 1.7/macOS 10.9</span><a name='cupsJobAccountingUserId'>cupsJobAccountingUserId</a></h3>
<p class='summary'>*cupsJobAccountingUserId: boolean</p>
@@ -1293,11 +1334,24 @@ http://www.vendor.com/help"
</pre>
<h3><span class='info'>CUPS 1.7/macOS 10.9</span><a name='cupsJobPassword'>cupsJobPassword</a></h3>
<h3 class="title"><span class='info'>CUPS 1.7/macOS 10.9</span><a name='cupsJobPassword'>cupsJobPassword</a></h3>
<p class='summary'>*cupsJobPassword: "format"</p>
<p>This keyword defines the format of the job-password IPP attribute, if supported by the printer. Currently the only supported format is "1111" indicating a 4-digit PIN code.</p>
<p>This keyword defines the format of the "job-password" IPP attribute, if supported by the printer. The following format characters are supported:</p>
<ul>
<li><code>1</code>: US ASCII digits.</li>
<li><code>A</code>: US ASCII letters.</li>
<li><code>C</code>: US ASCII letters, numbers, and punctuation.</li>
<li><code>.</code>: Any US ASCII printable character (0x20 to 0x7e).</li>
<li><code>N</code>: Any Unicode digit character.</li>
<li><code>U</code>: Any Unicode letter character.</li>
<li><code>*</code>: Any Unicode (utf-8) character.</li>
</ul>
<p>The format characters are repeated to indicate the length of the
password string. For example, "1111" indicated a 4-digit US ASCII PIN code.</p>
<p>Example:</p>
@@ -1307,7 +1361,7 @@ http://www.vendor.com/help"
</pre>
<h3><span class='info'>CUPS 1.2/macOS 10.5</span><a name='cupsLanguages'>cupsLanguages</a></h3>
<h3 class="title"><span class='info'>CUPS 1.2/macOS 10.5</span><a name='cupsLanguages'>cupsLanguages</a></h3>
<p class='summary'>*cupsLanguages: "locale list"</p>
@@ -1323,7 +1377,7 @@ list of locale names ("en", "en_US", "fr_CA", etc.)</p>
</pre>
<h3><span class='info'>CUPS 1.7/macOS 10.9</span><a name='cupsMandatory'>cupsMandatory</a></h3>
<h3 class="title"><span class='info'>CUPS 1.7/macOS 10.9</span><a name='cupsMandatory'>cupsMandatory</a></h3>
<p class='summary'>*cupsMandatory: "attribute1 attribute2 ... attributeN"</p>
@@ -1337,7 +1391,7 @@ list of locale names ("en", "en_US", "fr_CA", etc.)</p>
</pre>
<h3><a name='cupsManualCopies'>cupsManualCopies</a></h3>
<h3 class="title"><a name='cupsManualCopies'>cupsManualCopies</a></h3>
<p class='summary'>*cupsManualCopies: boolean</p>
@@ -1352,7 +1406,8 @@ hardware. The default value is <code>false</code>.</p>
*cupsManualCopies: true
</pre>
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMarkerName'>cupsMarkerName</a></h3>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMarkerName'>cupsMarkerName</a></h3>
<p class='summary'>*cupsMarkerName/Name Text: ""</p>
@@ -1366,7 +1421,8 @@ generated by the driver to human readable text.</p>
*cupsMarkerName cyanToner/Cyan Toner: ""
</pre>
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMarkerNotice'>cupsMarkerNotice</a></h3>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsMarkerNotice'>cupsMarkerNotice</a></h3>
<p class='summary'>*cupsMarkerNotice: "disclaimer text"</p>
@@ -1380,7 +1436,8 @@ are approximate".</p>
*cupsMarkerNotice: "Supply levels are approximate."
</pre>
<h3><span class='info'>CUPS 1.6/macOS 10.8</span><a name='cupsMaxCopies'>cupsMaxCopies</a></h3>
<h3 class="title"><span class='info'>CUPS 1.6/macOS 10.8</span><a name='cupsMaxCopies'>cupsMaxCopies</a></h3>
<p class='summary'>*cupsMaxCopies: integer</p>
@@ -1393,7 +1450,8 @@ are approximate".</p>
*cupsMaxCopies: 99
</pre>
<h3><a name='cupsModelNumber'>cupsModelNumber</a></h3>
<h3 class="title"><a name='cupsModelNumber'>cupsModelNumber</a></h3>
<p class='summary'>*cupsModelNumber: number</p>
@@ -1409,7 +1467,7 @@ the output for a specific model of printer.</p>
</pre>
<h3><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsPJLCharset'>cupsPJLCharset</a></h3>
<h3 class="title"><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsPJLCharset'>cupsPJLCharset</a></h3>
<p class='summary'>*cupsPJLCharset: "ISO character set name"</p>
@@ -1424,7 +1482,8 @@ assumed.</p>
*cupsPJLCharset: "UTF-8"
</pre>
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsPJLDisplay'>cupsPJLDisplay</a></h3>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsPJLDisplay'>cupsPJLDisplay</a></h3>
<p class='summary'>*cupsPJLDisplay: "what"</p>
@@ -1443,7 +1502,8 @@ to use "@PJL RDYMSG DISPLAY". The default is "job".</p>
*cupsPJLDisplay: "none"
</pre>
<h3><span class='info'>CUPS 1.2/macOS 10.5</span><a name='cupsPortMonitor'>cupsPortMonitor</a></h3>
<h3 class="title"><span class='info'>CUPS 1.2/macOS 10.5</span><a name='cupsPortMonitor'>cupsPortMonitor</a></h3>
<p class='summary'>*cupsPortMonitor urischeme/Descriptive Text: "port monitor"</p>
@@ -1475,7 +1535,8 @@ to disable the port monitor for the given URI scheme.</p>
*cupsPortMonitor usb/USB Status Monitor: "epson-usb"
</pre>
<h3><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsPreFilter'>cupsPreFilter</a></h3>
<h3 class="title"><span class='info'>CUPS 1.3/macOS 10.5</span><a name='cupsPreFilter'>cupsPreFilter</a></h3>
<p class='summary'>*cupsPreFilter: "source/type cost program"</p>
@@ -1494,7 +1555,7 @@ before the filter that accepts the given MIME type.</p>
</pre>
<h3><span class='info'>CUPS 1.5</span><a name='cupsPrintQuality'>cupsPrintQuality</a></h3>
<h3 class="title"><span class='info'>CUPS 1.5</span><a name='cupsPrintQuality'>cupsPrintQuality</a></h3>
<p class='summary'>*cupsPrintQuality keyword/text: "code"</p>
@@ -1518,7 +1579,8 @@ before the filter that accepts the given MIME type.</p>
*CloseUI: *cupsPrintQuality
</pre>
<h3><span class='info'>CUPS 1.5</span><a name='cupsSingleFile'>cupsSingleFile</a></h3>
<h3 class="title"><span class='info'>CUPS 1.5</span><a name='cupsSingleFile'>cupsSingleFile</a></h3>
<p class='summary'>*cupsSingleFile: Boolean</p>
@@ -1534,7 +1596,8 @@ before the filter that accepts the given MIME type.</p>
*cupsSingleFile: True
</pre>
<h3><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsSNMPSupplies'>cupsSNMPSupplies</a></h3>
<h3 class="title"><span class='info'>CUPS 1.4/macOS 10.6</span><a name='cupsSNMPSupplies'>cupsSNMPSupplies</a></h3>
<p class='summary'>*cupsSNMPSupplies: boolean</p>
@@ -1549,7 +1612,8 @@ the standard SNMP Printer MIB OIDs for supply levels. The default value is
*cupsSNMPSupplies: False
</pre>
<h3><a name='cupsVersion'>cupsVersion</a></h3>
<h3 class="title"><a name='cupsVersion'>cupsVersion</a></h3>
<p class='summary'>*cupsVersion: major.minor</p>
@@ -1565,7 +1629,7 @@ PPD file extensions was used. Currently it must be the string
</pre>
<h3><span class="info">CUPS 1.6/macOS 10.8</span><a name="JCLToPDFInterpreter">JCLToPDFInterpreter</a></h3>
<h3 class="title"><span class="info">CUPS 1.6/macOS 10.8</span><a name="JCLToPDFInterpreter">JCLToPDFInterpreter</a></h3>
<p class="summary">*JCLToPDFInterpreter: "JCL"</p>
@@ -1581,7 +1645,7 @@ PPD file extensions was used. Currently it must be the string
<h2 class='title'><a name='MACOSX'>macOS Attributes</a></h2>
<h3><span class='info'>macOS 10.3</span><a name='APDialogExtension'>APDialogExtension</a></h3>
<h3 class="title"><span class='info'>Deprecated</span><a name='APDialogExtension'>APDialogExtension</a></h3>
<p class='summary'>*APDialogExtension: "/Library/Printers/vendor/filename.plugin"</p>
@@ -1593,9 +1657,13 @@ plug-ins.</p>
<blockquote><b>Note:</b>
<p>Starting with macOS 10.5, each plug-in must be compiled "4-way fat"
(32-bit and 64-bit for both PowerPC and Intel) with garbage collection enabled
in order to be usable with all applications.</p>
<p>Since 2010, AirPrint has enabled the printing of full quality photos and
documents from the Mac without requiring driver software. Starting with macOS
10.12, system level security features prevent print dialog plug-ins from being
loaded into applications that have enabled the library validation security
feature. As of macOS 10.14 the <code>APDialogExtension</code> attribute used to
create macOS print drivers is deprecated. All new printer models should support
AirPrint moving forward.</p>
</blockquote>
@@ -1607,7 +1675,8 @@ in order to be usable with all applications.</p>
*APDialogExtension: "/Library/Printers/vendor/options.plugin"
</pre>
<h3><span class='info'>macOS 10.4</span><a name='APDuplexRequiresFlippedMargin'>APDuplexRequiresFlippedMargin</a></h3>
<h3 class="title"><span class='info'>macOS 10.4</span><a name='APDuplexRequiresFlippedMargin'>APDuplexRequiresFlippedMargin</a></h3>
<p class='summary'>*APDuplexRequiresFlippedMargin: boolean</p>
@@ -1689,7 +1758,8 @@ and the <tt>Tumble</tt> page attribute.</p>
<p>Also see the related <a href='#cupsBackSide'><tt>cupsBackSide</tt></a>
keyword.</p>
<h3><a name='APHelpBook'>APHelpBook</a></h3>
<h3 class="title"><a name='APHelpBook'>APHelpBook</a></h3>
<p class='summary'>*APHelpBook: "bundle URL"</p>
@@ -1704,7 +1774,8 @@ looking up IPP reason codes for this printer driver. The
*APHelpBook: "file:///Library/Printers/vendor/Help.bundle"
</pre>
<h3><span class='info'>macOS 10.6</span><a name='APICADriver'>APICADriver</a></h3>
<h3 class="title"><span class='info'>macOS 10.6</span><a name='APICADriver'>APICADriver</a></h3>
<p class='summary'>*APICADriver: boolean</p>
@@ -1718,7 +1789,8 @@ Architecture (ICA) driver for scanning. The default is <tt>False</tt>.</p>
*APScanAppBundleID: "com.apple.ImageCaptureApp"
</pre>
<h3><span class='info'>macOS 10.3</span><a name='APPrinterIconPath'>APPrinterIconPath</a></h3>
<h3 class="title"><span class='info'>macOS 10.3</span><a name='APPrinterIconPath'>APPrinterIconPath</a></h3>
<p class='summary'>*APPrinterIconPath: "/Library/Printers/vendor/filename.icns"</p>
@@ -1732,7 +1804,8 @@ displaying the printer. The file must be in the Apple icon format.</p>
*APPrinterIconPath: "/Library/Printers/vendor/Icons/filename.icns"
</pre>
<h3><span class='info'>macOS 10.4</span><a name='APPrinterLowInkTool'>APPrinterLowInkTool</a></h3>
<h3 class="title"><span class='info'>macOS 10.4</span><a name='APPrinterLowInkTool'>APPrinterLowInkTool</a></h3>
<p class='summary'>*APPrinterLowInkTool: "/Library/Printers/vendor/program"</p>
@@ -1749,7 +1822,8 @@ Technical Note TN2144</a> for more information.</p>
*APPrinterLowInkTool: "/Library/Printers/vendor/Tools/lowinktool"
</pre>
<h3><span class='info'>macOS 10.5</span><a name='APPrinterPreset'>APPrinterPreset</a></h3>
<h3 class="title"><span class='info'>macOS 10.5</span><a name='APPrinterPreset'>APPrinterPreset</a></h3>
<p class='summary'>*APPrinterPreset name/text: "*Option Choice ..."</p>
@@ -1819,7 +1893,8 @@ choice (*MainKeyword OptionKeyword) or a preset identifier and value
*fr.APPrinterPreset Photo_on_Photo_Paper/Photo sur papier photographique: ""
</pre>
<h3><span class='info'>macOS 10.3</span><a name='APPrinterUtilityPath'>APPrinterUtilityPath</a></h3>
<h3 class="title"><span class='info'>macOS 10.3</span><a name='APPrinterUtilityPath'>APPrinterUtilityPath</a></h3>
<p class='summary'>*APPrinterPrinterUtilityPath: "/Library/Printers/vendor/filename.app"</p>
@@ -1834,7 +1909,8 @@ information.</p>
*APPrinterPrinterUtilityPath: "/Library/Printers/vendor/Tools/utility.app"
</pre>
<h3><span class='info'>macOS 10.6</span><a name='APScannerOnly'>APScannerOnly</a></h3>
<h3 class="title"><span class='info'>macOS 10.6</span><a name='APScannerOnly'>APScannerOnly</a></h3>
<p class='summary'>*APScannerOnly: boolean</p>
@@ -1848,7 +1924,8 @@ capabilities. The default is <tt>False</tt>.</p>
*APScannerOnly: True
</pre>
<h3><span class='info'>macOS 10.3</span><a name='APScanAppBundleID'>APScanAppBundleID</a></h3>
<h3 class="title"><span class='info'>macOS 10.3</span><a name='APScanAppBundleID'>APScanAppBundleID</a></h3>
<p class='summary'>*APScanAppBundleID: "bundle ID"</p>
@@ -1865,7 +1942,16 @@ the device.</p>
<h2 class='title'><a name='HISTORY'>Change History</a></h2>
<h3>Changes in CUPS 1.7</h3>
<h3 class="title">Changes in CUPS 2.3</h3>
<ul>
<li>Added <a href="#cupsFinishingTemplate"><tt>cupsFinishingTemplate</tt></a> option.</li>
</ul>
<h3 class="title">Changes in CUPS 1.7</h3>
<ul>
@@ -1877,7 +1963,7 @@ the device.</p>
</ul>
<h3>Changes in CUPS 1.6</h3>
<h3 class="title">Changes in CUPS 1.6</h3>
<ul>
@@ -1892,7 +1978,7 @@ the device.</p>
</ul>
<h3>Changes in CUPS 1.5</h3>
<h3 class="title">Changes in CUPS 1.5</h3>
<ul>
@@ -1901,7 +1987,7 @@ the device.</p>
</ul>
<h3>Changes in CUPS 1.4.5</h3>
<h3 class="title">Changes in CUPS 1.4.5</h3>
<ul>
@@ -1912,7 +1998,7 @@ the device.</p>
</ul>
<h3>Changes in CUPS 1.4</h3>
<h3 class="title">Changes in CUPS 1.4</h3>
<ul>
@@ -1947,7 +2033,7 @@ the device.</p>
</ul>
<h3>Changes in CUPS 1.3.1</h3>
<h3 class="title">Changes in CUPS 1.3.1</h3>
<ul>
@@ -1962,7 +2048,7 @@ the device.</p>
</ul>
<h3>Changes in CUPS 1.3</h3>
<h3 class="title">Changes in CUPS 1.3</h3>
<ul>
@@ -1981,7 +2067,8 @@ the device.</p>
</ul>
<h3>Changes in CUPS 1.2.8</h3>
<h3 class="title">Changes in CUPS 1.2.8</h3>
<ul>
@@ -1990,7 +2077,8 @@ the device.</p>
</ul>
<h3>Changes in CUPS 1.2</h3>
<h3 class="title">Changes in CUPS 1.2</h3>
<ul>
@@ -2015,7 +2103,8 @@ the device.</p>
</ul>
<h3>Changes in CUPS 1.1</h3>
<h3 class="title">Changes in CUPS 1.1</h3>
<ul>

File diff suppressed because it is too large Load Diff