src/share/classes/javax/print/attribute/standard/MultipleDocumentHandling.java

Print this page


   1 /*
   2  * Copyright (c) 2000, 2004, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  34  * that controls finishing operations and the placement of one or more
  35  * print-stream pages into impressions and onto media sheets. When the value of
  36  * the {@link Copies Copies} attribute exceeds 1, MultipleDocumentHandling also
  37  * controls the order in which the copies that result from processing the
  38  * documents are produced. This attribute is relevant only for a multidoc print
  39  * job consisting of two or more individual docs.
  40  * <P>
  41  * Briefly, MultipleDocumentHandling determines the relationship between the
  42  * multiple input (electronic) documents fed into a multidoc print job and the
  43  * output (physical) document or documents produced by the multidoc print job.
  44  * There are two possibilities:
  45  * <UL>
  46  * <LI>
  47  * The multiple input documents are combined into a single output document.
  48  * Finishing operations ({@link Finishings Finishings}),
  49  * are performed on this single output
  50  * document. The {@link Copies Copies} attribute tells how many copies of this
  51  * single output document to produce. The MultipleDocumentHandling values
  52  * SINGLE_DOCUMENT and SINGLE_DOCUMENT_NEW_SHEET specify two variations of
  53  * this  possibility.
  54  * <P>
  55  * <LI>
  56  * The multiple input documents remain separate output documents. Finishing
  57  * operations ({@link Finishings Finishings}),
  58  * are performed on each output document
  59  * separately. The {@link Copies Copies} attribute tells how many copies of each
  60  * separate output document to produce. The MultipleDocumentHandling values
  61  * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES and SEPARATE_DOCUMENTS_COLLATED_COPIES
  62  * specify two variations of this possibility.
  63  * </UL>
  64  * <P>
  65  * In the detailed explanations below, if "<CODE>a</CODE>" represents an
  66  * instance of document data, then the result of processing the data in
  67  * document "<CODE>a</CODE>" is a sequence of media sheets represented by
  68  * "<CODE>a(*)</CODE>".
  69  * <P>
  70  * The standard MultipleDocumentHandling values are:
  71  * <UL>
  72  * <LI>
  73  * <A NAME="sdfi">{@link #SINGLE_DOCUMENT
  74  * <B>SINGLE_DOCUMENT</B>}</A>. If a print job has multiple
  75  * documents -- say, the document data is called <CODE>a</CODE> and
  76  * <CODE>b</CODE> -- then the result of processing all the document data
  77  * (<CODE>a</CODE> and then <CODE>b</CODE>) must be treated as a single sequence
  78  * of media sheets for finishing operations; that is, finishing would be
  79  * performed on the concatenation of the sequences <CODE>a(*),b(*)</CODE>. The
  80  * printer must not force the data in each document instance to be formatted
  81  * onto a new print-stream page, nor to start a new impression on a new media
  82  * sheet. If more than one copy is made, the ordering of the sets of media
  83  * sheets resulting from processing the document data must be
  84  * <CODE>a(*),b(*),a(*),b(*),...</CODE>, and the printer object must force
  85  * each copy (<CODE>a(*),b(*)</CODE>) to start on a new media sheet.
  86  * <P>
  87  * <LI>
  88  * <A NAME="sducfi">{@link #SEPARATE_DOCUMENTS_UNCOLLATED_COPIES
  89  * <B>SEPARATE_DOCUMENTS_UNCOLLATED_COPIES</B>}</A>. If a print job
  90  * has multiple documents -- say, the document data is called <CODE>a</CODE> and
  91  * <CODE>b</CODE> -- then the result of processing the data in each document
  92  * instance must be treated as a single sequence of media sheets for finishing
  93  * operations; that is, the sets <CODE>a(*)</CODE> and <CODE>b(*)</CODE> would
  94  * each be finished separately. The printer must force each copy of the result
  95  * of processing the data in a single document to start on a new media sheet.
  96  * If more than one copy is made, the ordering of the sets of media sheets
  97  * resulting from processing the document data must be
  98  * <CODE>a(*),a(*),...,b(*),b(*)...</CODE>.
  99  * <P>
 100  * <LI>
 101  * <A NAME="sdccfi">{@link #SEPARATE_DOCUMENTS_COLLATED_COPIES
 102  * <B>SEPARATE_DOCUMENTS_COLLATED_COPIES</B>}</A>. If a print job
 103  * has multiple documents -- say, the document data is called <CODE>a</CODE> and
 104  * <CODE>b</CODE> -- then the result of processing the data in each document
 105  * instance must be treated as a single sequence of media sheets for finishing
 106  * operations; that is, the sets <CODE>a(*)</CODE> and <CODE>b(*)</CODE> would
 107  * each be finished separately. The printer must force each copy of the result
 108  * of processing the data in a single document to start on a new media sheet.
 109  * If more than one copy is made, the ordering of the sets of media sheets
 110  * resulting from processing the document data must be
 111  * <CODE>a(*),b(*),a(*),b(*),...</CODE>.
 112  * <P>
 113  * <LI>
 114  * <A NAME="sdnsfi">{@link #SINGLE_DOCUMENT_NEW_SHEET
 115  * <B>SINGLE_DOCUMENT_NEW_SHEET</B>}</A>. Same as SINGLE_DOCUMENT,
 116  * except that the printer must ensure that the first impression of each
 117  * document instance in the job is placed on a new media sheet. This value
 118  * allows multiple documents to be stapled together with a single staple where
 119  * each document starts on a new sheet.
 120  * </UL>
 121  * <P>
 122  * SINGLE_DOCUMENT is the same as SEPARATE_DOCUMENTS_COLLATED_COPIES with
 123  * respect to ordering of print-stream pages, but not media sheet generation,
 124  * since SINGLE_DOCUMENT will put the first page of the next document on the
 125  * back side of a sheet if an odd number of pages have been produced so far
 126  * for the job, while SEPARATE_DOCUMENTS_COLLATED_COPIES always forces the
 127  * next document or document copy on to a new sheet.
 128  * <P>
 129  * In addition, if a {@link Finishings Finishings} attribute of
 130  * {@link Finishings#STAPLE STAPLE} is specified, then:
 131  * <UL>
 132  * <LI>
 133  * With SINGLE_DOCUMENT, documents <CODE>a</CODE> and <CODE>b</CODE> are
 134  * stapled together as a single document with no regard to new sheets.
 135  * <P>
 136  * <LI>
 137  * With SINGLE_DOCUMENT_NEW_SHEET, documents <CODE>a</CODE> and <CODE>b</CODE>
 138  * are stapled together as a single document, but document <CODE>b</CODE>
 139  * starts on a new sheet.
 140  * <P>
 141  * <LI>
 142  * With SEPARATE_DOCUMENTS_UNCOLLATED_COPIES and
 143  * SEPARATE_DOCUMENTS_COLLATED_COPIES, documents <CODE>a</CODE> and
 144  * <CODE>b</CODE> are stapled separately.
 145  * </UL>
 146  * <P>
 147  * <I>Note:</I> None of these values provide means to produce uncollated
 148  * sheets within a document, i.e., where multiple copies of sheet <I>n</I>
 149  * are produced before sheet <I>n</I>+1 of the same document.
 150  * To specify that, see the {@link SheetCollate SheetCollate} attribute.
 151  * <P>
 152  * <B>IPP Compatibility:</B> The category name returned by
 153  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
 154  * integer value is the IPP enum value.  The <code>toString()</code> method
 155  * returns the IPP string representation of the attribute value.
 156  * <P>
 157  *
 158  * @see  Copies
 159  * @see  Finishings
 160  * @see  NumberUp


   1 /*
   2  * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  34  * that controls finishing operations and the placement of one or more
  35  * print-stream pages into impressions and onto media sheets. When the value of
  36  * the {@link Copies Copies} attribute exceeds 1, MultipleDocumentHandling also
  37  * controls the order in which the copies that result from processing the
  38  * documents are produced. This attribute is relevant only for a multidoc print
  39  * job consisting of two or more individual docs.
  40  * <P>
  41  * Briefly, MultipleDocumentHandling determines the relationship between the
  42  * multiple input (electronic) documents fed into a multidoc print job and the
  43  * output (physical) document or documents produced by the multidoc print job.
  44  * There are two possibilities:
  45  * <UL>
  46  * <LI>
  47  * The multiple input documents are combined into a single output document.
  48  * Finishing operations ({@link Finishings Finishings}),
  49  * are performed on this single output
  50  * document. The {@link Copies Copies} attribute tells how many copies of this
  51  * single output document to produce. The MultipleDocumentHandling values
  52  * SINGLE_DOCUMENT and SINGLE_DOCUMENT_NEW_SHEET specify two variations of
  53  * this  possibility.
  54  *
  55  * <LI>
  56  * The multiple input documents remain separate output documents. Finishing
  57  * operations ({@link Finishings Finishings}),
  58  * are performed on each output document
  59  * separately. The {@link Copies Copies} attribute tells how many copies of each
  60  * separate output document to produce. The MultipleDocumentHandling values
  61  * SEPARATE_DOCUMENTS_UNCOLLATED_COPIES and SEPARATE_DOCUMENTS_COLLATED_COPIES
  62  * specify two variations of this possibility.
  63  * </UL>
  64  * <P>
  65  * In the detailed explanations below, if "<CODE>a</CODE>" represents an
  66  * instance of document data, then the result of processing the data in
  67  * document "<CODE>a</CODE>" is a sequence of media sheets represented by
  68  * "<CODE>a(*)</CODE>".
  69  * <P>
  70  * The standard MultipleDocumentHandling values are:
  71  * <UL>
  72  * <LI>
  73  * <A NAME="sdfi">{@link #SINGLE_DOCUMENT
  74  * <B>SINGLE_DOCUMENT</B>}</A>. If a print job has multiple
  75  * documents -- say, the document data is called <CODE>a</CODE> and
  76  * <CODE>b</CODE> -- then the result of processing all the document data
  77  * (<CODE>a</CODE> and then <CODE>b</CODE>) must be treated as a single sequence
  78  * of media sheets for finishing operations; that is, finishing would be
  79  * performed on the concatenation of the sequences <CODE>a(*),b(*)</CODE>. The
  80  * printer must not force the data in each document instance to be formatted
  81  * onto a new print-stream page, nor to start a new impression on a new media
  82  * sheet. If more than one copy is made, the ordering of the sets of media
  83  * sheets resulting from processing the document data must be
  84  * <CODE>a(*),b(*),a(*),b(*),...</CODE>, and the printer object must force
  85  * each copy (<CODE>a(*),b(*)</CODE>) to start on a new media sheet.
  86  *
  87  * <LI>
  88  * <A NAME="sducfi">{@link #SEPARATE_DOCUMENTS_UNCOLLATED_COPIES
  89  * <B>SEPARATE_DOCUMENTS_UNCOLLATED_COPIES</B>}</A>. If a print job
  90  * has multiple documents -- say, the document data is called <CODE>a</CODE> and
  91  * <CODE>b</CODE> -- then the result of processing the data in each document
  92  * instance must be treated as a single sequence of media sheets for finishing
  93  * operations; that is, the sets <CODE>a(*)</CODE> and <CODE>b(*)</CODE> would
  94  * each be finished separately. The printer must force each copy of the result
  95  * of processing the data in a single document to start on a new media sheet.
  96  * If more than one copy is made, the ordering of the sets of media sheets
  97  * resulting from processing the document data must be
  98  * <CODE>a(*),a(*),...,b(*),b(*)...</CODE>.
  99  *
 100  * <LI>
 101  * <A NAME="sdccfi">{@link #SEPARATE_DOCUMENTS_COLLATED_COPIES
 102  * <B>SEPARATE_DOCUMENTS_COLLATED_COPIES</B>}</A>. If a print job
 103  * has multiple documents -- say, the document data is called <CODE>a</CODE> and
 104  * <CODE>b</CODE> -- then the result of processing the data in each document
 105  * instance must be treated as a single sequence of media sheets for finishing
 106  * operations; that is, the sets <CODE>a(*)</CODE> and <CODE>b(*)</CODE> would
 107  * each be finished separately. The printer must force each copy of the result
 108  * of processing the data in a single document to start on a new media sheet.
 109  * If more than one copy is made, the ordering of the sets of media sheets
 110  * resulting from processing the document data must be
 111  * <CODE>a(*),b(*),a(*),b(*),...</CODE>.
 112  *
 113  * <LI>
 114  * <A NAME="sdnsfi">{@link #SINGLE_DOCUMENT_NEW_SHEET
 115  * <B>SINGLE_DOCUMENT_NEW_SHEET</B>}</A>. Same as SINGLE_DOCUMENT,
 116  * except that the printer must ensure that the first impression of each
 117  * document instance in the job is placed on a new media sheet. This value
 118  * allows multiple documents to be stapled together with a single staple where
 119  * each document starts on a new sheet.
 120  * </UL>
 121  * <P>
 122  * SINGLE_DOCUMENT is the same as SEPARATE_DOCUMENTS_COLLATED_COPIES with
 123  * respect to ordering of print-stream pages, but not media sheet generation,
 124  * since SINGLE_DOCUMENT will put the first page of the next document on the
 125  * back side of a sheet if an odd number of pages have been produced so far
 126  * for the job, while SEPARATE_DOCUMENTS_COLLATED_COPIES always forces the
 127  * next document or document copy on to a new sheet.
 128  * <P>
 129  * In addition, if a {@link Finishings Finishings} attribute of
 130  * {@link Finishings#STAPLE STAPLE} is specified, then:
 131  * <UL>
 132  * <LI>
 133  * With SINGLE_DOCUMENT, documents <CODE>a</CODE> and <CODE>b</CODE> are
 134  * stapled together as a single document with no regard to new sheets.
 135  *
 136  * <LI>
 137  * With SINGLE_DOCUMENT_NEW_SHEET, documents <CODE>a</CODE> and <CODE>b</CODE>
 138  * are stapled together as a single document, but document <CODE>b</CODE>
 139  * starts on a new sheet.
 140  *
 141  * <LI>
 142  * With SEPARATE_DOCUMENTS_UNCOLLATED_COPIES and
 143  * SEPARATE_DOCUMENTS_COLLATED_COPIES, documents <CODE>a</CODE> and
 144  * <CODE>b</CODE> are stapled separately.
 145  * </UL>
 146  * <P>
 147  * <I>Note:</I> None of these values provide means to produce uncollated
 148  * sheets within a document, i.e., where multiple copies of sheet <I>n</I>
 149  * are produced before sheet <I>n</I>+1 of the same document.
 150  * To specify that, see the {@link SheetCollate SheetCollate} attribute.
 151  * <P>
 152  * <B>IPP Compatibility:</B> The category name returned by
 153  * <CODE>getName()</CODE> is the IPP attribute name.  The enumeration's
 154  * integer value is the IPP enum value.  The <code>toString()</code> method
 155  * returns the IPP string representation of the attribute value.
 156  * <P>
 157  *
 158  * @see  Copies
 159  * @see  Finishings
 160  * @see  NumberUp