xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From psan...@apache.org
Subject svn commit: r1416565 [3/5] - in /xmlgraphics/site/trunk/content/fop: 0.95/ 1.0/ 1.1/ trunk/
Date Mon, 03 Dec 2012 15:46:44 GMT
Modified: xmlgraphics/site/trunk/content/fop/1.0/output.mdtext
URL: http://svn.apache.org/viewvc/xmlgraphics/site/trunk/content/fop/1.0/output.mdtext?rev=1416565&r1=1416564&r2=1416565&view=diff
==============================================================================
--- xmlgraphics/site/trunk/content/fop/1.0/output.mdtext (original)
+++ xmlgraphics/site/trunk/content/fop/1.0/output.mdtext Mon Dec  3 15:46:33 2012
@@ -57,47 +57,48 @@ FOP does not currently support several d
 Another popular post-processing tool is [iText](http://www.lowagie.com/iText) , which has tools for adding security features, document properties, watermarks, and many other features to PDF files.
 <warning>Caveat: iText may swallow PDF bookmarks. But [Jens Stavnstrup tells us](http://issues.apache.org/bugzilla/show_bug.cgi?id=37589) that this doesn't happen if you use iText's PDFStamper.</warning>
 Here is some sample code that uses iText to encrypt a FOP-generated PDF. (Note that FOP now supports [PDF encryption](pdfencryption.html) . However the principles for using iText for other PDF features are similar.)
-public static void main(String args[]) {
-  try {
-    ByteArrayOutputStream fopout = new ByteArrayOutputStream();
-    FileOutputStream outfile = new FileOutputStream(args[2]);
-    FopFactory fopFactory = FopFactory.newInstance();
-    Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, fopout);
-    
-    Transformer transformer = TransformerFactory.newInstance().newTransformer(
-        new StreamSource(new File(args[1])));
-    transformer.transform(new StreamSource(new File(args[0])),
-        new SAXResult(fop.getDefaultHandler()));
-    PdfReader reader = new PdfReader(fopout.toByteArray());
-    int n = reader.getNumberOfPages();
-    Document document = new Document(reader.getPageSizeWithRotation(1));
-    PdfWriter writer = PdfWriter.getInstance(document, outfile);
-    writer.setEncryption(PdfWriter.STRENGTH40BITS, "pdf", null,
-      PdfWriter.AllowCopy);
-    document.open();
-    PdfContentByte cb = writer.getDirectContent();
-    PdfImportedPage page;
-    int rotation;
-    int i = 0;
-    while (i < n) {
-      i++;
-      document.setPageSize(reader.getPageSizeWithRotation(i));
-      document.newPage();
-      page = writer.getImportedPage(reader, i);
-      rotation = reader.getPageRotation(i);
-      if (rotation == 90 || rotation == 270) {
-        cb.addTemplate(page, 0, -1f, 1f, 0, 0,
-        reader.getPageSizeWithRotation(i).height());
-      } else {
-        cb.addTemplate(page, 1f, 0, 0, 1f, 0, 0);
+
+    public static void main(String args[]) {
+      try {
+        ByteArrayOutputStream fopout = new ByteArrayOutputStream();
+        FileOutputStream outfile = new FileOutputStream(args[2]);
+        FopFactory fopFactory = FopFactory.newInstance();
+        Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, fopout);
+        
+        Transformer transformer = TransformerFactory.newInstance().newTransformer(
+            new StreamSource(new File(args[1])));
+        transformer.transform(new StreamSource(new File(args[0])),
+            new SAXResult(fop.getDefaultHandler()));
+        PdfReader reader = new PdfReader(fopout.toByteArray());
+        int n = reader.getNumberOfPages();
+        Document document = new Document(reader.getPageSizeWithRotation(1));
+        PdfWriter writer = PdfWriter.getInstance(document, outfile);
+        writer.setEncryption(PdfWriter.STRENGTH40BITS, "pdf", null,
+          PdfWriter.AllowCopy);
+        document.open();
+        PdfContentByte cb = writer.getDirectContent();
+        PdfImportedPage page;
+        int rotation;
+        int i = 0;
+        while (i < n) {
+          i++;
+          document.setPageSize(reader.getPageSizeWithRotation(i));
+          document.newPage();
+          page = writer.getImportedPage(reader, i);
+          rotation = reader.getPageRotation(i);
+          if (rotation == 90 || rotation == 270) {
+            cb.addTemplate(page, 0, -1f, 1f, 0, 0,
+            reader.getPageSizeWithRotation(i).height());
+          } else {
+            cb.addTemplate(page, 1f, 0, 0, 1f, 0, 0);
+          }
+          System.out.println("Processed page " + i);
+        }
+        document.close();
+      } catch( Exception e) {
+        e.printStackTrace();
       }
-      System.out.println("Processed page " + i);
     }
-    document.close();
-  } catch( Exception e) {
-    e.printStackTrace();
-  }
-}
 Check the iText tutorial and documentation for setting access flags, password, encryption strength and other parameters.
 
 ### Watermarks <a id="pdf-watermark"></a>
@@ -116,13 +117,14 @@ The PostScript renderer has been brought
 ### Configuration <a id="ps-configuration"></a>
 
 The PostScript renderer configuration currently allows the following settings:
-<renderer mime="application/postscript">
-  <auto-rotate-landscape>false</auto-rotate-landscape>
-  <language-level>3</language-level>
-  <optimize-resources>false</optimize-resources>
-  <safe-set-page-device>false</safe-set-page-device>
-  <dsc-compliant>true</dsc-compliant>
-</renderer>
+
+    <renderer mime="application/postscript">
+      <auto-rotate-landscape>false</auto-rotate-landscape>
+      <language-level>3</language-level>
+      <optimize-resources>false</optimize-resources>
+      <safe-set-page-device>false</safe-set-page-device>
+      <dsc-compliant>true</dsc-compliant>
+    </renderer>
 The default value for the "auto-rotate-landscape" setting is "false". Setting it to "true" will automatically rotate landscape pages and will mark them as landscape.
 
 The default value for the "language-level" setting is "3". This setting specifies the PostScript language level which should be used by FOP. Set this to "2" only if you don't have a Level 3 capable interpreter.
@@ -179,11 +181,12 @@ The output created by the PCLRenderer is
 ### Configuration <a id="pcl-configuration"></a>
 
 The PCL renderer configuration currently allows the following settings:
-<renderer mime="application/vnd.hp-PCL">
-  <rendering>quality</rendering>
-  <text-rendering>bitmap</text-rendering>
-  <disable-pjl>false</disable-pjl>
-</renderer>
+
+    <renderer mime="application/vnd.hp-PCL">
+      <rendering>quality</rendering>
+      <text-rendering>bitmap</text-rendering>
+      <disable-pjl>false</disable-pjl>
+    </renderer>
 The default value for the "rendering" setting is "speed" which causes borders to be painted as plain rectangles. In this mode, no special borders (dotted, dashed etc.) are available. If you want support for all border modes, set the value to "quality" as indicated above. This will cause the borders to be painted as bitmaps.
 
 The default value for the "text-rendering" setting is "auto" which paints the base fonts using PCL fonts. Non-base fonts are painted as bitmaps through Java2D. If the mix of painting methods results in unwelcome output, you can set this to "bitmap" which causes all text to be rendered as bitmaps.
@@ -199,7 +202,7 @@ The PCL Renderer supports some PCL speci
       <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
                xmlns:pcl="http://xmlgraphics.apache.org/fop/extensions/pcl">
 
-#### Page Source (Tray selection) ## <a id="pcl-page-source"></a>
+#### Page Source (Tray selection)<a id="pcl-page-source"></a>
 
 The page-source extension attribute on fo:simple-page-master allows to select the paper tray the sheet for a particular simple-page-master is to be taken from. Example:
 
@@ -211,7 +214,7 @@ The page-source extension attribute on f
 
 Note: the tray number is a positive integer and the value depends on the target printer. Not all PCL printers support the same paper trays. Usually, "1" is the default tray, "2" is the manual paper feed, "3" is the manual envelope feed, "4" is the "lower" tray and "7" is "auto-select". Consult the technical reference for your printer for all available values.
 
-#### Output Bin ## <a id="pcl-output-bin"></a>
+#### Output Bin<a id="pcl-output-bin"></a>
 
 The `output-bin` extension attribute on fo:simple-page-master allows to select the output bin into which the printed output should be fed. Example:
 
@@ -223,7 +226,7 @@ The `output-bin` extension attribute on 
 
 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.
 
-#### Page Duplex Mode ## <a id="pcl-duplex-mode"></a>
+#### Page Duplex Mode<a id="pcl-duplex-mode"></a>
 
 The duplex-mode extension attribute on fo:simple-page-master allows to select the duplex mode to be used for a particular simple-page-master. Example:
 
@@ -273,13 +276,14 @@ There are still a big number of older (o
 
 ### Configuration <a id="afp-configuration"></a>
 
-#### Fonts ## <a id="afp-font-config"></a>
+#### Fonts<a id="afp-font-config"></a>
 
 The AFP Renderer requires special configuration particularly related to fonts. AFP Render configuration is done through the normal FOP configuration file. The MIME type for the AFP Renderer is application/x-afp which means the AFP Renderer section in the FOP configuration file looks like:
-<renderer mime="application/x-afp">
-  <!-- AFP Renderer -->
-  ...
-</renderer>
+
+    <renderer mime="application/x-afp">
+      <!-- AFP Renderer -->
+      ...
+    </renderer>
 There are 4 font configuration variants supported:
 
 
@@ -292,6 +296,7 @@ There are 4 font configuration variants 
 1. FOP built-in Base14 fonts
 
 A typical raster font configuration looks like:
+
       <!-- This is an example of mapping actual IBM raster fonts / code pages to a FOP font -->
         <font>
         <!-- The afp-font element defines the IBM code page, the matching Java encoding and the
@@ -318,7 +323,9 @@ A typical raster font configuration look
         <font-triplet name="Times-Roman" style="normal" weight="normal"/>
         <font-triplet name="TimesNewRoman" style="normal" weight="normal"/>
       </font>
+
 An outline font configuration is simpler as the individual font size entries are not required. However, the characterset definition is now required within the afp-font element.
+
       <font>
           <afp-font type="outline" codepage="T1V10500" encoding="Cp500" characterset="CZH200  "
              base-uri="file:/fonts/ibm" />
@@ -330,6 +337,7 @@ An outline font configuration is simpler
 If "base-uri" is missing or a relative URI, the fonts are resolved relative to the font base URI specified in the configuration (or on the FopFactory).
 Previously, the location of the font files was given by the "path" attribute. This is still supported for the time being, but you should move to using the more flexible "base-uri" attribute so you can profit from the power of URI resolvers.
 A CID-keyed font (Type 0, double-byte outline font) configuration is much the same as an outline font. However, the characterset definition is now required within the afp-font element.
+
       <font>
           <afp-font type="CIDKeyed" characterset="CZJHMNU" 
              codepage="T1120000" encoding="UnicodeBigUnmarked"
@@ -340,6 +348,7 @@ A CID-keyed font (Type 0, double-byte ou
 Note that the value of the encoding attribute in the example is the double-byte encoding 'UnicodeBigUnmarked' (UTF-16BE).
 
 Experimentation has shown that the font metrics for the FOP built-in Base14 fonts are actually very similar to some of the IBM outline and raster fonts. In cases were the IBM font files are not available the base-uri attribute in the afp-font element can be replaced by a base14-font attribute giving the name of the matching Base14 font. In this case the AFP Renderer will take the font metrics from the built-in font.
+
       <!-- The following are examples of defining outline fonts based on FOP built-in
            font metrics for the Adobe Base14 fonts -->
       <!-- sans-serif fonts based on Helvetica -->
@@ -410,12 +419,13 @@ Experimentation has shown that the font 
       </font>
 By default, all manually configured fonts are embedded, unless they are matched in the [section of the configuration file](fonts.html#embedding) . However, the default fonts shown above will not be embedded.
 
-#### Output Resolution ## <a id="afp-renderer-resolution-config"></a>
+#### Output Resolution<a id="afp-renderer-resolution-config"></a>
 
 By default the AFP Renderer creates output with a resolution of 240 dpi. This can be overridden by the <renderer-resolution/> configuration element. Example:
 
       <renderer-resolution>240</renderer-resolution>
-### Images ## <a id="afp-image-config"></a>
+
+#### Images<a id="afp-image-config"></a>
 
 By default the AFP Renderer converts all images to 8 bit grey level. This can be overridden by the <images/> configuration element. Example:
 
@@ -439,19 +449,19 @@ Setting `cmyk="true"` on the `images` el
 When the color mode is set to 1 bit (bi-level), the "dithering-quality" attribute can be used to select the level of quality to use when converting images to bi-level images. Valid values for this attribute are floating point numbers from 0.0 (fastest) to 1.0 (best), or special values: "minimum" (=0.0), "maximum" (1.0), "medium" (0.5, the default). For the higher settings to work as expected, JAI needs to be present in the classpath. If JAI is present, 0.0 results in a minimal darkness-level switching between white and black. 0.5 does bayer-based dithering and 1.0 will use error-diffusion dithering. The higher the value, the higher the quality and the slower the processing of the images.
 
       <images mode="b+w" bits-per-pixel="1" dithering-quality="maximum"/>
-### Shading ## <a id="afp-shading-config"></a>
+#### Shading<a id="afp-shading-config"></a>
 
 By default, filled rectangles are painted using their given color using a PTOCA I-axis rule (DIR). But not all environments handle these colors correctly. That's why a setting is supported that paints the rectangles using an ordered dither pattern (bi-level) with an inline IOCA FS10 image that is used together with the "replicate and trim" mapping. The optional "shading" element can be used to control the shading mode. Its default value is "color". To enable the dithered mode, use "dithered". Example:
 
       <shading>dithered</shading>
 
-#### Resource Group File ## <a id="afp-resource-group-file"></a>
+#### Resource Group File<a id="afp-resource-group-file"></a>
 
 By default the AFP Renderer will place all data resource objects such as images within the document of the main output datastream. An external resource group file where document resources may be specified with the <resource-group-file/> configuration element. Example:
 
       <resource-group-file>external_resources.afp</resource-group-file>
 Be careful when using this option not to overwrite existing resource files from previous rendering runs.
-### Resource Level Defaults ## <a id="afp-resource-level-defaults"></a>
+#### Resource Level Defaults<a id="afp-resource-level-defaults"></a>
 
 By default, bitmap image objects (or page segments derived from them) are put in the print-file-level resource group and GOCA graphics are inlined for compatibility with the AFP Workbench tool.
 
@@ -467,7 +477,7 @@ The AFP Renderer supports some AFP speci
       <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
                xmlns:afp="http://xmlgraphics.apache.org/fop/extensions/afp">
 
-#### Page Overlay (IPO) Extension ## <a id="afp-page-overlay"></a>
+#### Page Overlay (IPO) Extension<a id="afp-page-overlay"></a>
 
 The include-page-overlay extension element allows to define on a per simple-page-master basis a page overlay resource. Example:
 
@@ -480,7 +490,7 @@ The include-page-overlay extension eleme
 
 The mandatory name attribute must refer to an 8 character (space padded) resource name that must be known in the AFP processing environment. Optional x and y attributes can be specified to place the Overlay at an offset from the top left of the page.
 
-#### Page Segment (IPS) Extension ## <a id="afp-page-segment"></a>
+#### Page Segment (IPS) Extension<a id="afp-page-segment"></a>
 
 The include-page-segment extension element allows to define resource substitution for fo:external-graphics elements. Example:
 
@@ -497,7 +507,7 @@ The include-page-segment extension eleme
 
 The effect here is that whenever FOP encounters the URI specified in the extension, it will effectively generate code to include the page segment with the given name instead of embedding the image referenced by the URI. The URI is still required as the underlying image serves as a provider for the intrinsic size of the image (At the moment, FOP is unable to extract the intrinsic size of the page segment from an AFP resource file). For the image to appear in an AFP viewer or to be printed, the AFP resource must be available on the target device. FOP does not embed the page segment in the generated file. Please also note that page segments cannot be scaled. They are always rendered in their intrinsic size.
 
-#### Tag Logical Element (TLE) Extension ## <a id="afp-tag-logical-element"></a>
+#### Tag Logical Element (TLE) Extension<a id="afp-tag-logical-element"></a>
 
 The tag-logical-element extension element allows to injects TLEs into the AFP output stream. Example:
 
@@ -517,7 +527,7 @@ The tag-logical-element extension elemen
 
 The tag-logical-element extension element can appear within a simple-page-master (page level) or it can appear as child of page-sequence (page group level). Multiple tag-logical-element extension elements within a simple-page-master or page-sequence are allowed. The name and value attributes are mandatory.
 
-#### No Operation (NOP) Extension ## <a id="afp-no-operation"></a>
+#### No Operation (NOP) Extension<a id="afp-no-operation"></a>
 
 The no-operation extension provides the ability to carry up to 32K of comments or any other type of unarchitected data into the AFP output stream. Example:
 
@@ -531,7 +541,7 @@ The no-operation extension provides the 
 
 The no-operation extension element can only occur within a simple-page-master. Multiple no-operation extension elements within a simple-page-master are allowed. The name attribute is mandatory.
 
-#### Invoke Medium Map (IMM) Extension ## <a id="afp-invoke-medium-map"></a>
+#### Invoke Medium Map (IMM) Extension<a id="afp-invoke-medium-map"></a>
 
 The invoke-medium-map extension allows to generate IMM fields (Invoke Medium Map) in the generated AFP output. Example:
 
@@ -545,22 +555,22 @@ The invoke-medium-map extension allows t
 
 The invoke-medium-map element is allowed as child of fo:page-sequence (page group level) or fo:simple-page-master. It is NOT supported on document level (fo:root), yet. FOP also doesn't support specifying medium maps inside XML (using BMM/EMM). It can only reference an existing medium map by name. The medium map has to be constructed through different means and available on the target platform.
 
-#### Form Maps/Defs ## <a id="afp-form-maps"></a>
+#### Form Maps/Defs<a id="afp-form-maps"></a>
 
 Apache FOP supports embedding an external form map resource in the generated AFP output. This is done using the `afp:include-form-map` extension. An example:
 
-<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
-     xmlns:afp="http://xmlgraphics.apache.org/fop/extensions/afp">
-  [..]
-  <fo:declarations>
-    <afp:include-form-map name="F1SAMP1" src="file:f1samp1.fde"/>
-  </fo:declarations>
+    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
+         xmlns:afp="http://xmlgraphics.apache.org/fop/extensions/afp">
+      [..]
+      <fo:declarations>
+        <afp:include-form-map name="F1SAMP1" src="file:f1samp1.fde"/>
+      </fo:declarations>
 
 The `afp:include-form-map` is to be placed as a direct child of `fo:declarations` . The `name` is an AFP resource name (max. 8 characters) and the `src` attribute is the URI identifying the external form map resource. When such a form map is embedded, you can use the `afp:invoke-medium-map` extension (described above) to invoke any medium map included in the form map.
 Apache FOP doesn't support a way to define a form map or medium map using XML means inside an XSL-FO document. You will have to build the form map with some third-party tool.
-## Foreign Attributes <a id="afp-foreign-attributes"></a>
+### Foreign Attributes <a id="afp-foreign-attributes"></a>
 
-#### Resource ## <a id="afp-foreign-attributes-resource"></a>
+#### Resource<a id="afp-foreign-attributes-resource"></a>
 
 The resource foreign attributes provides the ability to name and control where data object resources (e.g. images/scalable vector graphics) will reside in the AFP output. The afp foreign attributes are only used in conjuntion with <fo:external-graphic/> and <instream-foreign-object/>. Example:
 
@@ -648,14 +658,15 @@ The quality of the bitmap depends on the
 ### Configuration <a id="bitmap-configuration"></a>
 
 The TIFF and PNG renderer configuration currently allows the following settings:
-<renderer mime="image/png">
-  <color-mode>rgba</color-mode>
-  <transparent-page-background>true</transparent-page-background>
-  <background-color>white</background-color>
-  <anti-aliasing>true</anti-aliasing>
-  <rendering>quality</rendering>
-  <fonts><!-- described elsewhere --></fonts>
-</renderer>
+
+    <renderer mime="image/png">
+      <color-mode>rgba</color-mode>
+      <transparent-page-background>true</transparent-page-background>
+      <background-color>white</background-color>
+      <anti-aliasing>true</anti-aliasing>
+      <rendering>quality</rendering>
+      <fonts><!-- described elsewhere --></fonts>
+    </renderer>
 The default value for the `"color-mode"` setting is `"rgba"` which is equivalent to a 24bit RGB image with an 8bit alpha channel for transparency. Valid values are:
 
 
@@ -680,11 +691,13 @@ The default value for the `"rendering"` 
 ### TIFF-specific Configuration <a id="tiff-configuration"></a>
 
 In addition to the above values the TIFF renderer configuration allows some additional settings:
-<renderer mime="image/tiff">
-  <transparent-page-background>true</transparent-page-background>
-  <compression>CCITT T.6</compression>
-  <fonts><!-- described elsewhere --></fonts>
-</renderer>
+
+    <renderer mime="image/tiff">
+      <transparent-page-background>true</transparent-page-background>
+      <compression>CCITT T.6</compression>
+      <fonts><!-- described elsewhere --></fonts>
+    </renderer>
+
 The default value for the "compression" setting is "PackBits" which which is a widely supported RLE compression scheme for TIFF. The set of compression names to be used here matches the set that the Image I/O API uses. Note that not all compression schemes may be available during runtime. This depends on the actual codecs being available. Here is a list of possible values:
 
 
@@ -692,26 +705,27 @@ The default value for the "compression" 
 
 -  `PackBits` (RLE, run-length encoding)
 
--  `JPEG` 
+- `JPEG` 
 
--  `Deflate` 
+- `Deflate` 
 
--  `LZW` 
+- `LZW` 
 
--  `ZLib` 
+- `ZLib` 
 
--  `CCITT T.4` (Fax Group 3)
+- `CCITT T.4` (Fax Group 3)
 
--  `CCITT T.6` (Fax Group 4)
+- `CCITT T.6` (Fax Group 4)
 
 This setting may override any setting made using the `"color-mode"` . For example, if `"CCITT T.6"` is selected, the color mode is automatically forced to `"bi-level"` because this compression format only supports bi-level images.
 If you want to use CCITT compression, please make sure you've got [Java Advanced Imaging Image I/O Tools](http://java.sun.com/products/java-media/jai/current.html) in your classpath. The Sun JRE doesn't come with a TIFF codec built in, so it has to be added separately. The internal TIFF codec from XML Graphics Commons only supports PackBits, Deflate and JPEG compression for writing.
-## Runtime Rendering Options <a id="bitmap-rendering-options"></a>
+### Runtime Rendering Options <a id="bitmap-rendering-options"></a>
 
 The IF-based bitmap output implementations support a rendering option with the key "target-bitmap-size" (value: java.awt.Dimension) that allows to force the pages to be proportionally fit into a bitmap of a given size. This can be used to produce thumbnails or little preview images of the individual pages. An example:
-userAgent.getRenderingOptions().put(
-    "target-bitmap-size", new Dimension(320, 200));
-# TXT <a id="txt"></a>
+
+    userAgent.getRenderingOptions().put(
+        "target-bitmap-size", new Dimension(320, 200));
+## TXT <a id="txt"></a>
 
 The text renderer produces plain ASCII text output that attempts to match the output of the PDFRenderer as closely as possible. This was originally developed to accommodate an archive system that could only accept plain text files, and is primarily useful for getting a quick-and-dirty view of the document text. The renderer is very limited, so do not be surprised if it gives unsatisfactory results.
 

Modified: xmlgraphics/site/trunk/content/fop/1.0/pdfa.mdtext
URL: http://svn.apache.org/viewvc/xmlgraphics/site/trunk/content/fop/1.0/pdfa.mdtext?rev=1416565&r1=1416564&r2=1416565&view=diff
==============================================================================
--- xmlgraphics/site/trunk/content/fop/1.0/pdfa.mdtext (original)
+++ xmlgraphics/site/trunk/content/fop/1.0/pdfa.mdtext Mon Dec  3 15:46:33 2012
@@ -53,7 +53,7 @@ There are a number of things that must b
 
 - No filter must be specified explicitely for metadata objects. Metadata must be embedded in clear text so non-PDF-aware applications can extract the XMP metadata.
 There are additional requirements if you want to enabled PDF/A-1a (Tagged PDF). This is particularly the specification of the natural language and alternative descriptions for images. Please refer to the [Accessibility page](accessibility.html) for details.
-# PDF profile compatibility <a id="profile-compatibility"></a>
+## PDF profile compatibility <a id="profile-compatibility"></a>
 
 The PDF profiles "PDF/X-3:2003" and "PDF/A-1b" (or "PDF/A-1a") are compatible and can both be activated at the same time.
 

Modified: xmlgraphics/site/trunk/content/fop/1.0/pdfencryption.mdtext
URL: http://svn.apache.org/viewvc/xmlgraphics/site/trunk/content/fop/1.0/pdfencryption.mdtext?rev=1416565&r1=1416564&r2=1416565&view=diff
==============================================================================
--- xmlgraphics/site/trunk/content/fop/1.0/pdfencryption.mdtext (original)
+++ xmlgraphics/site/trunk/content/fop/1.0/pdfencryption.mdtext Mon Dec  3 15:46:33 2012
@@ -36,15 +36,15 @@ When FOP is embedded in another Java app
 Encryption is enabled as soon as one of these options is set.
 An example to enable PDF encryption in Java code:
 
-import org.apache.fop.pdf.PDFEncryptionParams;
-
-[..]
-
-FOUserAgent userAgent = fopFactory.newFOUserAgent();
-useragent.getRendererOptions().put("encryption-params", new PDFEncryptionParams(
-    null, "password", false, false, true, true));
-Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent);
-[..]
+    import org.apache.fop.pdf.PDFEncryptionParams;
+    
+    [..]
+    
+    FOUserAgent userAgent = fopFactory.newFOUserAgent();
+    useragent.getRendererOptions().put("encryption-params", new PDFEncryptionParams(
+        null, "password", false, false, true, true));
+    Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent);
+    [..]
 The parameters for the constructor of PDFEncryptionParams are:
 
 

Modified: xmlgraphics/site/trunk/content/fop/1.0/running.mdtext
URL: http://svn.apache.org/viewvc/xmlgraphics/site/trunk/content/fop/1.0/running.mdtext?rev=1416565&r1=1416564&r2=1416565&view=diff
==============================================================================
--- xmlgraphics/site/trunk/content/fop/1.0/running.mdtext (original)
+++ xmlgraphics/site/trunk/content/fop/1.0/running.mdtext Mon Dec  3 15:46:33 2012
@@ -54,90 +54,89 @@ Some Mac OSX users have experienced file
 
 The usual and recommended practice for starting FOP from the command line is to run the batch file fop.bat (Windows) or the shell script fop (Unix/Linux). These scripts require that the environment variable JAVA_HOME be set to a path pointing to the appropriate Java installation on your system. Macintosh OSX includes a Java environment as part of its distribution. We are told by Mac OSX users that the path to use in this case is `/Library/Java/Home` . **Caveat:** We suspect that, as Apple releases new Java environments and as FOP upgrades the minimum Java requirements, the two will inevitably not match on some systems. Please see [Java on Mac OSX FAQ](http://developer.apple.com/java/faq) for information as it becomes available.
 
-USAGE
-Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl|-ps|-txt|-at [mime]|-print] <outfile>
- [OPTIONS]
-  -version          print FOP version and exit
-  -d                debug mode
-  -x                dump configuration settings
-  -q                quiet mode
-  -c cfg.xml        use additional configuration file cfg.xml
-  -l lang           the language to use for user information
-  -r                relaxed/less strict validation (where available)
-  -dpi xxx          target resolution in dots per inch (dpi) where xxx is a number
-  -s                for area tree XML, down to block areas only
-  -v                run in verbose mode (currently simply print FOP version and continue)
-
-  -o [password]     PDF file will be encrypted with option owner password
-  -u [password]     PDF file will be encrypted with option user password
-  -noprint          PDF file will be encrypted without printing permission
-  -nocopy           PDF file will be encrypted without copy content permission
-  -noedit           PDF file will be encrypted without edit content permission
-  -noannotations    PDF file will be encrypted without edit annotation permission
-  -a                enables accessibility features (Tagged PDF etc., default off)
-  -pdfprofile prof  PDF file will be generated with the specified profile
-                    (Examples for prof: PDF/A-1b or PDF/X-3:2003)
-
-  -conserve         Enable memory-conservation policy (trades memory-consumption for disk I/O)
-                    (Note: currently only influences whether the area tree is serialized.)
-
- [INPUT]
-  infile            xsl:fo input file (the same as the next)
-                    (use '-' for infile to pipe input from stdin)
-  -fo  infile       xsl:fo input file
-  -xml infile       xml input file, must be used together with -xsl
-  -atin infile      area tree input file
-  -ifin infile      intermediate format input file
-  -imagein infile   image input file (piping through stdin not supported)
-  -xsl stylesheet   xslt stylesheet
-
-  -param name value <value> to use for parameter <name> in xslt stylesheet
-                    (repeat '-param name value' for each parameter)
-
-  -catalog          use catalog resolver for input XML and XSLT files
- [OUTPUT]
-  outfile           input will be rendered as PDF into outfile
-                    (use '-' for outfile to pipe output to stdout)
-  -pdf outfile      input will be rendered as PDF (outfile req'd)
-  -pdfa1b outfile   input will be rendered as PDF/A-1b compliant PDF
-                    (outfile req'd, same as "-pdf outfile -pdfprofile PDF/A-1b")
-  -awt              input will be displayed on screen
-  -rtf outfile      input will be rendered as RTF (outfile req'd)
-  -pcl outfile      input will be rendered as PCL (outfile req'd)
-  -ps outfile       input will be rendered as PostScript (outfile req'd)
-  -afp outfile      input will be rendered as AFP (outfile req'd)
-  -tiff outfile     input will be rendered as TIFF (outfile req'd)
-  -png outfile      input will be rendered as PNG (outfile req'd)
-  -txt outfile      input will be rendered as plain text (outfile req'd)
-  -at [mime] out    representation of area tree as XML (outfile req'd)
-                    specify optional mime output to allow the AT to be converted
-                    to final format later
-  -if [mime] out    representation of document in intermediate format XML (outfile req'd)
-                    specify optional mime output to allow the IF to be converted
-                    to final format later
-  -print            input file will be rendered and sent to the printer
-                    see options with "-print help"
-  -out mime outfile input will be rendered using the given MIME type
-                    (outfile req'd) Example: "-out application/pdf D:\out.pdf"
-                    (Tip: "-out list" prints the list of supported MIME types)
-  -svg outfile      input will be rendered as an SVG slides file (outfile req'd)
-                    Experimental feature - requires additional fop-sandbox.jar.
-
-  -foout outfile    input will only be XSL transformed. The intermediate
-                    XSL-FO file is saved and no rendering is performed.
-                    (Only available if you use -xml and -xsl parameters)
-
-
- [Examples]
-  fop foo.fo foo.pdf
-  fop -fo foo.fo -pdf foo.pdf (does the same as the previous line)
-  fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf
-  fop -xml foo.xml -xsl foo.xsl -foout foo.fo
-  fop -xml - -xsl foo.xsl -pdf -
-  fop foo.fo -mif foo.mif
-  fop foo.fo -rtf foo.rtf
-  fop foo.fo -print
-  fop foo.fo -awt
+    USAGE
+    Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl|-ps|-txt|-at [mime]|-print] <outfile>
+     [OPTIONS]
+      -version          print FOP version and exit
+      -d                debug mode
+      -x                dump configuration settings
+      -q                quiet mode
+      -c cfg.xml        use additional configuration file cfg.xml
+      -l lang           the language to use for user information
+      -r                relaxed/less strict validation (where available)
+      -dpi xxx          target resolution in dots per inch (dpi) where xxx is a number
+      -s                for area tree XML, down to block areas only
+      -v                run in verbose mode (currently simply print FOP version and continue)
+    
+      -o [password]     PDF file will be encrypted with option owner password
+      -u [password]     PDF file will be encrypted with option user password
+      -noprint          PDF file will be encrypted without printing permission
+      -nocopy           PDF file will be encrypted without copy content permission
+      -noedit           PDF file will be encrypted without edit content permission
+      -noannotations    PDF file will be encrypted without edit annotation permission
+      -a                enables accessibility features (Tagged PDF etc., default off)
+      -pdfprofile prof  PDF file will be generated with the specified profile
+                        (Examples for prof: PDF/A-1b or PDF/X-3:2003)
+    
+      -conserve         Enable memory-conservation policy (trades memory-consumption for disk I/O)
+                        (Note: currently only influences whether the area tree is serialized.)
+     [INPUT]
+      infile            xsl:fo input file (the same as the next)
+                        (use '-' for infile to pipe input from stdin)
+      -fo  infile       xsl:fo input file
+      -xml infile       xml input file, must be used together with -xsl
+      -atin infile      area tree input file
+      -ifin infile      intermediate format input file
+      -imagein infile   image input file (piping through stdin not supported)
+      -xsl stylesheet   xslt stylesheet
+    
+      -param name value <value> to use for parameter <name> in xslt stylesheet
+                        (repeat '-param name value' for each parameter)
+    
+      -catalog          use catalog resolver for input XML and XSLT files
+     [OUTPUT]
+      outfile           input will be rendered as PDF into outfile
+                        (use '-' for outfile to pipe output to stdout)
+      -pdf outfile      input will be rendered as PDF (outfile req'd)
+      -pdfa1b outfile   input will be rendered as PDF/A-1b compliant PDF
+                        (outfile req'd, same as "-pdf outfile -pdfprofile PDF/A-1b")
+      -awt              input will be displayed on screen
+      -rtf outfile      input will be rendered as RTF (outfile req'd)
+      -pcl outfile      input will be rendered as PCL (outfile req'd)
+      -ps outfile       input will be rendered as PostScript (outfile req'd)
+      -afp outfile      input will be rendered as AFP (outfile req'd)
+      -tiff outfile     input will be rendered as TIFF (outfile req'd)
+      -png outfile      input will be rendered as PNG (outfile req'd)
+      -txt outfile      input will be rendered as plain text (outfile req'd)
+      -at [mime] out    representation of area tree as XML (outfile req'd)
+                        specify optional mime output to allow the AT to be converted
+                        to final format later
+      -if [mime] out    representation of document in intermediate format XML (outfile req'd)
+                        specify optional mime output to allow the IF to be converted
+                        to final format later
+      -print            input file will be rendered and sent to the printer
+                        see options with "-print help"
+      -out mime outfile input will be rendered using the given MIME type
+                        (outfile req'd) Example: "-out application/pdf D:\out.pdf"
+                        (Tip: "-out list" prints the list of supported MIME types)
+      -svg outfile      input will be rendered as an SVG slides file (outfile req'd)
+                        Experimental feature - requires additional fop-sandbox.jar.
+    
+      -foout outfile    input will only be XSL transformed. The intermediate
+                        XSL-FO file is saved and no rendering is performed.
+                        (Only available if you use -xml and -xsl parameters)
+    
+    
+     [Examples]
+      fop foo.fo foo.pdf
+      fop -fo foo.fo -pdf foo.pdf (does the same as the previous line)
+      fop -xml foo.xml -xsl foo.xsl -pdf foo.pdf
+      fop -xml foo.xml -xsl foo.xsl -foout foo.fo
+      fop -xml - -xsl foo.xsl -pdf -
+      fop foo.fo -mif foo.mif
+      fop foo.fo -rtf foo.rtf
+      fop foo.fo -print
+      fop foo.fo -awt
 PDF encryption is only available if FOP was compiled with encryption support **and** if compatible encryption support is available at run time. Currently, only the JCE is supported. Check the [Details](pdfencryption.html) .
 
 ### Writing your own script <a id="your-own-script"></a>

Modified: xmlgraphics/site/trunk/content/fop/1.0/servlets.mdtext
URL: http://svn.apache.org/viewvc/xmlgraphics/site/trunk/content/fop/1.0/servlets.mdtext?rev=1416565&r1=1416564&r2=1416565&view=diff
==============================================================================
--- xmlgraphics/site/trunk/content/fop/1.0/servlets.mdtext (original)
+++ xmlgraphics/site/trunk/content/fop/1.0/servlets.mdtext Mon Dec  3 15:46:33 2012
@@ -22,39 +22,43 @@ The servlet is automatically built when 
 
 The source code for the servlet can be found under {fop-dir}/src/java/org/apache/fop/servlet/FopServlet.java.
 This example servlet should not be used on a public web server connected to the Internet as it does not contain any measures to prevent Denial-of-Service-Attacks. It is provided as an example and as a starting point for your own servlet.
-# Create your own Servlet <a id="servlet"></a>
+## Create your own Servlet <a id="servlet"></a>
 This section assumes you are familiar with [embedding FOP](embedding.html) .
-## A minimal Servlet <a id="minimal-servlet"></a>
+### A minimal Servlet <a id="minimal-servlet"></a>
 
 Here is a minimal code snippet to demonstrate the basics:
-private FopFactory fopFactory = FopFactory.newInstance();
-private TransformerFactory tFactory = TransformerFactory.newInstance();
+
+    private FopFactory fopFactory = FopFactory.newInstance();
+    private TransformerFactory tFactory = TransformerFactory.newInstance();
         
-public void doGet(HttpServletRequest request,
-                   HttpServletResponse response) throws ServletException {
-    try {
-        response.setContentType("application/pdf");
-        Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, response.getOutputStream());
-        Transformer transformer = tFactory.newTransformer();
-        Source src = new StreamSource("foo.fo");
-        Result res = new SAXResult(fop.getDefaultHandler());
-        transformer.transform(src, res);
-    } catch (Exception ex) {
-        throw new ServletException(ex);
+    public void doGet(HttpServletRequest request,
+                       HttpServletResponse response) throws ServletException {
+        try {
+            response.setContentType("application/pdf");
+            Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, response.getOutputStream());
+            Transformer transformer = tFactory.newTransformer();
+            Source src = new StreamSource("foo.fo");
+            Result res = new SAXResult(fop.getDefaultHandler());
+            transformer.transform(src, res);
+        } catch (Exception ex) {
+            throw new ServletException(ex);
+        }
     }
-}There are numerous problems with the code snippet above. Its purpose is only to demonstrate the basic concepts. See below for details.
-## Adding XSL tranformation (XSLT) <a id="xslt"></a>
+There are numerous problems with the code snippet above. Its purpose is only to demonstrate the basic concepts. See below for details.
 
-A common requirement is to transform an XML source to XSL-FO using an XSL transformation. It is recommended to use JAXP for this task. The following snippet shows the basic code:
-private FopFactory fopFactory = FopFactory.newInstance();
-private TransformerFactory tFactory = TransformerFactory.newInstance();
+### Adding XSL tranformation (XSLT) <a id="xslt"></a>
 
-public void init() throws ServletException {
-    //Optionally customize the FopFactory and TransformerFactory here
-}
+A common requirement is to transform an XML source to XSL-FO using an XSL transformation. It is recommended to use JAXP for this task. The following snippet shows the basic code:
 
-[..]
+    private FopFactory fopFactory = FopFactory.newInstance();
+    private TransformerFactory tFactory = TransformerFactory.newInstance();
 
+    public void init() throws ServletException {
+        //Optionally customize the FopFactory and TransformerFactory here
+    }
+    
+    [..]
+    
     //Setup a buffer to obtain the content length
     ByteArrayOutputStream out = new ByteArrayOutputStream();
 
@@ -127,24 +131,24 @@ Further down, you can use the URIResolve
 
 Here are some example snippets:
 
-//Setting up the JAXP TransformerFactory
-this.transFactory = TransformerFactory.newInstance();
-this.transFactory.setURIResolver(this.uriResolver);
-
-[..]
-
-//Setting up the FOP factory
-this.fopFactory = FopFactory.newInstance();
-this.fopFactory.setURIResolver(this.uriResolver);
-
-[..]
-
-//The stylesheet for the JAXP Transfomer
-Source xsltSrc = this.uriResolver.resolve(
-    "servlet-context:/xslt/mystylesheet.xsl", null);
-Transformer transformer = this.transFactory.newTransformer(xsltSrc);
-transformer.setURIResolver(this.uriResolver);
-# Notes on Microsoft Internet Explorer <a id="ie"></a>
+    //Setting up the JAXP TransformerFactory
+    this.transFactory = TransformerFactory.newInstance();
+    this.transFactory.setURIResolver(this.uriResolver);
+    
+    [..]
+    
+    //Setting up the FOP factory
+    this.fopFactory = FopFactory.newInstance();
+    this.fopFactory.setURIResolver(this.uriResolver);
+    
+    [..]
+    
+    //The stylesheet for the JAXP Transfomer
+    Source xsltSrc = this.uriResolver.resolve(
+        "servlet-context:/xslt/mystylesheet.xsl", null);
+    Transformer transformer = this.transFactory.newTransformer(xsltSrc);
+    transformer.setURIResolver(this.uriResolver);
+## Notes on Microsoft Internet Explorer <a id="ie"></a>
 
 Some versions of Internet Explorer will not automatically show the PDF or call the servlet multiple times. These are well-known limitations of Internet Explorer and are not a problem of the servlet. However, Internet Explorer can still be used to download the PDF so that it can be viewed later. Here are some suggestions in this context:
 

Modified: xmlgraphics/site/trunk/content/fop/1.1/accessibility.mdtext
URL: http://svn.apache.org/viewvc/xmlgraphics/site/trunk/content/fop/1.1/accessibility.mdtext?rev=1416565&r1=1416564&r2=1416565&view=diff
==============================================================================
--- xmlgraphics/site/trunk/content/fop/1.1/accessibility.mdtext (original)
+++ xmlgraphics/site/trunk/content/fop/1.1/accessibility.mdtext Mon Dec  3 15:46:33 2012
@@ -2,7 +2,6 @@ Title: Apache(tm) FOP: Accessibility
 
 #Apache&trade; FOP: Accessibility
 
-
 ## Overview <a id="overview"></a>
 
 This page describes the [accessibility](http://en.wikipedia.org/wiki/Accessibility) features of Apache&trade; FOP. [Section 508](http://www.section508.gov/) defines accessibility in the context of electronic documents for the USA but other countries have similar requirements.
@@ -14,20 +13,13 @@ Accessibility features are available onl
 There are 3 ways to enable accessibility:
 
 
-1.  **Command line:** The command line option -a turns on accessibility: `fop -a -fo mydocument.fo -pdf mydocument.pdf` 
-
-1.  **Embedding:**  `userAgent.setAccessibility(true);` 
-
-1.  **Optional setting in fop.xconf file:**  `
-          <fop version="1.0">
-              <accessibility>true</accessibility>
-              ...
-          </fop>
-          ` 
+1.  **Command line:** The command line option -a turns on accessibility:<br/>`fop -a -fo mydocument.fo -pdf mydocument.pdf`<br/>
+1.  **Embedding:**<br/>`userAgent.setAccessibility(true);` <br/> 
+1.  **Optional setting in fop.xconf file:**<br/>`<fop version="1.0">`<br/>`<accessibility>true</accessibility>`<br/>`...`<br/>`</fop>`
 
 When accessibility is enabled, additional information relating to the logical structure of the document is added to the PDF. That information allows the PDF viewer (or a text-to-speech application) to retrieve the natural reading order of the document.
 The processing of the logical structure is memory-hungry. You may need to adjust the Java heap size in order to process larger files.
-# Changes to your XSL-FO input files <a id="source"></a>
+## Changes to your XSL-FO input files <a id="source"></a>
 
 Apache FOP cannot automatically generate accessible PDFs. Some of the work can only be performed by the content provider. Following are some changes that may be necessary to your XSL-FO content in order to generate really accessible documents:
 
@@ -47,10 +39,12 @@ The [PDF Reference](#PDFReference) defin
 FOP provides a default mapping of Formatting Objects to elements from that standard set. For example, `fo:page-sequence` is mapped to ‘Part’, `fo:block` is mapped to ‘P’, `fo:list-block` to ‘L’, etc.
 
 You may want to customize that mapping to improve the accuracy of the tagging or deal with particular FO constructs. For example, you may want to make use of the ‘H1’ to ‘H6’ tags to make the hierarchical structure of the document appear in the PDF. This is achieved by using the `role` XSL-FO property:
-...
-<fo:block role="H1" font-weight="bold">I. A Level 1 Heading</fo:block>
-<fo:block>This is the first paragraph of the first section...</fo:block>
-...
+
+    ...
+    <fo:block role="H1" font-weight="bold">I. A Level 1 Heading</fo:block>
+    <fo:block>This is the first paragraph of the first section...</fo:block>
+    ...
+
 If a non-standard structure type is specified, FOP will issue a warning and fall back to the default tag associated to the Formatting Object.
 
 ## Testing <a id="testing"></a>

Modified: xmlgraphics/site/trunk/content/fop/1.1/anttask.mdtext
URL: http://svn.apache.org/viewvc/xmlgraphics/site/trunk/content/fop/1.1/anttask.mdtext?rev=1416565&r1=1416564&r2=1416565&view=diff
==============================================================================
--- xmlgraphics/site/trunk/content/fop/1.1/anttask.mdtext (original)
+++ xmlgraphics/site/trunk/content/fop/1.1/anttask.mdtext Mon Dec  3 15:46:33 2012
@@ -11,26 +11,28 @@ The FOP Ant task will convert XSL-FO doc
 
 To call FOP tasks within Ant, first add a FOP task definition to your Ant build file. One method of defining the task is as follows:
 
-<property name="fop.home" value="....path to your FOP HOME directory..."/>
-
-<taskdef name="fop" 
-         classname="org.apache.fop.tools.anttasks.Fop">
-  <classpath>
-    <fileset dir="${fop.home}/lib">
-      <include name="*.jar"/>
-    </fileset>
-    <fileset dir="${fop.home}/build">
-      <include name="fop.jar"/>
-      <include name="fop-hyph.jar" />
-    </fileset>
-  </classpath>
-</taskdef>
+    <property name="fop.home" value="....path to your FOP HOME directory..."/>
+    
+    <taskdef name="fop" 
+             classname="org.apache.fop.tools.anttasks.Fop">
+      <classpath>
+        <fileset dir="${fop.home}/lib">
+          <include name="*.jar"/>
+        </fileset>
+        <fileset dir="${fop.home}/build">
+          <include name="fop.jar"/>
+          <include name="fop-hyph.jar" />
+        </fileset>
+      </classpath>
+    </taskdef>
     
 Then create FOP tasks within your Ant build file, using the FOP task parameters listed below.
 
 ## Parameters for FOP Ant task <a id="parameters"></a>
 
-<caption>Parameters specified as attributes</caption>| Attribute | Description | Required |
+<caption>Parameters specified as attributes</caption>
+
+| Attribute | Description | Required |
 |-----------|-------------|----------|
 | fofile | XSL-FO file to be rendered | Yes, if no fileset nested element is used |
 | xmlfile | XML input file | Yes, if no fofile is specified |
@@ -46,7 +48,7 @@ Then create FOP tasks within your Ant bu
 | logFiles | Controls whether the names of the files that are processed are logged ( `true` ) or not ( `false` ). **Currently doesn't work in FOP Trunk!!!**  | No, default is `true`  |
 | throwexceptions | Controls whether or not an exception is thrown if an error occurs during rendering. | Default is `true`  |
 
-
+<br/>
 
 <caption>Parameters specified as nested elements</caption>| Attribute | Description | Required |
 |-----------|-------------|----------|

Modified: xmlgraphics/site/trunk/content/fop/1.1/compiling.mdtext
URL: http://svn.apache.org/viewvc/xmlgraphics/site/trunk/content/fop/1.1/compiling.mdtext?rev=1416565&r1=1416564&r2=1416565&view=diff
==============================================================================
--- xmlgraphics/site/trunk/content/fop/1.1/compiling.mdtext (original)
+++ xmlgraphics/site/trunk/content/fop/1.1/compiling.mdtext Mon Dec  3 15:46:33 2012
@@ -48,7 +48,7 @@ OR
 ant all
 To clean the build directory first:
 ant clean allIf you want to shorten the build time you can just call the "package" target which doesn't perform any automated tests during the build.
-# Troubleshooting <a id="problems"></a>
+## Troubleshooting <a id="problems"></a>
 
 If you have problems building FOP, please try the following:
 

Modified: xmlgraphics/site/trunk/content/fop/1.1/complexscripts.mdtext
URL: http://svn.apache.org/viewvc/xmlgraphics/site/trunk/content/fop/1.1/complexscripts.mdtext?rev=1416565&r1=1416564&r2=1416565&view=diff
==============================================================================
--- xmlgraphics/site/trunk/content/fop/1.1/complexscripts.mdtext (original)
+++ xmlgraphics/site/trunk/content/fop/1.1/complexscripts.mdtext Mon Dec  3 15:46:33 2012
@@ -21,33 +21,26 @@ This page describes the [complex scripts
 Complex script features are enabled by default. If some application of FOP does not require this support, then it can be disabled in three ways:
 
 
-1.  **Command line:** The command line option `-nocs` turns off complex script features: `fop -nocs -fo mydocument.fo -pdf mydocument.pdf` 
-
-1.  **Embedding:**  `userAgent.setComplexScriptFeaturesEnabled(false);` 
-
-1.  **Optional setting in fop.xconf file:**  `
-    <fop version="1.0">
-      <complex-scripts disabled="true"/>
-      ...
-    </fop>
-          ` 
+1.  **Command line:**<br/>The command line option `-nocs` turns off complex script features:<br/>`fop -nocs -fo mydocument.fo -pdf mydocument.pdf`<br/> 
+1.  **Embedding:**<br/>`userAgent.setComplexScriptFeaturesEnabled(false);` 
+1.  **Optional setting in fop.xconf file:**<br/>`<fop version="1.0">`<br/>`<complex-scripts disabled="true"/>`<br/>`...`<br/>`</fop>` 
 
 When complex scripts features are enabled, additional information related to bidirectional level resolution, the association between characters and glyphs, and glyph position adjustments are added to the internal, parsed representation of the XSL-FO tree and its corresponding formatted area tree. This additional information will somewhat increase the memory requirements for processing documents that use these features.
 A document author need not make explicit use of any complex scripts feature in order for this additional information to be created. For example, if the author makes use of a font that contains OpenType GSUB and/or GPOS tables, then those tables will be automatically used unless complex scripts features are disabled.
-# Changes to your XSL-FO input files <a id="source"></a>
+## Changes to your XSL-FO input files <a id="source"></a>
 
 In most circumstances, XSL-FO content does not need to change in order to make use of complex scripts features; however, in certain contexts, fully automatic processing is not sufficient. In these cases, an author may make use of the following XSL-FO constructs:
 
 
-- The [http://www.w3.org/TR/2006/REC-xsl11-20061205/#script](http://www.w3.org/TR/2006/REC-xsl11-20061205/#script) property.
+- The [script](http://www.w3.org/TR/2006/REC-xsl11-20061205/#script) property.
 
-- The [http://www.w3.org/TR/2006/REC-xsl11-20061205/#language](http://www.w3.org/TR/2006/REC-xsl11-20061205/#language) property.
+- The [language](http://www.w3.org/TR/2006/REC-xsl11-20061205/#language) property.
 
-- The [http://www.w3.org/TR/2006/REC-xsl11-20061205/#writing-mode](http://www.w3.org/TR/2006/REC-xsl11-20061205/#writing-mode) property.
+- The [writing-mode](http://www.w3.org/TR/2006/REC-xsl11-20061205/#writing-mode) property.
 
-- The number to string conversion properties: [http://www.w3.org/TR/2006/REC-xsl11-20061205/#format](http://www.w3.org/TR/2006/REC-xsl11-20061205/#format) , [http://www.w3.org/TR/2006/REC-xsl11-20061205/#grouping-separator](http://www.w3.org/TR/2006/REC-xsl11-20061205/#grouping-separator) , [http://www.w3.org/TR/2006/REC-xsl11-20061205/#grouping-size](http://www.w3.org/TR/2006/REC-xsl11-20061205/#grouping-size) , [http://www.w3.org/TR/2006/REC-xsl11-20061205/#letter-value](http://www.w3.org/TR/2006/REC-xsl11-20061205/#letter-value) , and `fox:number-conversion-features` .
+- The number to string conversion properties: [format](http://www.w3.org/TR/2006/REC-xsl11-20061205/#format) , [grouping-separator](http://www.w3.org/TR/2006/REC-xsl11-20061205/#grouping-separator) , [grouping-size](http://www.w3.org/TR/2006/REC-xsl11-20061205/#grouping-size) , [letter-value](http://www.w3.org/TR/2006/REC-xsl11-20061205/#letter-value) , and `fox:number-conversion-features` .
 
-- The [http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_bidi-override](http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_bidi-override) element.
+- The [fo:bidi-override](http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_bidi-override) element.
 
 - Explicit bidirectional control characters: U+200E LRM, U+200F RLM, U+202A LRE, U+202B RLE, U+202C PDF, U+202D LRO, U+202E RLO.
 
@@ -68,7 +61,7 @@ In order to apply font specific complex 
 
 In case the automatic algorithm does not produce the desired results, an author may explicitly specify a `script` property with the desired script. If specified, it must be one of the four-letter script code specified in [ISO 15924 Code List](http://unicode.org/iso15924/iso15924-codes.html) or in the [Extended Script Codes](#extended_script_codes) table. Comparison of script codes is performed in a case-insensitive manner, so it does not matter what case is used when specifying these codes in an XSL-FO document.
 
-#### Standard Script Codes ## <a id="standard_script_codes"></a>
+#### Standard Script Codes <a id="standard_script_codes"></a>
 
 The following table enumerates the standard ISO 15924 4-letter codes recognized by FOP.
 
@@ -107,11 +100,11 @@ The following table enumerates the stand
 |  `zyyy`  | Undetermined |
 |  `zzzz`  | Uncoded |
 
-#### Extended Script Codes ## <a id="extended_script_codes"></a>
+#### Extended Script Codes <a id="extended_script_codes"></a>
 
 The following table enumerates a number of non-standard extended script codes recognized by FOP.
 
-<colgrp><col style="width:10%"></col><col style="width:20%"></col><col style="width:80%"></col></colgrp>| Code | Script | Comments |
+| Code | Script | Comments |
 |------|--------|----------|
 |  `bng2`  | Bengali | OpenType Indic Version 2 (May 2008 and following) behavior. |
 |  `dev2`  | Devanagari | OpenType Indic Version 2 (May 2008 and following) behavior. |
@@ -122,8 +115,9 @@ The following table enumerates a number 
 |  `ory2`  | Oriya | OpenType Indic Version 2 (May 2008 and following) behavior. |
 |  `tml2`  | Tamil | OpenType Indic Version 2 (May 2008 and following) behavior. |
 |  `tel2`  | Telugu | OpenType Indic Version 2 (May 2008 and following) behavior. |
+
 <warning>Explicit use of one of the above extended script codes is not portable, and should be limited to use with FOP only.</warning>When performing automatic script determination, FOP selects the OpenType Indic Version 2 script codes by default. If the author requires Version 1 behavior, then an explicit, non-extension script code should be specified in a governing `script` property.
-## Language Property <a id="language_property"></a>
+### Language Property <a id="language_property"></a>
 
 Certain fonts that support complex script features can make use of language information in order for language specific processing rules to be applied. For example, a font designed for the Arabic script may support typographic variations according to whether the written language is Arabic, Farsi (Persian), Sindhi, Urdu, or another language written with the Arabic script. In order to apply these language specific features, the author may explicitly mark the text with a [http://www.w3.org/TR/2006/REC-xsl11-20061205/#language](http://www.w3.org/TR/2006/REC-xsl11-20061205/#language) property.
 
@@ -165,7 +159,7 @@ Writing modes that employ a vertical inl
 
 ### Bidi Override Element <a id="bidi_override_element"></a>
 
-The [http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_bidi-override](http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_bidi-override) element may be used to override default bidirectional processing behavior, including default embedding levels and default character directionality. In the absence of either this element or use of explicit [Bidi Control Characters](#bidi_controls) , the default behavior prescribed by the [Unicode Bidirectional Algorithm](http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_bidi-override) applies.
+The [fo:bidi-override](http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_bidi-override) element may be used to override default bidirectional processing behavior, including default embedding levels and default character directionality. In the absence of either this element or use of explicit [Bidi Control Characters](#bidi_controls) , the default behavior prescribed by the [Unicode Bidirectional Algorithm](http://www.w3.org/TR/2006/REC-xsl11-20061205/#fo_bidi-override) applies.
 
 ### Bidi Control Characters <a id="bidi_controls"></a>
 
@@ -200,7 +194,7 @@ The behavior of ZWNJ and ZWJ is script s
 
 Support for specific complex scripts is enumerated in the following table. Support for those marked as not being supported is expected to be added in future revisions.
 
-<colgrp><col style="width: 15%"></col><col style="width: 10%"></col><col style="width: 10%"></col><col style="width: 65%"></col></colgrp>| Script | Support | Tested | Comments |
+| Script | Support | Tested | Comments |
 |--------|---------|--------|----------|
 |  [Arabic](http://en.wikipedia.org/wiki/Arabic_alphabet)  | full | full |  |
 |  [Bengali](http://en.wikipedia.org/wiki/Bengali_alphabet)  | none | none |  |
@@ -226,7 +220,7 @@ Support for specific fonts is enumerated
 
 ### Arabic Fonts <a id="fonts_arabic"></a>
 
-<colgrp><col style="width: 15%"></col><col style="width: 10%"></col><col style="width: 10%"></col><col style="width: 65%"></col></colgrp>| Font | Version | Glyphs | Comments |
+| Font | Version | Glyphs | Comments |
 |------|---------|--------|----------|
 |  [Arial Unicode MS](http://www.microsoft.com/typography/fonts/family.aspx?FID=24)  |  [1.01](http://www.microsoft.com/typography/fonts/font.aspx?FMID=1081)  | 50377 | limited GPOS support |
 |  [Lateef](http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=ArabicFonts)  | 1.0 | 1147 | language features for Kurdish (KUR), Sindhi (SND), Urdu (URD) |
@@ -240,7 +234,7 @@ Support for specific fonts is enumerated
 
 ### Devanagari Fonts <a id="devanagari_fonts"></a>
 
-<colgrp><col style="width: 15%"></col><col style="width: 10%"></col><col style="width: 10%"></col><col style="width: 65%"></col></colgrp>| Font | Version | Glyphs | Comments |
+| Font | Version | Glyphs | Comments |
 |------|---------|--------|----------|
 |  [Aparajita](http://www.microsoft.com/typography/fonts/family.aspx?FID=370)  |  [1.00](http://www.microsoft.com/typography/fonts/font.aspx?FMID=1700)  | 706 |  |
 |  [Kokila](http://www.microsoft.com/typography/fonts/family.aspx?FID=374)  |  [1.00](http://www.microsoft.com/typography/fonts/font.aspx?FMID=1749)  | 706 |  |

Modified: xmlgraphics/site/trunk/content/fop/1.1/configuration.mdtext
URL: http://svn.apache.org/viewvc/xmlgraphics/site/trunk/content/fop/1.1/configuration.mdtext?rev=1416565&r1=1416564&r2=1416565&view=diff
==============================================================================
--- xmlgraphics/site/trunk/content/fop/1.1/configuration.mdtext (original)
+++ xmlgraphics/site/trunk/content/fop/1.1/configuration.mdtext Mon Dec  3 15:46:33 2012
@@ -24,10 +24,9 @@ See [Setting the Configuration Programma
 
 | Element | Data Type (for the value) | Description | Default Value |
 |---------|---------------------------|-------------|---------------|
-| base | URL or directory | Specifies the base URL based on which relative URL will be resolved. | current directory |
-| font-base | URL or directory | Specifies the base URL based on which relative font URLs will be resolved. | base URL/directory (above) |
-| hyphenation-base | URL or directory | Specifies the base URL based on which relative URLs to hyphenation pattern files will be resolved. If not specified, support for user-supplied hyphenation patterns remains disabled. | disabled |
-| Relative URIs for the above three properties are evaluated relative to the base URI of the configuration file. If the configuration is provided programmatically, the base URI can be set with `FopFactory.setUserConfigBaseURI` ; default is the current working directory. |
+| base[^1] | URL or directory | Specifies the base URL based on which relative URL will be resolved. | current directory |
+| font-base[^1] | URL or directory | Specifies the base URL based on which relative font URLs will be resolved. | base URL/directory (above) |
+| hyphenation-base[^1] | URL or directory | Specifies the base URL based on which relative URLs to hyphenation pattern files will be resolved. If not specified, support for user-supplied hyphenation patterns remains disabled. | disabled |
 | hyphenation-pattern | String, attribute lang, attribute country (optional) | Register a file name for the hyphenation pattern for the mentioned language and country. Language ll and country CC must both consist of two letters. | ll_CC |
 | source-resolution | Integer, dpi | Resolution in dpi (dots per inch) which is used internally to determine the pixel size for SVG images and bitmap images without resolution information. | 72 dpi |
 | target-resolution | Integer, dpi | Resolution in dpi (dots per inch) used to specify the output resolution for bitmap images generated by bitmap renderers (such as the TIFF renderer) and by bitmaps generated by Apache Batik for filter effects and such. | 72 dpi |
@@ -40,6 +39,9 @@ See [Setting the Configuration Programma
 | cache-file | String | This option specifies the file/directory path of the fop cache file. This file is currently only used to cache font triplet information for future reference. | ${base}/conf/fop.cache |
 | renderers | (see text below) | Contains the configuration for each renderer. See below. | N/A |
 
+[^1]: Relative URIs for those properties are evaluated relative to the base URI of the configuration file. If the configuration is provided programmatically, the base URI can be set with `FopFactory.setUserConfigBaseURI` ; default is the current working directory.
+
+
 This is an excerpt from the example configuration file coming with FOP:
 
     <fop version="1.0">
@@ -70,8 +72,7 @@ This is an excerpt from the example conf
       
       <!-- etc. etc..... -->
     </fop>
-
-# Image Loading Customization <a id="image-loading"></a>
+## Image Loading Customization {#image-loading}
 
 Apache FOP uses the image loading framework from [Apache XML Graphics Commons](http://xmlgraphics.apache.org/commons/) to load images using various plug-ins. Every image loader plug-in has a hard-coded usage penalty that influences which solution is chosen if there are multiple possibilities to load an image. Sometimes, though, these penalties need to be tweaked and this can be done in the FOP configuration. An example:
 
@@ -176,6 +177,7 @@ FOP supports encryption of PDF output, t
     </renderer>
 
 By default FOP produces PDF files of version 1.4, but this can be changed in order to benefit from features that appeared in newer versions of PDF. At the moment, only a few features from PDF 1.5 have been implemented, but the configuration element will accept any value between 1.4 and 1.7. This is the value that will appear in the PDF header, although only features up to 1.5 will actually be used.
+
       <renderer mime="application/pdf">
         
         <!-- Versions 1.4, 1.5, 1.6 and 1.7 are accepted, all other values are invalid -->
@@ -199,7 +201,7 @@ Besides the normal font configuration (t
         </font>
       </fonts>
     </renderer>
-## Special Settings for the PCL Renderer <a id="pcl-renderer"></a>
+### Special Settings for the PCL Renderer <a id="pcl-renderer"></a>
 
 Non-standard fonts for the PCL renderer are made available through the Java2D subsystem which means that you don't have to do any custom font configuration in this case but you have to use the font names offered by Java.
 

Modified: xmlgraphics/site/trunk/content/fop/1.1/embedding.mdtext
URL: http://svn.apache.org/viewvc/xmlgraphics/site/trunk/content/fop/1.1/embedding.mdtext?rev=1416565&r1=1416564&r2=1416565&view=diff
==============================================================================
--- xmlgraphics/site/trunk/content/fop/1.1/embedding.mdtext (original)
+++ xmlgraphics/site/trunk/content/fop/1.1/embedding.mdtext Mon Dec  3 15:46:33 2012
@@ -12,22 +12,23 @@ To embed Apache&trade; FOP in your appli
 ## The API <a id="API"></a>
 
 FOP has many classes which express the "public" access modifier, however, this is not indicative of their inclusion into the public API. Every attempt will be made to keep the public API static, to minimize regressions for existing users, however, since the API is not clearly defined, the list of classes below are the generally agreed public API:
-org.apache.fop.apps.*
-org.apache.fop.fo.FOEventHandler
-org.apache.fop.fo.ElementMappingRegistry
-org.apache.fop.fonts.FontManager
-org.apache.fop.events.EventListener
-org.apache.fop.events.Event
-org.apache.fop.events.model.EventSeverity
-org.apache.fop.render.ImageHandlerRegistry
-org.apache.fop.render.RendererFactory
-org.apache.fop.render.intermediate.IFContext
-org.apache.fop.render.intermediate.IFDocumentHandler
-org.apache.fop.render.intermediate.IFException
-org.apache.fop.render.intermediate.IFParser
-org.apache.fop.render.intermediate.IFSerializer
-org.apache.fop.render.intermediate.IFUtil
-org.apache.fop.render.intermediate.util.IFConcatenator
+
+ - org.apache.fop.apps.*
+ - org.apache.fop.fo.FOEventHandler
+ - org.apache.fop.fo.ElementMappingRegistry
+ - org.apache.fop.fonts.FontManager
+ - org.apache.fop.events.EventListener
+ - org.apache.fop.events.Event
+ - org.apache.fop.events.model.EventSeverity
+ - org.apache.fop.render.ImageHandlerRegistry
+ - org.apache.fop.render.RendererFactory
+ - org.apache.fop.render.intermediate.IFContext
+ - org.apache.fop.render.intermediate.IFDocumentHandler
+ - org.apache.fop.render.intermediate.IFException
+ - org.apache.fop.render.intermediate.IFParser
+ - org.apache.fop.render.intermediate.IFSerializer
+ - org.apache.fop.render.intermediate.IFUtil
+ - org.apache.fop.render.intermediate.util.IFConcatenator
 
 ## Basic Usage Pattern <a id="basics"></a>
 
@@ -35,41 +36,42 @@ Apache FOP relies heavily on JAXP. It us
 
 Here is the basic pattern to render an XSL-FO file to PDF:
 
-import org.apache.fop.apps.FopFactory;
-import org.apache.fop.apps.Fop;
-import org.apache.fop.apps.MimeConstants;
-
-/*..*/
-
-// Step 1: Construct a FopFactory
-// (reuse if you plan to render multiple documents!](FopFactory fopFactory = FopFactory.newInstance();
-
-// Step 2: Set up output stream.
-// Note: Using BufferedOutputStream for performance reasons (helpful with FileOutputStreams).
-OutputStream out = new BufferedOutputStream(new FileOutputStream(new File("C:/Temp/myfile.pdf")));
-
-try {
-  // Step 3: Construct fop with desired output format
-  Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out);
-
-  // Step 4: Setup JAXP using identity transformer
-  TransformerFactory factory = TransformerFactory.newInstance();
-  Transformer transformer = factory.newTransformer(); // identity transformer
-
-  // Step 5: Setup input and output for XSLT transformation
-  // Setup input stream
-  Source src = new StreamSource(new File("C:/Temp/myfile.fo"));
-
-  // Resulting SAX events (the generated FO) must be piped through to FOP
-  Result res = new SAXResult(fop.getDefaultHandler());
-
-  // Step 6: Start XSLT transformation and FOP processing
-  transformer.transform(src, res);
-
-} finally {
-  //Clean-up
-  out.close();
-}
+    import org.apache.fop.apps.FopFactory;
+    import org.apache.fop.apps.Fop;
+    import org.apache.fop.apps.MimeConstants;
+
+    /*..*/
+
+    // Step 1: Construct a FopFactory
+    // (reuse if you plan to render multiple documents!)
+    FopFactory fopFactory = FopFactory.newInstance();
+
+    // Step 2: Set up output stream.
+    // Note: Using BufferedOutputStream for performance reasons (helpful with FileOutputStreams).
+    OutputStream out = new BufferedOutputStream(new FileOutputStream(new File("C:/Temp/myfile.pdf")));
+
+    try {
+      // Step 3: Construct fop with desired output format
+      Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out);
+
+      // Step 4: Setup JAXP using identity transformer
+      TransformerFactory factory = TransformerFactory.newInstance();
+      Transformer transformer = factory.newTransformer(); // identity transformer
+
+      // Step 5: Setup input and output for XSLT transformation
+      // Setup input stream
+      Source src = new StreamSource(new File("C:/Temp/myfile.fo"));
+
+      // Resulting SAX events (the generated FO) must be piped through to FOP
+      Result res = new SAXResult(fop.getDefaultHandler());
+
+      // Step 6: Start XSLT transformation and FOP processing
+      transformer.transform(src, res);
+
+    } finally {
+      //Clean-up
+      out.close();
+    }
 Let's discuss these 5 steps in detail:
 
 
@@ -100,7 +102,8 @@ As a result of the above we differentiat
 
 - (FOP-)Developer-oriented logging
 
--  [User/Integrator-oriented feedback](events.html) (NEW!](
+-  [User/Integrator-oriented feedback](events.html) (NEW!)
+
 The use of "feedback" instead of "logging" is intentional. Most people were using log output as a means to get feedback from events within FOP. Therefore, FOP now includes an `event` package which can be used to receive feedback from the layout engine and other components within FOP **per rendering run** . This feedback is not just some text but event objects with parameters so these events can be interpreted by code. Of course, there is a facility to turn these events into normal human-readable messages. For details, please read on on the [Events page](events.html) . This leaves normal logging to be mostly a thing used by the FOP developers although anyone can surely activate certain logging categories but the feedback from the loggers won't be separated by processing runs. If this is required, the [Events subsystem](events.html) is the right approach.
 
 ### Processing XSL-FO <a id="render"></a>
@@ -117,24 +120,24 @@ If you want to process XSL-FO generated 
   //with XSLT:
   Source xslt = new StreamSource(new File("mystylesheet.xsl"));
   Transformer transformer = factory.newTransformer(xslt);
-# Input Sources <a id="input"></a>
+## Input Sources <a id="input"></a>
 
 The input XSL-FO document is always received by FOP as a SAX stream (see the [Parsing Design Document](../dev/design/parsing.html) for the rationale).
 
 However, you may not always have your input document available as a SAX stream. But with JAXP it's easy to convert different input sources to a SAX stream so you can pipe it into FOP. That sounds more difficult than it is. You simply have to set up the right Source instance as input for the JAXP transformation. A few examples:
 
 
--  **URL:**  `Source src = new StreamSource("http://localhost:8080/testfile.xml");` 
+-  **URL:**  `Source src = new StreamSource("http://localhost:8080/testfile.xml");`
 
--  **File:**  `Source src = new StreamSource(new File("C:/Temp/myinputfile.xml"));` 
+-  **File:**  `Source src = new StreamSource(new File("C:/Temp/myinputfile.xml"));`
 
--  **String:**  `Source src = new StreamSource(new StringReader(myString)); // myString is a String` 
+-  **String:**  `Source src = new StreamSource(new StringReader(myString)); // myString is a String`
 
--  **InputStream:**  `Source src = new StreamSource(new MyInputStream(something));` 
+-  **InputStream:**  `Source src = new StreamSource(new MyInputStream(something));`
 
--  **Byte Array:**  `Source src = new StreamSource(new ByteArrayInputStream(myBuffer)); // myBuffer is a byte[] here` 
+-  **Byte Array:**  `Source src = new StreamSource(new ByteArrayInputStream(myBuffer)); // myBuffer is a byte[] here`
 
--  **DOM:**  `Source src = new DOMSource(myDocument); // myDocument is a Document or a Node` 
+-  **DOM:**  `Source src = new DOMSource(myDocument); // myDocument is a Document or a Node`
 
 -  **Java Objects:** Please have a look at the [Embedding examples](#examples) which contain an example for this.
 
@@ -151,32 +154,42 @@ The FopFactory holds configuration data 
 You can set all sorts of things on the FopFactory:
 
 
-- 
+-
 The **font base URL** to use when resolving relative URLs for fonts. Example:
-fopFactory.getFontManager().setFontBaseURL("file:///C:/Temp/fonts");
 
-- 
+    `fopFactory.getFontManager().setFontBaseURL("file:///C:/Temp/fonts");`
+
+-
 The **hyphenation base URL** to use when resolving relative URLs for hyphenation patterns. Example:
-fopFactory.setHyphenBaseURL("file:///C:/Temp/hyph");
 
-- 
+    `fopFactory.setHyphenBaseURL("file:///C:/Temp/hyph");`
+
+-
 Disable **strict validation** . When disabled FOP is less strict about the rules established by the XSL-FO specification. Example:
-fopFactory.setStrictValidation(false);
 
-- 
+    `fopFactory.setStrictValidation(false);`
+
+-
 Enable an **alternative set of rules for text indents** that tries to mimic the behaviour of many commercial FO implementations, that chose to break the specification in this respect. The default of this option is 'false', which causes Apache FOP to behave exactly as described in the specification. To enable the alternative behaviour, call:
-fopFactory.setBreakIndentInheritanceOnReferenceAreaBoundary(true);
 
-- 
+    `fopFactory.setBreakIndentInheritanceOnReferenceAreaBoundary(true);`
+
+-
 Set the **source resolution** for the document. This is used internally to determine the pixel size for SVG images and bitmap images without resolution information. Default: 72 dpi. Example:
-fopFactory.setSourceResolution(96); // =96dpi (dots/pixels per Inch](
-- 
+
+    `fopFactory.setSourceResolution(96); // =96dpi (dots/pixels per Inch)`
+
+-
 Manually add an **ElementMapping instance** . If you want to supply a special FOP extension you can give the instance to the FOUserAgent. Normally, the FOP extensions can be automatically detected (see the documentation on extension for more info). Example:
-fopFactory.addElementMapping(myElementMapping); // myElementMapping is a org.apache.fop.fo.ElementMapping
 
-- 
+    `fopFactory.addElementMapping(myElementMapping);// myElementMapping is a org.apache.fop.fo.ElementMapping`
+
+-
 Set a **URIResolver** for custom URI resolution. By supplying a JAXP URIResolver you can add custom URI resolution functionality to FOP. For example, you can use [Apache XML Commons Resolver](http://xml.apache.org/commons/components/resolver/) to make use of XCatalogs. Example:
-fopFactory.setURIResolver(myResolver); // myResolver is a javax.xml.transform.URIResolverBoth the FopFactory and the FOUserAgent have a method to set a URIResolver. The URIResolver on the FopFactory is primarily used to resolve URIs on factory-level (hyphenation patterns, for example) and it is always used if no other URIResolver (for example on the FOUserAgent) resolved the URI first.
+
+    `fopFactory.setURIResolver(myResolver);// myResolver is a javax.xml.transform.URIResolver`
+
+Both the FopFactory and the FOUserAgent have a method to set a URIResolver. The URIResolver on the FopFactory is primarily used to resolve URIs on factory-level (hyphenation patterns, for example) and it is always used if no other URIResolver (for example on the FOUserAgent) resolved the URI first.
 
 ### Customizing the User Agent <a id="user-agent"></a>
 
@@ -190,78 +203,93 @@ The user agent is the entity that allows
 You can do all sorts of things on the user agent:
 
 
-- 
+-
 The **base URL** to use when resolving relative URLs. Example:
-userAgent.setBaseURL("file:///C:/Temp/");
 
-- 
+    `userAgent.setBaseURL("file:///C:/Temp/");`
+
+-
 Set the **producer** of the document. This is metadata information that can be used for certain output formats such as PDF. The default producer is "Apache FOP". Example:
-userAgent.setProducer("MyKillerApplication");
 
-- 
+    `userAgent.setProducer("MyKillerApplication");`
+
+-
 Set the **creating user** of the document. This is metadata information that can be used for certain output formats such as PDF. Example:
-userAgent.setCreator("John Doe");
 
-- 
+    `userAgent.setCreator("John Doe");`
+
+-
 Set the **author** of the document. This is metadata information that can be used for certain output formats such as PDF. Example:
-userAgent.setAuthor("John Doe");
 
-- 
+    `userAgent.setAuthor("John Doe");`
+
+-
 Override the **creation date and time** of the document. This is metadata information that can be used for certain output formats such as PDF. Example:
-userAgent.setCreationDate(new Date());
 
-- 
+    `userAgent.setCreationDate(new Date());`
+
+-
 Set the **title** of the document. This is metadata information that can be used for certain output formats such as PDF. Example:
-userAgent.setTitle("Invoice No 138716847");
 
-- 
+    `userAgent.setTitle("Invoice No 138716847");`
+
+-
 Set the **keywords** of the document. This is metadata information that can be used for certain output formats such as PDF. Example:
-userAgent.setKeywords("XML XSL-FO");
 
-- 
+    `userAgent.setKeywords("XML XSL-FO");`
+
+-
 Set the **target resolution** for the document. This is used to specify the output resolution for bitmap images generated by bitmap renderers (such as the TIFF renderer) and by bitmaps generated by Apache Batik for filter effects and such. Default: 72 dpi. Example:
-userAgent.setTargetResolution(300); // =300dpi (dots/pixels per Inch](
-- 
+
+    `userAgent.setTargetResolution(300); // =300dpi (dots/pixels per Inch)`
+
+-
 Set **your own Document Handler** . This feature can be used for several purposes, the most likey usage of which would probably be binding a MIME type when the output is Intermediate Format (see [Document Handlers](#documenthandlers) ). This also allows advanced users to create their own implementation of the document handler.
-userAgent.setDocumentHandlerOverride(documentHandler) // documentHandler is an instance of org.apache.fop.render.intermediate.IFDocumentHandler
 
-- 
+    `userAgent.setDocumentHandlerOverride(documentHandler) // documentHandler is an instance of org.apache.fop.render.intermediate.IFDocumentHandler`
+
+-
 Set **your own FOEventHandler instance** . If you want to supply your own FOEventHandler or configure an FOEventHandler subclass in a special way you can give the instance to the FOUserAgent. Normally, the FOEventHandler instance is created by FOP. Example:
-userAgent.setFOEventHandlerOverride(myFOEventHandler); // myFOEventHandler is an org.apache.fop.fo.FOEventHandler
 
-- 
+    `userAgent.setFOEventHandlerOverride(myFOEventHandler); // myFOEventHandler is an org.apache.fop.fo.FOEventHandler`
+
+-
 Set a **URIResolver** for custom URI resolution. By supplying a JAXP URIResolver you can add custom URI resolution functionality to FOP. For example, you can use [Apache XML Commons Resolver](http://xml.apache.org/commons/components/resolver/) to make use of XCatalogs. Example:
-userAgent.setURIResolver(myResolver); // myResolver is a javax.xml.transform.URIResolverBoth the FopFactory and the FOUserAgent have a method to set a URIResolver. The URIResolver on the FOUserAgent is used for resolving URIs which are document-related. If it's not set or cannot resolve a URI, the URIResolver from the FopFactory is used.
-You should not reuse an FOUserAgent instance between FOP rendering runs although you can. Especially in multi-threaded environment, this is a bad idea.
-# Using a Configuration File <a id="config-external"></a>
+
+    `userAgent.setURIResolver(myResolver); // myResolver is a javax.xml.transform.URIResolver`
+Both the FopFactory and the FOUserAgent have a method to set a URIResolver. The URIResolver on the FOUserAgent is used for resolving URIs which are document-related. If it's not set or cannot resolve a URI, the URIResolver from the FopFactory is used. You should not reuse an FOUserAgent instance between FOP rendering runs although you can. Especially in multi-threaded environment, this is a bad idea.
+
+## Using a Configuration File <a id="config-external"></a>
 
 Instead of setting the parameters manually in code as shown above you can also set many values from an XML configuration file:
 
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
+    import org.apache.avalon.framework.configuration.Configuration;
+    import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
 
-/*..*/
+    /*..*/
 
-DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
-Configuration cfg = cfgBuilder.buildFromFile(new File("C:/Temp/mycfg.xml"));
-fopFactory.setUserConfig(cfg);
+    DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
+    Configuration cfg = cfgBuilder.buildFromFile(new File("C:/Temp/mycfg.xml"));
+    fopFactory.setUserConfig(cfg);
 
-/* ..or.. */
+    /* ..or.. */
 
-fopFactory.setUserConfig(new File("C:/Temp/mycfg.xml"));
+    fopFactory.setUserConfig(new File("C:/Temp/mycfg.xml"));
 The layout of the configuration file is described on the [Configuration page](configuration.html) .
 
 ## Document Handlers <a id="documenthandlers"></a>
 
 The document handlers are classes that inherit from `org.apache.fop.render.intermediate.IFDocumentHandler` . This is an interface for which a MIME type specific implementation can be created. This same handler is used either when XSL-FO is used as the input or when Intermediate Format is used. Since IF is output format agnostic, if custom fonts or other configuration information that affect layout (specific to a particular MIME type) are given then FOP needs that contextual information. The document handler provides that context so that when the IF is rendered, it is more visually consistent with FO rendering. The code below shows an example of how a document handler can be used to provide PDF configuration data to the IFSerializer.
-IFDocumentHandler targetHandler = userAgent.getRendererFactory().createDocumentHandler(userAgent, MimeConstants.MIME_PDF);
 
-IFSerializer ifSerializer = new IFSerializer();  //Create the IFSerializer to write the intermediate format
-ifSerializer.setContext(new IFContext(userAgent));
-ifSerializer.mimicDocumentHandler(targetHandler);   //Tell the IFSerializer to mimic the target format
+    IFDocumentHandler targetHandler = userAgent.getRendererFactory().createDocumentHandler(userAgent, MimeConstants.MIME_PDF);
+
+    IFSerializer ifSerializer = new IFSerializer();  //Create the IFSerializer to write the intermediate format
+    ifSerializer.setContext(new IFContext(userAgent));
+    ifSerializer.mimicDocumentHandler(targetHandler);   //Tell the IFSerializer to mimic the target format
 
-userAgent.setDocumentHandlerOverride(ifSerializer);  //Make sure the prepared document handler is used
-      The rest of the code is the same as in [Basic Usage Patterns](#basics) .
+    userAgent.setDocumentHandlerOverride(ifSerializer);  //Make sure the prepared document handler is used
+
+The rest of the code is the same as in [Basic Usage Patterns](#basics) .
 
 ## Hints <a id="hints"></a>
 
@@ -290,7 +318,8 @@ There are several options to consider:
 
 - Depending on the target OutputStream (in case of a FileOutputStream, but not for a ByteArrayOutputStream, for example) it may improve performance considerably if you buffer the OutputStream using a BufferedOutputStream: `out = new java.io.BufferedOutputStream(out);` <br></br>Make sure you properly close the OutputStream when FOP is finished.
 
-- Cache the stylesheet. If you use the same stylesheet multiple times you can set up a JAXP `Templates` object and reuse it each time you do the XSL transformation. (More information can be found [here](http://www.javaworld.com/javaworld/jw-05-2003/jw-0502-xsl.html) .](
+- Cache the stylesheet. If you use the same stylesheet multiple times you can set up a JAXP `Templates` object and reuse it each time you do the XSL transformation. (More information can be found [here](http://www.javaworld.com/javaworld/jw-05-2003/jw-0502-xsl.html) .)
+
 - Use an XSLT compiler like [XSLTC](http://xml.apache.org/xalan-j/xsltc_usage.html) that comes with Xalan-J.
 
 - Fine-tune your stylesheet to make the XSLT process more efficient and to create XSL-FO that can be processed by FOP more efficiently. Less is more: Try to make use of property inheritance where possible.
@@ -313,13 +342,13 @@ This [example](http://svn.apache.org/vie
 
 ![Example XSL-FO to PDF](images/EmbeddingExampleFO2PDF.png)
 
-## ExampleXML2FO.java <a id="ExampleXML2FO"></a>
+### ExampleXML2FO.java <a id="ExampleXML2FO"></a>
 
 This [example](http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleXML2FO.java?view=markup) has nothing to do with FOP. It is there to show you how an XML file can be converted to XSL-FO using XSLT. The JAXP API is used to do the transformation. Make sure you've got a JAXP-compliant XSLT processor in your classpath (ex. [Xalan](http://xml.apache.org/xalan-j) ).
 
 ![Example XML to XSL-FO](images/EmbeddingExampleXML2FO.png)
 
-## ExampleXML2PDF.java <a id="ExampleXML2PDF"></a>
+### ExampleXML2PDF.java <a id="ExampleXML2PDF"></a>
 
 This [example](http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleXML2PDF.java?view=markup) demonstrates how you can convert an arbitrary XML file to PDF using XSLT and XSL-FO/FOP. It is a combination of the first two examples above. The example uses JAXP to transform the XML file to XSL-FO and FOP to transform the XSL-FO to PDF.
 
@@ -345,7 +374,7 @@ This [example](http://svn.apache.org/vie
 
 ![Example Java object to PDF (via XML and XSL-FO)](images/EmbeddingExampleObj2PDF.png)
 
-## ExampleDOM2PDF.java <a id="ExampleDOM2PDF"></a>
+### ExampleDOM2PDF.java <a id="ExampleDOM2PDF"></a>
 
 This [example](http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleDOM2PDF.java?view=markup) has FOP use a DOMSource instead of a StreamSource in order to use a DOM tree as input for an XSL transformation.
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message