Browse Source

This commit was manufactured by cvs2svn to create branch

'fop-0_20_2-maintain'.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_20_2-maintain@194643 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-0_20_5rc
(no author) 22 years ago
parent
commit
8319dd699b

+ 58
- 0
docs/design/architecture.xml View File

@@ -0,0 +1,58 @@
<?xml version="1.0" standalone="no"?>

<document>
<header>
<title>Architecture</title>
<subtitle>Architecture information for FOP</subtitle>
<authors>
<person name="Arved Sandstrom"/>
</authors>
</header>

<body>

<s1 title="FOP Mechanics">

<s2 title="Introduction">
<p>
The overall process is controlled by <em>org.apache.fop.apps.Driver</em>.
This class handles the FO Tree building, renderers, output and logging.
</p>
<p>
The process in general is that the FO document is sent to the tree
builder via SAX events. This creates an FO Tree. The FO Tree is then
handled by the layout processor which converts the FO Tree into an area
tree. This area tree is then given to the renderer and the renderer converts
the area tree into a stream of data containing the output document.
</p>
</s2>

<s2 title="Formatting Object Tree">
<p>
The class <em>org.apache.fop.fo.FOTreeBuilder</em> is responsible for
actually constructing the FO tree. The key SAX events used are </p>
<p><code>startElement()</code>,</p>
<p><code>endElement()</code> and <code>characters()</code>.</p>

<p>All formatting objects derive from abstract class
<em>org.apache.fop.fo.FONode</em>. The other FO classes inherit from
<em>FONode</em> as follows:</p>

</s2>

<s2 title="Rendering">
<p>
This is a separate process. The <code>render()</code> method in
<em>Driver</em> is invoked (say,
by <em>CommandLine</em>) with the laid-out <em>AreaTree</em> and a
<em>PrintWriter</em> as arguments.
This actually calls the <code>render()</code> method in a specific implementation of
the <em>Renderer</em> interface, typically <em>PDFRenderer</em> or
<em>AWTRenderer</em>.
</p>
</s2>

</s1>
</body>
</document>


+ 20
- 0
docs/design/book.xml View File

@@ -0,0 +1,20 @@
<?xml version="1.0"?>

<book title="FOP Design" copyright="1999-2002 The Apache Software Foundation">
<external href="http://xml.apache.org/fop/" label="About FOP"/>
<separator/>
<page id="index" label="Design" source="intro.xml"/>
<page id="architecture" label="Architecture" source="architecture.xml" />
<page id="properties" label="Properties" source="properties.xml" />
<page id="fotree" label="FO Tree" source="fotree.xml" />
<page id="areatree" label="Area Tree" source="areas.xml" />
<separator/>
<page id="layout" label="Layout" source="layout.xml" />
<page id="renderers" label="Renderers" source="renderers.xml" />
<page id="useragent" label="User Agent" source="useragent.xml" />
<page id="optimise" label="Optimisations" source="optimise.xml" />
<separator/>
<page id="embedding" label="Embedding" source="embedding.xml" />
<separator/>
<page id="status" label="Status" source="status.xml" />
</book>

+ 28
- 0
docs/design/embedding.xml View File

@@ -0,0 +1,28 @@
<?xml version="1.0" standalone="no"?>

<!-- Overview -->

<document>
<header>
<title>FOP Design</title>
<subtitle>Design Approach to FOP</subtitle>
<authors>
<person name="Keiron Liddle" email="keiron@aftexsw.com"/>
</authors>
</header>

<body>
<s1 title="Introduction">
<p>
This is the design for the external interface when FOP is to be embedded
inside another java application.
</p>
<p>
Common places where FOP is embedded is in a report production application
of a server side application such as <jump href="http://xml.apache.org/cocoon/index.html">Cocoon</jump>.
</p>
</s1>

</body>
</document>


+ 92
- 0
docs/design/fotree.xml View File

@@ -0,0 +1,92 @@
<?xml version="1.0" standalone="no"?>

<!-- Overview -->

<document>
<header>
<title>FO Tree</title>
<subtitle>Design of FO Tree Structure</subtitle>
<authors>
<person name="Keiron Liddle" email="keiron@aftexsw.com"/>
</authors>
</header>

<body>
<s1 title="Introduction">
<p>
The FO Tree is an internal representation of the input FO document.
The tree is created by building the elements and attributes from
the SAX events.
</p>
<p>
The FO Tree is used as an intermediatory structure which is converted
into the area tree. The complete FO tree should not be held in memory
since FOP should be able to handle FO documents of any size.
</p>

<s2 title="FONode">
<p>
The class inheritance described above only describes the nature of the
content. Every FO in FOP also has a parent, and a Vector of children. The
parent attribute (in the Java sense), in particular, is used to enforce
constraints required by the FO hierarchy.
</p>

<p>
FONode, among other things, ensures that FO's have a parent, that they
have children, that they maintain a marker of where the layout was up to
(for FObj's it is the child number, and for FOText's it is the character
number), and that they have a <code>layout()</code> method.
</p>
</s2>

<s2 title="Making FO's">
<p>
An FO maker is read from a hashmap lookup using the namespace and
element name. This maker is then used to create a new class that
represents an FO element. This is then added to the FO tree as a child
of the current parent.
</p>

<p>
Properties (recall that FO's have properties, areas have traits, and XML
nodes have attributes) are also a concern of <em>FOTreeBuilder</em>. It
accomplishes this by using a <em>PropertyListBuilder</em>. There is a
separate <em>PropertyListBuilder</em> for each namespace encountered
while building the FO tree. Each Builder object contains a hash of
property names and <ref>their</ref> respective makers. It may also
contain element-specific property maker hashes; these are based on the
<em>local name</em> of the flow object, ie. <em>table-row</em>, not
<em>fo:table-row</em>. If an element-specific property mapping exists,
it is preferred to the generic mapping.</p>
<p>The base class for all
properties is <em>Property</em>, and all the property makers extend
<em>Property.Maker</em>. A more complete discussion of the property
architecture may be found in <jump href="properties.html">Properties</jump>.
</p>
</s2>

<s2 title="Foreign XML">
<p>
FOP supports the handlingof foreign XML.
The XML is converted internally into a DOM, this is then available to
the FO tree to convert the DOM into another format which can be rendered.
In the case of SVG the DOM needs to be created with Batik, so an element
mapping is used to read all elements in the SVG namespace and pass them
into the Batik DOM.
</p>
</s2>

<s2 title="Extensions">
<p>
It is possible to add extensions to FOP so that you can extend the ability of
FOP with respect to render output, document specific information or extended
layout functionality.
</p>
</s2>

</s1>

</body>
</document>


+ 257
- 0
docs/design/properties.xml View File

@@ -0,0 +1,257 @@
<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- $Id$ -->

<document>
<header>
<title>Properties</title>
<subtitle>Properties overview</subtitle>
<authors>
<person name="Karen Lease"/>
</authors>
</header>

<body>

<s1 title="Properties">
<s2 title="Property datatypes">
<p>The property datatypes are defined in the
org.apache.fop.datatypes package, except Number and String which are java
primitives. The FOP datatypes are:</p>
<ul>
<li>Number</li>
<li>String</li>
<li>ColorType</li>
<li>Length (has several subclasses)</li>
<li>CondLength (compound)</li>
<li>LengthRange (compound)</li>
<li>Space (compound)</li>
<li>Keep (compound)</li>
</ul>
<p>The <em>org.apache.fop.fo.Property</em> class is the superclass for all
Property subclasses. There is a subclass for each kind of property
datatype. These are named using the datatype name plus the word
Property, resulting in NumberProperty, StringProperty, and so
on. There is also a class EnumProperty which uses an <code>int</code>
primitive to hold enumerated values. There is no corresponding Enum
datatype class.</p>
<p>The Property class provides a "wrapper" around any possible
property value. Code manipulating property values (in layout for
example) usually knows what kind (or kinds) of datatypes are
acceptable for a given property and will use the appropriate accessor.</p>
<p>The base Property class defines accessor methods for all FO property
datatypes, such as getNumber(), getColorType(), getSpace(), getEnum(),
etc. It doesn't define
accessors for SVG types, since these are handled separately (at least
for now.) In the base Property class, all of these methods return
null, except getEnum which returns 0. Individual subclasses return a value of the appropriate type,
such as Length or ColorType. A subclass may also choose to return a
reasonable value for other accessor types. For example, a
SpaceProperty will return the optimum value if asked for a Length.</p>
</s2>

<s2 title="Property Makers">
<p>The Property class contains a nested class called
<em>Maker</em>. This is the base class for all other property Makers. It
provides basic framework functionality which is overridden by the
code generated by properties.xsl from the *properties.xml files. In
particular it provides basic expression evaluation, using
PropertyParser class in the org.apache.fop.fo.expr package.</p>
<p>Other Property subclasses such as LengthProperty define their own
nested Maker classes (subclasses of Property.Maker). These handle
conversion from the Property subclass returned from expression
evaluation into the appropriate subclass for the property.</p>
<p>For each generic or specific property definition in the
properties.xml files, a new subclass of one of the Maker classes is
created. Note that no new Property subclasses are created, only new
PropertyMaker subclasses. Once the property value has been parsed and
stored, it has no specific functionality. Only the Maker code is
specific. Maker subclasses define such aspects as keyword
substitutions, whether the property can be inherited or not, which
enumerated values are legal, default values, corresponding properties
and specific datatype conversions.</p>
</s2>
<s2 title="XML property specification format">
<s3 title="Generic properties">
<p>In the properties xml files, one can define generic property
definitions which can serve as a basis for individual property
definitions. There are currently several generic properties defined in
foproperties.xml. An example is GenericColor, which defines basic properties
for all ColorType properties. Since the generic specification doesn't include
the inherited or default elements, these should be set in each property
which is based on GenericColor. Here is an example:</p>
<p>
<code>
&lt;property type='generic'>
&lt;name>background-color&lt;/name>
&lt;use-generic>GenericColor&lt;/use-generic>
&lt;inherited>false&lt;/inherited>
&lt;default>transparent&lt;/default>
&lt;/property>
</code></p>
<p>A generic property specification can include all of the elements
defined for the property element in the DTD, including the description
of components for compound properties, and the specification of
keyword shorthands.</p>

<p>Generic property specifications can be based on other generic
specifications.
An example is GenericCondPadding template which is based on the
GenericCondLength definition but which extends it by adding an inherited
element and a default value for the length component.</p>
<p>
Generic properties can specify enumerated values, as in the
GenericBorderStyle template. This means that the list of values, which
is used by 8 properties (the "absolute" and "writing-mode-relative"
variants for each BorderStyle property) is only specified one time.</p>
<p>
When a property includes a "use-generic" element and includes no other
elements (except the "name" element), then no class is generated for the
property. Instead the generated mapping will associate this
property directly with an instance of the generic Maker.</p>
<p>
A generic class may also be hand-coded, rather than generated from the
properties file.
Properties based on such a generic class are indicated by the
attribute <code>ispropclass='true'</code> on the
<em>use-generic</em> element.</p>
<p> This is illustrated by the SVG properties, most of
which use one of the Property subclasses defined in the
<em>org.apache.fop.svg</em>
package. Although all of these properties are now declared in
svgproperties.xml, no specific classes are generated. Classes are only
generated for those SVG properties which are not based on generic
classes defined in svg.</p>
</s3>
<s3 title="Element-specific properties">
<p>Properties may be defined for all flow objects or only for
particular flow objects. A PropertyListBuilder object will always look
first for a Property.Maker for the flow object before looking in the
general list. These are specified in the
<code>element-property-list</code> section of the properties.xml
files. The <code>localname</code> element children of this element specify for
which flow-object elements the property should be registered.</p>
<p><em>NOTE</em>: All the properties for an object or set of objects
must be specified in a single element-property-list element. If the
same localname appears in several element lists, the later set of
properties will hide the earlier ones! Use the <em>ref</em>
functionality if the same property is to be used in different sets of
element-specific mappings.
</p>
</s3>
<s3 title="Reference properties">
<p>A property element may have a type attribute with the value
<code>ref</code>. The
content of the <em>name</em> child element is the name of the referenced
property (not its class-name!). This indicates that the property
specification has
already been given, either in this same specification file or in a
different one (indicated by the <code>family</code> attribute). The
value of the family attribute is <em>XX</em> where the file
<em>XXproperties.xml</em> defines the referenced property. For
example, some SVG objects may have properties defined for FO. Rather
than defining them again with a new name, the SVG properties simply
reference the defined FO properties. The generating mapping for the
SVG properties will use the FO Maker classes.</p>
</s3>
<s3 title="Corresponding properties">
<p>Some properties have both <em>absolute</em> and
<em>writing-mode-relative</em> forms. In general, the absolute forms
are equivalent to CSS properties, and the writing-mode-relative forms
are based on DSSSL. FO files may use either or both forms. In
FOP code, a request for an absolute form will retrieve that value if it
was specified on the FO; otherwise the corresponding relative property
will be used if it was specified. However, a request for a relative
form will only use the specified relative value if the corresponding
absolute value was <em>not</em> specified for that FO.
</p>
<p>Corresponding properties are specified in the properties.xml files
using the element <code>corresponding</code>, which has at least one
<code>propval</code> child and may have a <code>propexpr</code> child,
if the corresponding
value is calculated based on several other properties, as for
<code>start-indent</code>.
</p>
<p><em>NOTE</em>: most current FOP code accesses the absolute variants
of these properties, notably for padding, border, height and width
attributes. However it does use start-indent and end-indent, rather
than the "absolute" margin properties.
</p>
</s3>
</s2>

<s2 title="Mapping">
<p>The XSL script <code>propmap.xsl</code> is used to generate
property mappings based on
both foproperties.xml and svgproperties.xml. The mapping classes
in the main fop packages simply load these automatically generated
mappings. The mapping code still uses the static
"maker" function of the generated object to obtain a Maker
object. However, for all generated classes, this method returns an
instance of the class itself (which is a subclass of Property.Maker)
and not an instance of a separate nested Maker class.</p>
<p>For most SVG properties which use the SVG Property classes directly,
the generated mapper code calls the "maker" method of the SVG Property
class, which returns an instance of its nested Maker class.</p>
<p>The property generation also handles element-specific property
mappings as specified in the properties XML files.</p>
</s2>

<s2 title="Enumerated values">
<p>For any property whose datatype is <code>Enum</code> or which
contains possible enumerated values, FOP code may need to access
enumeration constants. These are defined in the interfaces whose name
is the same as the generated class name for the property,
for example <code>BorderBeforeStyle.NONE</code>. These interface classes
are generated by the XSL script <code>enumgen.xsl</code>. A separate
interface defining the enumeration constants is always generated for
every property which uses the constants, even if the constants
themselves are defined in a generic class, as in BorderStyle.</p>
<p>If a subproperty or component of a compound property has enumerated
values, the constants are defined in a nested interface whose name is
the name of the subproperty (using appropriate capitalization
rules). For example,
the keep properties may have values of AUTO or FORCE or an integer
value. These are defined for each kind of keep property. For example,
the keep-together property is a compound property with the components
within-line, within-column and within-page. Since each component may
have the values AUTO or FORCE, the KeepTogether interface defines
three nested interfaces, one for each component, and each defines
these two constants. An example of a reference in code to the constant
is <code>KeepTogether.WithinPage.AUTO</code>.</p>

</s2>

<s2 title="Compound property types">
<p>Some XSL FO properties are specified by compound datatypes. In the FO file,
these are defined by a group of attributes, each having a name of the
form <code>property.component</code>, for example
<code>space-before.minimum</code>. These are several compound
datatypes:</p>
<ul>
<li>LengthConditional, with components length and conditionality</li>
<li>LengthRange, with components minimum, optimum, and maximum</li>
<li>Space, with components minimum, optimum, maximum, precedence and
conditionality </li>
<li>Keep, with components within-line, within-column and within-page</li>
</ul>
<p>These are described in the properties.xml files using the element
<code>compound</code> which has <code>subproperty</code> children. A subproperty element is much
like a property element, although it may not have an <code>inherited</code> child
element, as only a complete property object may be inherited.
</p>
<p>Specific datatype classes exist for each compound property. Each
component of a compound datatype is itself stored as a Property
object. Individual components may be accessed either by directly
performing a get operation on the name, using the "dot" notation,
eg. <code>get("space-before.optimum")</code>; or by using an accessor on the compound
property, eg. <code>get("space-before").getOptimum()</code>.
In either case,
the result is a Property object, and the actual value may be accessed
(in this example) by using the "getLength()" accessor.
</p>
</s2>
</s1>
</body>
</document>


+ 30
- 0
docs/design/renderers.xml View File

@@ -0,0 +1,30 @@
<?xml version="1.0" standalone="no"?>

<!-- Overview -->

<document>
<header>
<title>Renderers</title>
<subtitle>Design of Renderers</subtitle>
<authors>
<person name="Keiron Liddle" email="keiron@aftexsw.com"/>
</authors>
</header>

<body>
<s1 title="Introduction">
<p>
A render is primarily design to convert a given area tree into the output
document format. It should be able to produce pages and fill the pages
with the text and graphical content. Usually the output is sent to
an output stream.
</p>
<p>
Some output formats may support extra information that is not available
from the area tree or depends on the destination of the document.
</p>
</s1>

</body>
</document>


+ 28
- 0
docs/design/status.xml View File

@@ -0,0 +1,28 @@
<?xml version="1.0" standalone="no"?>

<!-- Overview -->

<document>
<header>
<title>Design Status</title>
<subtitle>Current Status of FOP and Design</subtitle>
<authors>
<person name="Keiron Liddle" email="keiron@aftexsw.com"/>
</authors>
</header>

<body>
<s1 title="Status">
<p>
Currently some of FOP is being re-written so that the layout can be handled
properly without the problems that have been encountered and to make
it possible to handle keeps/breaks and spacing better.
</p>
<p>

</p>
</s1>

</body>
</document>


+ 201
- 0
docs/xml-docs/fop/output.xml View File

@@ -0,0 +1,201 @@
<?xml version="1.0" standalone="no"?>


<!-- Output Formats: Renderers -->
<document>
<header>
<title>Output</title>
<subtitle>Notes about Output Formats: Renderers</subtitle>
<authors>
<person name="Keiron Liddle" email="keiron@aftexsw.com"/>
<person name="Art Welch"/>
</authors>
</header>

<body>
<s1 title="Output Formats">
<p>
FOP supports a number of different output formats. This is achieved by
using different renderers that create the output.
</p>
<p>
Here we will explain some information for uses to be able to understand
what the renderers are doing and what difference there may be between
different renderers.
</p>
<s2 title="Common Information">
<p>
Each renderer is given an area tree to render to its output format.
The area tree is simply a representation of the pages and the placement
of text and graphical objects on those pages.
</p>
<p>
The renderer will be given each page as it is ready and an output stream
to write the data out. The renderer is responsible for managing the
output format and associated data and flow.
</p>
<p>
Fonts and Layout - some formats (eg. PDF and AWT) rely on different
font information. The fonts for these outputs have different sizes
for the same point size. This means that the layout can be quite
different for the same fo document.
</p>
<p>
DPI - This is an important issue when creating output for printing.
The dpi is used to convert measurements into points. For example 1in
= 2.54cm = 72 points. It is also used when determining the size of
images and the rendering of certain graphics in the output. Currently
FOP uses a value of 72dpi.
</p>
<p>
You may want to send your output directly to a printer. The Print
renderer uses the java api to print the document or you might be
able to send the output stream directly to a printer. If your printer
supports postscript you could send the postscript to the printer. If
you have a printer that supports PCL you could stream the PCL document
to your printer.
</p>
</s2>
<s2 title="PDF">
<p>
PDF is the best supported output format. It is also the most accurate
with text and layout. This creates a PDF document that is streamed out
as each page is rendered. This means that the internal page index
information is stored near the end of the document.
The PDF version supported is 1.3 which is currently the most popular
version for Acrobat Reader (4.0), PDF versions are forwards/backwards
compatible.
</p>
</s2>
<s2 title="PCL">
<p>
This format is for the Hewlett-Packard PCL printers.
It should produce output as close to identical as possible to the
printed output of the PDFRenderer within the limitations of the
renderer, and output device.
</p>
<p>
The output created by the PCLRenderer is generic PCL 5 as documented
in the "HP PCL 5 Printer Language Technical Reference Manual" (copyright 1990).
This should allow any device fully supporting PCL 5 to be able to
print the output generated by the PCLRenderer.
</p>
<s3 title="Limitations">
<ul>
<li>Text or graphics outside the left or top of the printable area are not rendered properly. In general things that should print to the left of the printable area are shifted to the right so that they start at the left edge of the printable area and an error message is generated.</li>
<li>The Helvetica and Times fonts are not well supported among PCL printers so Helvetica is mapped to Arial and Times is mapped to Times New. This is done in the PCLRenderer, no changes are required in the FO's. The metrics and appearance for Helvetica/Arial and Times/Times New are nearly identical, so this has not been a problem so far.</li>
<li>Only the original fonts built into FOP are supported.</li>
<li>For the non-symbol fonts, the ISO 8859/1 symbol set is used (PCL set "0N").</li>
<li>Multibyte characters are not supported.</li>
<li>SVG support is limited. Currently only lines, rectangles (may be rounded), circles, ellipses, text, simple paths, and images are supported. Colors are supported (dithered black and white) but not gradients.</li>
<li>Images print black and white only (not dithered). When the renderer prints a color image it uses a threshold value, colors above the threshold are printed as white and below are black. If you need to print a non-monochrome image you should dither it first.</li>
<li>Image scaling is accomplished by modifying the effective resolution of the image data. The available resolutions are 75, 100, 150, 300, and 600 DPI.</li>
<li>Color printing is not supported. Colors are rendered by mapping the color intensity to one of the PCL fill shades (from white to black in 9 steps).</li>
<li>SVG clipping is not supported.</li>
</ul>
</s3>

<s3 title="Additional Features">
<p>There are some special features that are controlled by some public variables on the PCLRenderer class.</p>

<dl>
<dt>orientation</dt>
<dd><p>The logical page orientation is controlled by the public orientation variable. Legal values are:</p>
<ul>
<li>0 Portrait</li>
<li>1 Landscape</li>
<li>2 Reverse Portrait</li>
<li>3 Reverse Landscape</li>
</ul>
</dd>
<dt>curdiv, paperheight</dt>
<dd>The curdiv and paperheight variables allow multiple virtual pages to be printed on a piece of paper. This allows a standard laser printer to use perforated paper where every perforation will represent an individual page. The paperheight sets the height of a piece of paper in decipoints. This will be divided by the page.getHeight() to determine the number of equal sized divisions (pages) that will fit on the paper. The curdiv variable may be read/written to get/set the current division on the page (to set the starting division and read the ending division for multiple invocations).</dd>
<dt>topmargin, leftmargin</dt>
<dd>The topmargin and leftmargin may be used to increase the top and left margins for printing.</dd>
</dl>
</s3>
</s2>
<s2 title="PS">
<p>
The postscript format can be used to send to a printer or any other
purpose you may have. It has good support for most text and
layout. images and SVG are not fully supported due to some ps
issues.
</p>
</s2>
<s2 title="RTF">
<p>
This is currently not integrated with FOP but it will soon.
This will create an rtf (rich text format) document that will
attempt to contain as much information from the fo document as
possible.
</p>
</s2>
<s2 title="SVG">
<p>
This format creates an SVG document that has links between the pages.
This is primarily for slides and creating svg images of pages.
Large documents will create SVG files that are far too large for
and SVG viewer to handle. Since fo documents usually have text the
SVG document will have a large number of text elements.
The font information for the text is obtained from the jvm in the
same way as the AWT viewer, if the svg is view where the fonts are
different, such as another platform, then the page will appear wrong.
</p>
</s2>
<s2 title="XML">
<p>
This is for testing and verification. The XML created is simply
a representation of the internal area tree put into XML. It does
not perform any other purpose.
</p>
</s2>
<s2 title="Print">
<p>
It is possible to directly print the document from the command line.
This is done with the same code that renders to the AWT renderer.
</p>
</s2>
<s2 title="AWT">
<p>
The AWT viewer shows a window with the pages displayed inside a
java graphic. It displays one page at a time.
The fonts used for the formatting and viewing depend on the fonts
available to your JRE.
</p>
</s2>
<s2 title="MIF">
<p>
This format is the Maker Interchange Format which is used by
Adobe Framemaker. This is currently not fully implemented.
</p>
</s2>
<s2 title="TXT">
<p>
Text as you could imagine does not work very well. It is an output format
that you should expect bad results. The main purpose of this is to get
a quick and dirty view of the document and the text inside it.
</p>
<p>
The TXTRenderer is a FOP renderer that 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. Of course when limited to plain
fixed pitch text the output does not always look very good.
</p>
<p>
The TXTRenderer works with a fixed size page buffer. The size of this
buffer is controlled with the textCPI and textLPI public variables.
The textCPI is the effective horizontal characters per inch to use.
The textLPI is the vertical lines per inch to use. From these values
and the page width and height the size of the buffer is calculated.
The formatting objects to be rendered are then mapped to this grid.
Graphic elements (lines, borders, etc) are assigned a lower priority
than text, so text will overwrite any graphic element representations.
</p>
</s2>

</s1>
</body>
</document>


+ 382
- 0
hyph/el.xml View File

@@ -0,0 +1,382 @@
<?xml version="1.0" encoding="iso-8859-7"?>
<!DOCTYPE hyphenation-info SYSTEM "hyphenation.dtd">

<!-- these hyphenation rules have been created for FOP by Dimitris Kamenopoulos (d.kamenopoulos@mail.ntua.gr).
They support modern (monotonico) greek. They are
based on the excellent hyphenation file GRMTex.tex
by Dimitrios Fillipou.
found in the TexGreek distribution. However there are quite a few differences. In particular, this file contains real greek characters rather than their latin tex subtitutes and so it is a rewrite, not a copy. Therefore, since it hasn't been tested as much as its tex predecessor, do contact me if you spot any errors.-->
<hyphenation-info>

<hyphen-char value="-" />
<hyphen-min before="2" after="2" />
<classes>
áÁ
ܶ
âÂ
ãÃ
äÄ
åÅ
ݸ
æÆ
çÇ
Þ¹
Èè
éÉ
ߺ
úÚ
À
ûÛ
à
ü¼
ý¾
êÊ
ëË
ìÌ
íÍ
îÎ
ïÏ
ðÐ
ñÑ
óÓò
ôÔ
õÕ
öÖ
÷×
øØ
þ¿
ùÙ
</classes>
<exceptions>
äé-Ü
ðïé-üí
ðïé-ïý
</exceptions>
<patterns>
4â1æ
4â1è
4â1í
4â1î
4â1ð
4â1ó
4â1ô
3â1ö
4â1÷
3â1ø
4ã1â
4ã2æ
4ã1è
4ã1ì
4ñ5ã2ì
4ã1÷
4ã1ð
4ã1ô
4ã1ö
4ã1÷
4ã1ø
4ä1â
4ä1ã
4ä1æ
4ä1ê
4ä1ë
4ä1î
4ä1ð
4ä1ó
4ä1ô
4ä1÷
4ä1ø
4æ1â
4æ1ä
4æ1è
4æ1ê
4æ1ë
4æ1ì
ôæ2ì
4æ1í
4æ1î
4æ1ð
4æ1ñ
4æ1ó
4æ1ô
4æ1ö
4æ1÷
4æ1ø
4è1â
4è1ã
4è1ä
4è1æ
4ê1ê
4ê1ð
4ê1÷
4ê1ø
4ë1â
4ë1ã
4ë1ä
4ë1æ
4ë1è
4ë1ê
4ë1ì
4ë1í
4ë1î
4ë1ð
4ë1ñ
4ë1ó
4ë1ô
4ë1ö
4ë1÷
4ë1ø
4ì1â
4ì1ã
4ì1ä
4ì1æ
4ì1è
4ì1ê
4ì1ë
4ì1ö
4ì1÷
4ì1ø
4í1â
4í1ã
4í1ä
4í1æ
4í1è
4í1ê
4í1ë
4í1ì
4í1î
4í1ð
4í1ñ
4í1ó
4í1ö
4í1÷
4í1ø
4î1â
4î1ã
4î1ä
4î1æ
4î1è
4î1ê
4î1ë
4î1ì
4î1í
4î1ð
4î1ñ
4î1ó
4î1ô
4ã4î2ô
4ñ4î2ô
4î1ö
4î1÷
4î1ø
4ð1â
4ð1ã
4ð1ä
4ð1æ
4ð1è
4ð1ê
4ð1ì
4ð1î
4ð1ó
4ð1ö
4ð1÷
4ð1ø
4ñ1â
4ñ1ã
4ñ1ä
4ñ1æ
4ñ1è
4ñ1ê
4ñ1ë
4ñ1ì
4ñ1í
4ñ1î
4ñ1ð
4ñ1ó
4ñ1ô
4ñ1ö
4ñ1÷
4ñ1ø
4ó1ä
4ó1æ
4ó1í
4ó1î
4ó1ñ
4ó1ø
4ô1â
4ô1ã
4ô1ä
4ô1è
4ô1ê
4ô1í
4ô1î
4ô1ð
4ô1ö
óô2ö
4ô1÷
4ô1ø
4ö1â
4ö1ã
4ö1ä
4ö1æ
4ö1ì
4ö1í
4ö1î
4ö1ð
4ö1ó
4ö1÷
4ö1ø
4ø1â
4ø1ã
4ø1ä
4ø1æ
4ø1è
4ø1ê
4ø1ë
4ø1ì
4ø1í
4ø1î
4ø1ð
4ø1ñ
4ø1ó
4ø1ô
4ø1ö
4ø1÷
á1
å1
ç1
é1
ï1
õ1
ù1
þ1
á2é
á2ß
á2õ
á2ý
Ü3õ
å2é
å2ß
å2õ
å2ý
Ý3õ
ç2õ
Þ3õ
ï2é
ï2ß
ï2õ
ï2ý
ü3õ
õ2é
õ2ß
ý3é
á2ç
Ü3ç
á2ú
á2û
å2ú
ü2åé
ï2ç
ü3ç
ï2ú
ü3é
é2á
é2Ü
é2å
é2Ý
é2ï
é2ü
4â.
4ã.
4ãê.
4ä.
4æ.
4è.
4ê.
4ë.
4ì.
4ìð.
4í.
4íô.
4î.
4ð.
4ñ.
4ó.
4ô.
4ôæ.
4ôó.
4ö.
4÷.
4ø.
4'
4â'
4ãê'
4æ'
4ë'
4ì'
4ìð'
4í'
4íô'
4î'
4ð'
4ñ'
4ó'
4ô'
4ôæ'
4ôó'
4ö'
4÷'
4ø'
.â4
.ã4
.ä4
.æ4
.è4
.ê4
.ë4
.ì4
.í4
.î4
.ð4
.ñ4
.ó4
.ô4
.ö4
.÷4
.ø4
4â1â
4ã1ã
4æ1æ
4è1è
4ë1ë
4ì1ì
4í1í
4ð1ð
4ñ1ñ
4ó1ó
4ô1ô
ôö1ö
4÷1÷
3ø1ø
4ã5ê2ö
4ã1êô
4ì1ðô
4í1ôæ
4í1ôó
4âñ.
4ãë.
4êô.
4ãêó.
4êó.
4ëó.
4ìðë.
4ìðí.
4ìðñ.
4ìó.
4íó.
4ñó.
4óê.
4óô.
4ôë.
4ôñ.
</patterns>
</hyphenation-info>

+ 2374
- 0
hyph/hu.xml
File diff suppressed because it is too large
View File


+ 35
- 0
src/org/apache/fop/render/txt/TXTStream.java View File

@@ -0,0 +1,35 @@
/*
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources.
*/

package org.apache.fop.render.txt;

import java.io.*;

public class TXTStream {
OutputStream out = null;
boolean doOutput = true;

public TXTStream(OutputStream os) {
out = os;
}

public void add(String str) {
if (!doOutput)
return;

try {
byte buff[] = str.getBytes("UTF-8");
out.write(buff);
} catch (IOException e) {
throw new RuntimeException(e.toString());
}
}

public void setDoOutput(boolean doout) {
doOutput = doout;
}

}

Loading…
Cancel
Save