<dd class="description">Accordian-fold the paper vertically into four sections</dd>
<dt>IPP_FINISHINGS_FOLD_DOUBLE_GATE </dt>
<dd class="description">Fold the top and bottom quarters of the paper towards the midline, then fold in half vertically</dd>
+<dt>IPP_FINISHINGS_FOLD_ENGINEERING_Z </dt>
+<dd class="description">Fold the paper vertically into two small sections and one larger, forming an elongated Z</dd>
<dt>IPP_FINISHINGS_FOLD_GATE </dt>
<dd class="description">Fold the top and bottom quarters of the paper towards the midline</dd>
<dt>IPP_FINISHINGS_FOLD_HALF </dt>
<dd class="description">Punch 2 holes right side</dd>
<dt>IPP_FINISHINGS_PUNCH_DUAL_TOP </dt>
<dd class="description">Punch 2 holes top edge</dd>
+<dt>IPP_FINISHINGS_PUNCH_MULTIPLE_BOTTOM </dt>
+<dd class="description">Pucnh multiple holes bottom edge</dd>
+<dt>IPP_FINISHINGS_PUNCH_MULTIPLE_LEFT </dt>
+<dd class="description">Pucnh multiple holes left side</dd>
+<dt>IPP_FINISHINGS_PUNCH_MULTIPLE_RIGHT </dt>
+<dd class="description">Pucnh multiple holes right side</dd>
+<dt>IPP_FINISHINGS_PUNCH_MULTIPLE_TOP </dt>
+<dd class="description">Pucnh multiple holes top edge</dd>
<dt>IPP_FINISHINGS_PUNCH_QUAD_BOTTOM </dt>
<dd class="description">Punch 4 holes bottom edge</dd>
<dt>IPP_FINISHINGS_PUNCH_QUAD_LEFT </dt>
<h4 class="returnvalue">Return Value</h4>
<p class="description">1 on success, 0 on failure</p>
<h4 class="discussion">Discussion</h4>
-<p class="discussion">The page header can be initialized using <a href="#cupsRasterInterpretPPD"><code>cupsRasterInterpretPPD</code></a>.
+<p class="discussion">The page header can be initialized using <a href="#cupsRasterInitPWGHeader"><code>cupsRasterInitPWGHeader</code></a>.
</p>
<h3 class="function"><a name="cupsRasterWritePixels">cupsRasterWritePixels</a></h3>
<dt>CUPS_RASTER_WRITE_COMPRESSED <span class="info"> CUPS 1.3/macOS 10.5 </span></dt>
<dd class="description">Open stream for compressed writing </dd>
<dt>CUPS_RASTER_WRITE_PWG <span class="info"> CUPS 1.5/macOS 10.7 </span></dt>
-<dd class="description">Open stream for compressed writing in PWG mode </dd>
+<dd class="description">Open stream for compressed writing in PWG Raster mode </dd>
</dl>
<h3 class="enumeration"><a name="cups_order_e">cups_order_e</a></h3>
<p class="description">cupsColorOrder attribute values</p>
cups_raster_iocb_t iocb; /* IO callback */
cups_mode_t mode; /* Read/write mode */
cups_page_header2_t header; /* Raster header for current page */
- unsigned count, /* Current row run-length count */
+ unsigned rowheight, /* Row height in lines */
+ count, /* Current row run-length count */
remaining, /* Remaining rows in page image */
bpp; /* Bytes per pixel/color */
unsigned char *pixels, /* Pixels for current row */
* 'cupsRasterWriteHeader2()' - Write a raster page header from a version 2
* page header structure.
*
- * The page header can be initialized using @link cupsRasterInterpretPPD@.
+ * The page header can be initialized using @link cupsRasterInitPWGHeader@.
*
* @since CUPS 1.2/macOS 10.5@
*/
if (!cups_raster_update(r))
return (0);
+ if (r->mode == CUPS_RASTER_WRITE_APPLE)
+ {
+ r->rowheight = h->HWResolution[0] / h->HWResolution[1];
+
+ if (h->HWResolution[0] != (r->rowheight * h->HWResolution[1]))
+ return (0);
+ }
+ else
+ r->rowheight = 1;
+
/*
* Write the raster header...
*/
* Increase the repeat count...
*/
- r->count ++;
+ r->count += r->rowheight;
r->pcurrent = r->pixels;
/*
else
return (len);
}
- else if (r->count == 256)
+ else if (r->count > (256 - r->rowheight))
{
if (cups_raster_write(r, r->pixels) <= 0)
return (0);
* Increase the repeat count...
*/
- r->count ++;
+ r->count += r->rowheight;
r->pcurrent = r->pixels;
/*
header.cupsWidth = 256;
header.cupsHeight = 256;
header.cupsBytesPerLine = 256;
+ header.HWResolution[0] = 64;
+ header.HWResolution[1] = 64;
+ header.PageSize[0] = 288;
+ header.PageSize[1] = 288;
+ header.cupsPageSize[0] = 288.0f;
+ header.cupsPageSize[1] = 288.0f;
if (page & 1)
{
expected.cupsWidth = 256;
expected.cupsHeight = 256;
expected.cupsBytesPerLine = 256;
+ expected.HWResolution[0] = 64;
+ expected.HWResolution[1] = 64;
+ expected.PageSize[0] = 288;
+ expected.PageSize[1] = 288;
+
+ if (mode != CUPS_RASTER_WRITE_PWG)
+ {
+ expected.cupsPageSize[0] = 288.0f;
+ expected.cupsPageSize[1] = 288.0f;
+ }
if (mode >= CUPS_RASTER_WRITE_PWG)
{