Author: jeremias
Date: Tue Jul 28 06:41:49 2009
New Revision: 798417
URL: http://svn.apache.org/viewvc?rev=798417&view=rev
Log:
PCL Output: Added support for specifying the output bin (pcl:output-bin
extension, same way pcl:paper-source works).
Modified:
xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/output.xml
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLGenerator.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRenderer.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/extensions/PCLElementMapping.java
xmlgraphics/fop/trunk/status.xml
Modified: xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/output.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/output.xml?rev=798417&r1=798416&r2=798417&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/output.xml
(original)
+++ xmlgraphics/fop/trunk/src/documentation/content/xdocs/trunk/output.xml Tue
Jul 28 06:41:49 2009
@@ -422,6 +422,28 @@
Consult the technical reference for your printer for all available
values.
</p>
</section>
+ <section id="pcl-output-bin">
+ <title>Output Bin</title>
+ <p>
+ The <code>output-bin</code> extension attribute on
fo:simple-page-master allows to
+ select the output bin into which the printed output should be fed.
Example:
+ </p>
+ <source><![CDATA[
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="simple" pcl:output-bin="2">
+ ...
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+]]></source>
+ <p>
+ Note: the output bin number is a positive integer and the value
depends on
+ the target printer. Not all PCL printers support the same output
bins.
+ Usually,
+ "1" is the upper output bin,
+ "2" is the lower (rear) output bin.
+ Consult the technical reference for your printer for all available
values.
+ </p>
+ </section>
<section id="pcl-duplex-mode">
<title>Page Duplex Mode</title>
<p>
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java?rev=798417&r1=798416&r2=798417&view=diff
==============================================================================
---
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
(original)
+++
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java
Tue Jul 28 06:41:49 2009
@@ -186,6 +186,13 @@
gen.selectPaperSource(Integer.parseInt(paperSource.toString()));
}
+ //Output bin
+ Object outputBin = getContext().getForeignAttribute(
+ PCLElementMapping.PCL_OUTPUT_BIN);
+ if (outputBin != null) {
+ gen.selectOutputBin(Integer.parseInt(outputBin.toString()));
+ }
+
// Is Page duplex?
Object pageDuplex = getContext().getForeignAttribute(
PCLElementMapping.PCL_DUPLEX_MODE);
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLGenerator.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLGenerator.java?rev=798417&r1=798416&r2=798417&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLGenerator.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLGenerator.java
Tue Jul 28 06:41:49 2009
@@ -240,6 +240,18 @@
}
/**
+ * Selects the output bin. The parameter is usually printer-specific.
Usually, "1" is the
+ * default output bin (upper bin) and "2" is the lower (rear) output bin.
Some printers
+ * may support additional output bins. Consult the technical reference for
your printer
+ * for all available values.
+ * @param selector the integer representing the output bin
+ * @throws IOException In case of an I/O error
+ */
+ public void selectOutputBin(int selector) throws IOException {
+ writeCommand("&l" + selector + "G");
+ }
+
+ /**
* Selects the duplexing mode for the page.
* The parameter is usually printer-specific.
* "0" means Simplex,
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRenderer.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRenderer.java?rev=798417&r1=798416&r2=798417&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRenderer.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRenderer.java
Tue Jul 28 06:41:49 2009
@@ -289,6 +289,12 @@
gen.selectPaperSource(Integer.parseInt(paperSource));
}
+ //Output bin
+ String outputBin =
page.getForeignAttributeValue(PCLElementMapping.PCL_OUTPUT_BIN);
+ if (outputBin != null) {
+ gen.selectOutputBin(Integer.parseInt(outputBin));
+ }
+
// Is Page duplex?
String pageDuplex =
page.getForeignAttributeValue(PCLElementMapping.PCL_DUPLEX_MODE);
if (pageDuplex != null) {
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/extensions/PCLElementMapping.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/extensions/PCLElementMapping.java?rev=798417&r1=798416&r2=798417&view=diff
==============================================================================
---
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/extensions/PCLElementMapping.java
(original)
+++
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/extensions/PCLElementMapping.java
Tue Jul 28 06:41:49 2009
@@ -40,6 +40,10 @@
public static final QName PCL_PAPER_SOURCE
= new QName(PCLElementMapping.NAMESPACE, null, "paper-source");
+ /** The extension attribute for the PCL output bin */
+ public static final QName PCL_OUTPUT_BIN
+ = new QName(PCLElementMapping.NAMESPACE, null, "output-bin");
+
/** The extension attribute for the PCL duplex mode */
public static final QName PCL_DUPLEX_MODE
= new QName(PCLElementMapping.NAMESPACE, null, "duplex-mode");
Modified: xmlgraphics/fop/trunk/status.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=798417&r1=798416&r2=798417&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Tue Jul 28 06:41:49 2009
@@ -59,6 +59,9 @@
-->
<release version="FOP Trunk" date="TBD">
<action context="Renderers" dev="JM" type="add">
+ PCL Output: Added support for specifying the output bin.
+ </action>
+ <action context="Renderers" dev="JM" type="add">
AFP Output: Added support for embedding external AFP form maps (form
defs) using the
afp:include-form-map extension.
</action>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]