+
+ PDF and PS transcoders now have a common base class. It also
+ optionally supports Avalon Logging and Configuration. Support for
+ plugging in an EntityResolver into Batik is now included.
+ (JM)
+
+
+
+ Implemented on-the-fly stream output (less buffering leads to
+ decreased memory usage and increased speed).
+ (JM)
+
+
+
+ General refactoring of the PDF library to centralize certain
+ behaviour and reduce redundancy. Some memory allocation
+ optimizations.
+ (JM)
@@ -386,7 +398,7 @@
-
+
Version 2002 (2002)
1.7 +335 -387 xml-site/targets/fop/changes.pdf
<>
1.4 +23 -0 xml-site/targets/fop/changes.rss.xml
Index: changes.rss.xml
===================================================================
RCS file: /home/cvs/xml-site/targets/fop/changes.rss.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- changes.rss.xml 17 Mar 2003 23:29:09 -0000 1.3
+++ changes.rss.xml 31 Mar 2003 23:24:31 -0000 1.4
@@ -5,6 +5,29 @@
JM
:
+ PDF and PS transcoders now have a common base class. It also
+ optionally supports Avalon Logging and Configuration. Support for
+ plugging in an EntityResolver into Batik is now included.
+ code updatehttp://xml.apache.org/fop//changes.htmlcode update
+ by
+ JM
+ :
+
+ Implemented on-the-fly stream output (less buffering leads to
+ decreased memory usage and increased speed).
+ code updatehttp://xml.apache.org/fop//changes.htmlcode update
+ by
+ JM
+ :
+
+ General refactoring of the PDF library to centralize certain
+ behaviour and reduce redundancy. Some memory allocation
+ optimizations.
+ code updatehttp://xml.apache.org/fop//changes.htmlcode update
+ by
+ JM
+ :
+
Enhanced PDF encryption support so it is optional depending on the
availability of JCE and/or cryptographic algorithms.
code addhttp://xml.apache.org/fop//changes.htmlcode add
1.29 +0 -8 xml-site/targets/fop/compiling.html
Index: compiling.html
===================================================================
RCS file: /home/cvs/xml-site/targets/fop/compiling.html,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- compiling.html 11 Mar 2003 15:34:36 -0000 1.28
+++ compiling.html 31 Mar 2003 23:24:31 -0000 1.29
@@ -192,14 +192,6 @@
FOP's goal is to be compliant with the W3C XSL-FO 1.0 standard. There are three levels of compliance specified in the standard: basic, extended, and complete. In the tables below, blue indicates support at the specified level of compliance, and red indicates a lack of support.
5.1. SVG text rendered in bad quality. How do I put SVG text as text
- into PDF?^
+
5.1. The rendering of SVG text in my PDF is of poor quality.
+Can I control this?^
-
- The svg text is rendered as shapes, the Acrobat viewer displays it
- with bad quality unless you turn on smooth line art in the Acrobat
- preferences. The printout is always ok, it's only the screen view
- which is of bad quality by default.
-
-
- You can force Batik not to render SVG text by setting the
- strokeSVGText property to false. You can do this in the user
- configuration file:
-
@@ -1833,7 +1800,7 @@
If your table is more complicated, or if defining borders on individual cells becomes too much work, use the code above and nest your table within the moddle cell.
-
+
8.3. (FO) How to get page numbers printed on the "outer side" of the
page (for books, for example)?^
@@ -1843,7 +1810,7 @@
pages.
-
+
8.4. (FO) How do I use different static content for odd and even
pages?^
@@ -2197,7 +2164,7 @@
document for instructions on how to use it.
-
+
8.13. (XML) There are complaints about . How
do I get a non-breaking space in FO?^
@@ -2207,7 +2174,7 @@
which declares the entity.
-
+
8.14. (XML) There are complaints about undefined entities, for example
about ü which used to work in HTML. How do I enter
special characters like in HTML?^
@@ -2221,7 +2188,7 @@
-
+
8.15. (XML) There are complaints about illegal characters and entities
in the input.^
@@ -2241,7 +2208,7 @@
file format.
-
+
8.16. (XML) There are complaints about illegal bytes or characters in
the input. There are odd characters in the result.^
@@ -2255,10 +2222,10 @@
-
+
9. General suggestions. How to solve problems.
-
+
9.1. I think I have found a bug in FOP. What should I do?^
@@ -2267,7 +2234,7 @@
bugs already reported and how to report new ones.
-
+
9.2. I have questions that are not addressed in this FAQ. Where
should I post them?^
@@ -2304,10 +2271,14 @@
- Something doesn't work with FOP but works with another formatter
- (AntennaHouse, PassiveTex). Check whether this is already mentioned
- in the release notes, the FOP limitations document or the FAQ. Post
- to fop-dev or open a bug on bugzilla.
+ In the case where something works properly with another formatter,
+ (AntennaHouse, PassiveTex, etc.) but doesn't work with FOP, please
+ check the Release Notes, the
+ FOP Standards Compliance document,
+ and the remaining FAQ in this document. If not found there, look at the
+ list of Bugs Already Reported.
+ If not found there, please post a question on the fop-user mailing list
+ or Open a New Bug.
@@ -351,10 +343,9 @@
get you started. Pointers to introductions into xsl:fo can be found in the
resources section. Please be aware, that
FOP is at the moment not a full implementation of the basic conformance level
- of the xsl:fo standard. You can find a list of supported flow objects and properties
- in the section Features and in section
- Limitations in what way this support is
- limited.
+ of the xsl:fo standard. The FOP Compliance
+ page lists all objects and properties in the standard, and indicates
+ FOP's current compliance with those features.
FOP is part of Apache's XML project. The homepage of FOP is
http://xml.apache.org/fop.
@@ -367,7 +358,7 @@
-
+
Formatting
@@ -391,7 +382,7 @@
-
+
FOP Objectives
The goals of the Apache XML FOP Project are to deliver an XSL FO->PDF formatter that is compliant to at least the Basic
1.6 +175 -123 xml-site/targets/fop/index.pdf
<>
1.32 +0 -8 xml-site/targets/fop/involved.html
Index: involved.html
===================================================================
RCS file: /home/cvs/xml-site/targets/fop/involved.html,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- involved.html 11 Mar 2003 15:34:37 -0000 1.31
+++ involved.html 31 Mar 2003 23:24:33 -0000 1.32
@@ -192,14 +192,6 @@
@@ -440,8 +432,9 @@
guaranteed to be available in all PDF viewer applications."
+
Note that FOP does not currently support "tagged pdf".
-
+
PCL
@@ -456,7 +449,7 @@
This should allow any device fully supporting PCL 5 to be able to
print the output generated by the PCLRenderer.
-
+
Limitations
@@ -483,7 +476,7 @@
-
+
Additional Features
There are some special features that are controlled by some public variables on the PCLRenderer class.
@@ -511,7 +504,7 @@
-
+
PostScript
@@ -521,7 +514,7 @@
renderer generates PostScript Level 3 with most DSC comments. Actually,
the only Level 3 feature used is FlateDecode, everthing else is Level 2.
-
+
Limitations
@@ -541,7 +534,7 @@
-
+
RTF
@@ -551,7 +544,7 @@
possible.
-
+
SVG
@@ -565,7 +558,7 @@
different, such as another platform, then the page will appear wrong.
-
+
XML
@@ -574,7 +567,7 @@
not perform any other purpose.
-
+
Print
@@ -582,7 +575,7 @@
This is done with the same code that renders to the AWT renderer.
-
+
AWT
@@ -592,7 +585,7 @@
available to your JRE.
-
+
MIF
@@ -600,7 +593,7 @@
Adobe Framemaker. This is currently not fully implemented.
FOP uses the SVG library from Batik to handle SVG.
@@ -356,8 +342,10 @@
PDF markup which is placed into the current PDF document.
-
-
Converting SVG to a PDF Document
+
+
+
+
Converting SVG to a PDF Document
It is possible to convert a standalone SVG document directly into a simple page PDF document.
@@ -383,8 +371,10 @@
how transcoders work.
-
-
Important Notes
+
+
+
+
Placing SVG Graphics into PDF
The svg is inserted into PDF by using PDF commands to draw and fill
@@ -396,11 +386,26 @@
PDF. Parts of the graphic such as effects, patterns and images are inserted
into the PDF as a raster graphic. The resolution of this graphic may not
be ideal depending on the FOP dpi (72dpi) and the scaling for that graphic.
-This needs to be improved.
+This needs to be improved.
+
+Currently transparency is not supported in PDF so many svg images that
+contain effects or graphics with transparent areas will not be displayed
+correctly.
+
+
+
+
Placing SVG Text into PDF
+
+
If possible, Batik will use normal PDF text when inserting text. It does
+this by checking if the text can be drawn normally and the font is
+supported. This example svg text.svg /
+text.pdf
+shows how various types and effects with text are handled.
+Note that tspan and outlined text are not yet implemented.
-Another important note is that text is converted and drawn as a
-set of shapes by batik. This means that a typical character will
+Otherwise, text is converted and drawn as a set of shapes by batik, using the stroking text painter.
+This means that a typical character will
have about 10 curves (each curve consists of at least 20 characters).
This can make the pdf files large and when the pdf is viewed the
viewer does not normally draw those fine curves very well (turning on
@@ -410,60 +415,68 @@
It is possible to make sure that all text is drawn into PDF using the
-PDF text commands by adding the following to the user config:
+PDF text commands (instead of the graphical shapes), by adding the following to the user config:
For information on using a configuration file in a servlet, see the FAQ on that topic.
+
Note that this configuration setting works only for the PDF renderer.
-The drawback from this is that all text will be confined to text that is
+The drawback to forcing text to be rendered as text is that it will be confined to text that is
possible for PDF fonts (including embedded fonts) and implemented with
this workaround. The fonts available are the standard pdf fonts and any
fonts that you have embedded using FOP. The font sizes will be rounded
to an integer value. In future this will be improved.
-
-Currently transparency is not supported in PDF so many svg images that
-contain effects or graphics with transparent areas will not be displayed
-correctly.
-
+
Note that because SVG text can be rendered as either text or a vector graphic, you may need to consider settings in your viewer for both.
+The Acrobat viewer has both "smooth line art" and "smooth text" settings that may need to be set for SVG images to be displayed nicely on your screen (see Edit / Preferences / Display).
+This setting will not affect the printing of your document, which should be OK in any case, but will only affect the quality of the screen display.
-
-
Classes
+
+
+
+
Known Problems
-
-These are the relevant classes, found in the package org.apache.fop.svg :
-
-PDFGraphics2D
+soft mask transparency is combined with white so that it looks better
+on pdf 1.3 viewers but this causes the soft mask to be slightly lighter
+or darker on pdf 1.4 viewers
+
-
-used for drawing onto a Graphics2D into an existing pdf document, used
-internally to draw the svg.
+
+there is some problem with a gradient inside a pattern causing a pdf
+error when viewed in acrobat 5
-PDFDocumentGraphics2D
+text is not always handled correctly, it may select the wrong font
+especially if characters have multiple fonts in the font list
+
-
-used to create a pdf document and inherits from PDFGraphics2D to do the
-rest of the drawing. Used by the transcoder to create a standalone pdf
-document from an svg. Can be used independantly the same as any Graphics2D.
+
+more pdf text handling could be implemented
+It could draw the string using the attributed character iterator
+to handle tspans and other simple changes of text.
-PDFTranscoder
+JPEG images are not inserted directly into the pdf document
+This area has not been implemented yet since the appropriate
+method in batik is static
+
-
-used by Batik to transcode an svg document into a standalone pdf, via
-PDFDocumentGraphics2D.
+
+Uniform transparency for images and other svg elements that are converted
+into a raster graphic are not drawn properly in PDF. The image is opaque.
Why are we using our own font metric parsing and registration system, instead of the AWT system provided as part of Java?
-
Answer 1: Many of our customers use FOP in a so-called "headless" server environment -- that is, the operating system is operating in character mode, with no concept of a graphical environment. We need some mechanism of allowing these environments to get font information.
+
Answer 1: Many of our customers use FOP in a so-called "headless" server environment -- that is, the operating system is operating in character mode, with no concept of a graphical environment. We need some mechanism of allowing these environments to get font information. Java 1.4 has a mechanism for dealing with headless environments, and this issue may be resolved when we require that as a minimum platform. However, there may be an issue then of how to get fonts registered at the operating system in these environments. That will probably at least require some documentation for users.
Answer 2: At some level, we don't yet fully trust AWT to handle fonts correctly. There are still unresolved discrepancies between the two systems.
+
+
Answer 3: In the AWT mechanism, there does not appear to be a way to find the physical font file associated with an AWT font, or to otherwise get access to its contents so that it can be embedded in FOP output.
+
+
Answer 4: The Java 1.4 javadocs state (in java.awt.Font): "All implementations of the Java 2 platform must support TrueType fonts; support for other font technologies is implementation dependent." We wish to provide a greater base of font technologies for our users.
@@ -293,7 +301,7 @@
-
+
Implementation
There are two main font functions needed within FOP:
@@ -310,10 +318,10 @@
If not, the Font logic should resolve the TypeFace and TypeFaceFamily if possible, create a Font object, and return it.
-These pages contain information that is relevant to the
-current development of FOP.
-
-
FOP is the world's first print formatter driven by XSL formatting
- objects and the world's first output independent formatter. It is a
- Java application that reads a formatting object tree and then
- renders the resulting pages to a specified output. Output formats
- currently supported are PDF, PCL, PS, SVG, XML (area tree representation),
- Print, AWT, MIF and TXT.
- The primary output target is PDF.
-
-
-
Note
-
-FOP - someone who is overly concerned with style, also conveniently
-can mean Formatting Object Processor.
-
-
-
-
-
The latest version of Fop is 0.20.4 and it supports the
- XSL-FO Version 1.0
- W3C Recommendation.
- You can download
- Fop including a precompiled version, the source code and many example files to
- get you started. Pointers to introductions into xsl:fo can be found in the
- resources section. Please be aware, that
- Fop is at the moment not a full implementation of the basic conformance level
- of the xsl:fo standard. You can find a list of supported flow objects and properties
- in the section Features and in section
- Limitations in what way this support is
- limited.
-
-
FOP is part of Apache's XML project. The homepage of FOP is
- http://xml.apache.org/fop.
- Here you can find information about using and developing with FOP.
-
-
Users can subscribe to fop-user@xml.apache.org by sending an email
- to fop-user-subscribe@xml.apache.org
- this is where user specific topics are discussed.
-
-
-
-
-
Formatting
-
-
-
-
-This image is a demonstration of a two page document. The xml data on the left
-is formatted into the two pages on the right. The document contains static areasthat appear on every page, an external graphic in this case an svg document.
-There is a footnote on the first page and a table that goes across both pages.
-
-
-The advantage of XSL is the ability to take an XML document and to format
-the information into a page layout. The XML document can be generated
-in any way, the most common would be to use XSLT. FOP takes the XML
-and formats the data into pages. The pages are then rendered to the
-requested output.
-
-
-This is a real document. The image was created by rendering the document
-to the svg renderer then putting the rendered pages into an svg document
-along with the xml.
-
-
-
-
-
FOP Objectives
-
-
-The goals of the Apache XML FOP Project are to deliver an XSL FO->PDF formatter that is compliant to at least the Basic
- conformance level described in the W3C Recommendation from 15 October 2001, and that complies with the 11 March 1999 Portable Document
- Format Specification (Version 1.3) from Adobe Systems.
-
-
Conformance to the XML 1.0 Recommendation, XSLT 1.0 Recommendation and the XML Namespaces Recommendation is
- understood. Other relevant documents, such as the XPath and XLink Working Drafts, are referenced as necessary. The FOP
- Project will attempt to use the latest version of evolving specifications.
-
-
To reach this aim currently the layout system is being redesigned to
-better handle the formatting of all different types of formatting objects.
-
-
+
These pages contain information that should be helpful for those developing FOP.
+
For basic and user information on FOP, please visit the FOP homepage.
+
It is important to understand that there are currently three lines of development on the FOP product:
+
+
+
The oldest is the one that releases are currently generated from, and is also called the "maintenance branch". Because of limitations in its design, the FOP committers decided to freeze new development on this branch, and are providing only bug fixes. This branch is tagged as "fop-0_20_2-maintain" in the CVS repository.
+
The main development line is the future of FOP. It was spawned from the "maintenance" branch, but had to quickly be "broken" so that the needed redesign could be dropped into place. It is currently not as mature as the "maintenance" branch, but has far greater long-term prospects. It is also known as the "root" or "trunk".
+
+
The "Alt Design" is exactly that: an alternative design approach. Because its efforts are largely complementary and parallel to the main development branch, and because it is expected to be merged at some point into the trunk, it is documented separately. The authors of this effort are currently in the process of merging their work into the trunk.
+
+
+
Please note that patches for enhancements to the maintenance branch will generally not be considered. Bug fixes are welcome there, but new developers are strongly encouraged to apply their efforts to the trunk development line.
+
Because there is a fair amount of common information between the maintenance and trunk development lines, we attempt to document them together, highlighting differences only where needed.
-FOP uses the SVG library from
-Batik to handle SVG.
-This format can be handled as an fo:instream-foreign-object
-or in a separate file referenced with fo:external-graphic.
-Either way the SVG document will be read in and converted into a
-DOM in Batik. This DOM will then be used by the renderer to
-create the graphical image.
-
-
-The AWT and Print renderers simply use batik to draw the SVG into a graphic.
-
-
-In the case of the PDF renderer there is a PDFGraphics2D class that Batik uses
-to render the image into. This class converts the drawing instructions into
-PDF markup which is placed into the current PDF document.
-
-It is possible to convert a standalone SVG document directly
-into a simple page PDF document.
-This is possible through the use of Batik's transcoder mechanism.
-
-java org.apache.batik.apps.rasterizer.Main -m application/pdf document.svg
-
-
-This will output the svg document as "document.pdf" containing
-a PDF rendering of the SVG file.
-
-
-It is also possible to specify the width and/or height
-of the PDF document on the command line with -w and -h or if
-you are using the transcoder api you can use the transcoding hints.
-
-
-Currently the SVG image is drawn at the SVG document size and
-simply scaled in PDF to the new size. So the result may not be
-the best possible. For example if you have any images or effects
-it will draw them at the original resolution of the svg document.
-When this is viewed in the pdf it will have an incorrect resolution
-for the size of the pdf.
-
-
-The size of the pdf file will also remain the same regardless of
-what size the page is.
-
-
-For more information see Batik
-for how transcoders work.
-
-
-
-
+
Examples
@@ -421,83 +356,7 @@
-
-
Important Notes
-
-
-The svg is inserted into PDF by using PDF commands to draw and fill
-lines and curves. This means that the graphical objects created with
-this remain as vector graphics.
-
-
-There are a number of SVG things that cannot be converted directly into
-PDF. Parts of the graphic such as effects and images are inserted
-into the PDF as a raster graphic. The resolution of this graphic may not
-be ideal depending on the FOP dpi (72dpi) and the scaling for that graphic.
-
-
-Another important note is that text may be converted and drawn as a
-set of shapes by batik.
-If possible it will use normal PDF text when inserting text. It does
-this by checking if the text can be drawn normally and the font is
-supported. This example svg text.svg /
-text.pdf
-shows how various types and effects with text are handled.
-
-
-If the text cannot be drawn normally then it uses shapes.
-This means that a typical character will have about 10 curves
-(each curve consists of at least 20 characters).
-This can make the pdf files large and when the pdf is viewed the
-viewer does not normally draw those fine curves very well (turning on
-Smooth Line Art in the Acrobat preferences will fix this).
-If the text is inserted into the PDF using the inbuilt text commands
-for PDF it will use a single character.
-
-
-
-
-
Known Problems
-
-
-
-
-soft mask transparency is combined with white so that it looks better
-on pdf 1.3 viewers but this causes the soft mask to be slightly lighter
-or darker on pdf 1.4 viewers
-
-
-
-there is some problem with a gradient inside a pattern causing a pdf
-error when viewed in acrobat 5
-
-
-
-text is not always handled correctly, it may select the wrong font
-especially if characters have multiple fonts in the font list
-
-
-
-more pdf text handling could be implemented
-It could draw the string using the attributed character iterator
-to handle tspans and other simple changes of text.
-
-
-
-JPEG images are not inserted directly into the pdf document
-This area has not been implemented yet since the appropriate
-method in batik is static
-
-
-
-Uniform transparency for images and other svg elements that are converted
-into a raster graphic are not drawn properly in PDF. The image is opaque.
-
This page documents items that may be helpful to other developers, especially to those who are new to FOP. Exhaustive treatment of these topics is better suited to other fora, but the information presented here is intended to deal with FOP-specific issues related to these tools, especially "gotchas", and to help developers get jump-started.
-
+
+
General Developer Information
+
+
See the Apache Contributors Tech Guide for useful information and links for Apache developers, including help with tools and procedures.
You will need a CVS client to be able to gain access to the FOP repository. For general CVS information, visit CVS Home. Nice GUI clients for Windows, Mac, and X(??) can be found at WinCVS.
Regardless of what platform you develop on, please be sure to submit patches that use Unix line endings. If you are using WinCVS, check code out this way by going to the Admin / Preferences menu item, clicking on the "Globals" tab, then select the "Checkout text files with the Unix LF (0xa)" option. You will also need to use an editor that supports opening and saving files using Unix line endings.
-
+
Step-by-step instructions for downloading FOP using WinCVS
@@ -327,7 +340,7 @@
-
+
Creating Patches
@@ -348,10 +361,11 @@
-
+
Integrated Development Environments (IDEs)
An IDE is not required, but will generally be found to be helpful, especially for serious debugging and refactoring.
Borland's JBuilder 7/8 does not support Ant builds unless you have the Enterprise Edition (which is quite expensive). This causes problems with any code that is generated by the Ant build. First, you must run the Ant build before you can use the IDE. Second, when you are editing in the IDE, you must be editing the generated files, which means that you must make any changes to the source files in another editor. This is less serious for development on the trunk, but in the maintenance branch, all source files were "generated".
Sun ONE Studio Four does support Ant, but seems to use a built-in version, and as of this writing chokes on the FOP build file, saying that it is not valid. There is awkward because there is no official DTD for Ant, and it may be merely an Ant version issue.
---------------------------------------------------------------------
To unsubscribe, e-mail: general-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: general-cvs-help@xml.apache.org