Index: src/documentation/content/xdocs/trunk/output.xml
===================================================================
--- src/documentation/content/xdocs/trunk/output.xml	(revision 662413)
+++ src/documentation/content/xdocs/trunk/output.xml	(working copy)
@@ -396,7 +396,7 @@
       <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
                xmlns:pcl="http://xmlgraphics.apache.org/fop/extensions/pcl">
 ]]></source>
-      <section id="pcl-page-source">
+     <section id="pcl-page-source">
         <title>Page Source (Tray selection)</title>
         <p>
           The page-source extension attribute on fo:simple-page-master allows to 
@@ -422,6 +422,31 @@
           Consult the technical reference for your printer for all available values.
         </p>
       </section>
+      <section id="pcl-page-is-duplex">
+        <title>Page Duplex Type</title>
+        <p>
+          The page-source extension attribute on fo:simple-page-master allows to 
+          select the duplex type to be used for a particular simple-page-master is
+          Example:
+        </p>
+      <source><![CDATA[
+      <fo:layout-master-set>
+        <fo:simple-page-master master-name="simple" pcl:page-is-duplex-source="0">
+          ...
+        </fo:simple-page-master>
+      </fo:layout-master-set>
+]]></source>
+        <p>
+          Note: the duplex is a positive integer and the value depends on
+          the target printer. Not all PCL printers support duplexing.
+          Usually, 
+          "0" is simplex,
+          "1" is duplex (long-edge binding), 
+          "2" is duplex (short-edge binding), 
+
+          Consult the technical reference for your printer for all available values.
+        </p>
+      </section>
     </section>
   </section>
   <section id="afp">
Index: src/java/org/apache/fop/render/pcl/PCLGenerator.java
===================================================================
--- src/java/org/apache/fop/render/pcl/PCLGenerator.java	(revision 662413)
+++ src/java/org/apache/fop/render/pcl/PCLGenerator.java	(working copy)
@@ -230,6 +230,19 @@
     }
 
     /**
+     * Selects the duplexing type for the page. 
+     * The parameter is usually printer-specific. 
+     * "0" means Simplex
+     * "1" means Duplex, Long-Edge Binding
+     * "2" means Duplex, Short-Edge Binding
+     * @param selector the integer representing the duplexing type of the page
+     * @throws IOException In case of an I/O error
+     */
+    public void selectDuplexType(int selector) throws IOException {
+        writeCommand("&l" + selector + "S");
+    }
+
+    /**
      * Clears the horizontal margins.
      * @throws IOException In case of an I/O error
      */
Index: src/java/org/apache/fop/render/pcl/PCLRenderer.java
===================================================================
--- src/java/org/apache/fop/render/pcl/PCLRenderer.java	(revision 662413)
+++ src/java/org/apache/fop/render/pcl/PCLRenderer.java	(working copy)
@@ -402,12 +402,17 @@
         saveGraphicsState();
 
         //Paper source
-        String paperSource = page.getForeignAttributeValue(
-                new QName(PCLElementMapping.NAMESPACE, null, "paper-source"));
+        String paperSource = page.getForeignAttributeValue( new QName(PCLElementMapping.NAMESPACE, null, "paper-source"));
         if (paperSource != null) {
             gen.selectPaperSource(Integer.parseInt(paperSource));
         }
 
+        // Is Page duplex?
+        String pageDuplex = page.getForeignAttributeValue( new QName(PCLElementMapping.NAMESPACE, null, "page-is-duplex"));
+        if (pageDuplex != null) {
+            gen.selectDuplexType(Integer.parseInt(pageDuplex));
+        }
+
         //Page size
         final long pagewidth = Math.round(page.getViewArea().getWidth());
         final long pageheight = Math.round(page.getViewArea().getHeight());
