Jeremias Maerki [Sat, 27 Aug 2005 21:51:40 +0000 (21:51 +0000)]
Added negative reference-orientations to block-container4.
Now checking the CTMs, too
New block-container4a based on the test case submitted by Yannick Valot for Bugzilla #36391.
I had to disable block-container4a because the CTM for 180/-180 is really wrong. Comment about the defect added to the checks. There's no quick fix, but this is also low-priority for me.
Jeremias Maerki [Fri, 26 Aug 2005 21:01:06 +0000 (21:01 +0000)]
Bugfixes and code cleanup:
- processPathIterator method like in PSGraphics2D to reduce duplicate code.
- draw() and fill() coding styles synchronized (which fixes a bug reported by Lawrence Michel)
- Higher resolution for many (not all!) formatted doubles to address the problem reported by Martin Weindel in Bugzilla #35918.
Jeremias Maerki [Fri, 26 Aug 2005 12:25:43 +0000 (12:25 +0000)]
Bugzilla: #36356
Test case for Bug #36356, slightly simplified by using absolute lengths instead of percentages for the margins. Checks added, too.
Submitted by: Manuel Mall <mm.at.arcus.com.au>
Jeremias Maerki [Thu, 25 Aug 2005 14:26:28 +0000 (14:26 +0000)]
After chasing a phantom for hours, it looks like it's simply the big images being generated that eat over 90% of the memory and at some point cause an OutOfMemoryError. Releasing the bitmaps a little sooner now which helps a little. "-Xmx256m" is still a good idea for BatchDiffer.
Haven't found any memory leaks inside FOP, since I fixed the image cache.
Jeremias Maerki [Wed, 24 Aug 2005 20:53:55 +0000 (20:53 +0000)]
Improved text painting for PostScript (including letter-space and word-space)
Moved text-decoration painting to the common base class and reused the border line painting method for this purpose.
Jeremias Maerki [Wed, 24 Aug 2005 13:43:00 +0000 (13:43 +0000)]
Fixes unrecoverable exceptions causing BatchDiffer to fail.
Doing a clean separation of encoded and decoded data inside the image implementations. Helps fix a problem with the encoded CCITT TIFF being sent to the PS output even though this is not yet implemented.
Jeremias Maerki [Tue, 23 Aug 2005 15:16:49 +0000 (15:16 +0000)]
Started to implement a resource tracking facility in the PSGenerator. It tracks resources such as EPS files, procset etc. as PSResource instances.
Resource-DSC comments are now generated.
Procsets moved into the Prolog where they belong.
Font setup is no longer a resource as it is not interchangeable between rendering runs. It's now just setup code with FOP-specific comments surrounding it.
In the future, this may also make it possible to write a size-optimized PS file from which the resources are stripped while writing the file. These resources will then be installed directly on a printer or inserted into the Prolog by a post-processor.
Jeremias Maerki [Tue, 23 Aug 2005 14:33:38 +0000 (14:33 +0000)]
New "-foout" parameter which only saves the intermediate XSL-FO file when -xml and -xsl are used. Saves people from having to call a separate XSL transformer.
Jeremias Maerki [Tue, 23 Aug 2005 14:06:25 +0000 (14:06 +0000)]
Moved CLI to its own package. New main class is org.apache.fop.cli.Main.
InputHandler is not passed through the FOUserAgent anymore. IMO it doesn't belong there. Instead I defined an interface "Renderable" in the AWT preview that InputHandler implements. This is used exclusively for reloading the document inside the preview dialog.
Jeremias Maerki [Tue, 23 Aug 2005 07:51:16 +0000 (07:51 +0000)]
ForrestBot driver file using SCP for deployment of the FOP site to http://xmlgraphics.apache.org/fop/ after building the site with Forrest. Tested with Apache Forrest 0.7.
Build and deploy the FOP website using:
ant -f publish.xml
Jeremias Maerki [Mon, 22 Aug 2005 15:14:43 +0000 (15:14 +0000)]
Fix the DSC comment (Begin|EndDocument) for EPS files. It wasn't in the right place.
Added a FOP-specific comment around the whole EPS to delimit the EPS code.
Use the original URI if the EPS file has no name (which isn't parsed at the moment anyway).
Jeremias Maerki [Mon, 22 Aug 2005 14:48:42 +0000 (14:48 +0000)]
Remember the original URI in the FopImage instance.
Output the original URI in the comment when writing an image to PostScript. Useful for people who post-process their PostScript files.
Fixed the position of the image comment so it can be used to factor out duplicate images when combining multiple PostScript files.
Jeremias Maerki [Sun, 21 Aug 2005 16:44:00 +0000 (16:44 +0000)]
Bugzilla #36224:
This patch ports the 0.20.5 CCITTFaxDecode filter functionality and its support
of direct embedding on certain TIFF images to the trunk.
It also cleans up some of the image handling with respect to consistent closing
of the input stream to avoid dangling open files.
Submitted by: Manuel Mall <mm.at.arcus.com.au>
Changes to the patch:
Fixed a small problem with the NullFilter in the PDF library.
Used tiff_group4.tiff in external-graphic-tiff.xml.
Jeremias Maerki [Sun, 21 Aug 2005 13:36:53 +0000 (13:36 +0000)]
A big step towards a usable PostScript renderer.
Some code that can be used by both PS and PDF renderers factored out into a common base class (AbstractPathOrientedRenderer).
Coordinate system of PS renderer and PSGraphics2D changed to be based on points rather than millipoints to be the same as the PDFRenderer. This improves the chance to reuse code.
PSGenerator set to PostScript level 2 now, should later be configurable. There may still be some PS commands which should be changed from Level 2 to Level 1, just to be able to support Level 1 later should anyone ask for it.
Bitmap, EPS and SVG support should be mostly restored now.
PSState was extended to provide the same break-out mechanism for fixed b-cs. And it has better support for tracking the graphics state.
Added some FOP-specific comments to certain constructs for people who want to post-process the PS output.
BatchDiffer shows very few visual differences now on the layout engine test cases between PDF and PS.
Jeremias Maerki [Tue, 16 Aug 2005 08:07:35 +0000 (08:07 +0000)]
Fix centering table example not to use empty table-cells which is forbidden. Use column-number instead! Works for both FOP 0.20.5 and Trunk.
Added note about right-aligning tables.
Jeremias Maerki [Tue, 16 Aug 2005 07:35:42 +0000 (07:35 +0000)]
Add a method to clear all image caches for testing purposes. It shouldn't be necessary anymore to call such a method in a production environment or we have a problem with the image cache.
Testing SystemID resolution as well as StreamSource with an InputStream.
Jeremias Maerki [Tue, 16 Aug 2005 06:51:40 +0000 (06:51 +0000)]
Bugzilla #36082
Renamed FOUserAgent.getStream() to FOUserAgent.resolveURI() which now simply returns a Source instance which the ImageFactory uses to get at an InputStream somehow.
Submitted by: Manuel Mall <mm.at.arcus.com.au>
Jeremias Maerki [Mon, 15 Aug 2005 10:45:28 +0000 (10:45 +0000)]
JUnit Test cases to test URI resolution using custom URIResolvers. They are not yet integrated into the test suite as the second test fails and the first test needs some changes in the code (see TODO).
Jeremias Maerki [Mon, 15 Aug 2005 10:34:31 +0000 (10:34 +0000)]
Bugzilla #36082
1. Addresses the URI resolving issue as discussed in this bug by providing a
FOP implementation of the URIResolver interface as well as the capabilities to
set a URIResolver on the FOUserAgent object.
2. Modifies the BMPReader to extract the resolution information.
3. Fixes a possible array bounds exception in BMPImage which can happen for BMP
images with extra bytes at the end.
4. Provides some infrastructure in ImageFactory in preparation of external
configuration of multiple prioritised image providers per mime type.
5. Sets a proper base URL in SVGElement.
6. Provides test cases and test images for the different formats and
resolutions.
Submitted by: Manuel Mall <mm.at.arcus.com.au>
Patch slightly modified:
- EPS sample graphic exchanged with a very simple and more importantly much smaller one generated by Barcode4J.
- Enabled resolution checking for some of the format-specific testcases (especially after working around resolution detection for PNG)
Jeremias Maerki [Fri, 12 Aug 2005 09:50:01 +0000 (09:50 +0000)]
Merged branch https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/inlineblock back into Trunk.
Revisions: 227462 to HEAD (231261)
This adds support for block-level content inside fo:inline.
The full set of changes on the branch can be extracted by:
svn log http://svn.apache.org/repos/asf/xmlgraphics/fop/branches/inlineblock -r 227462:231261
Jeremias Maerki [Fri, 12 Aug 2005 08:40:00 +0000 (08:40 +0000)]
Fix regression that caused duplicate IDs when Reload was pressed in the AWT Viewer. The Fop instance should only be used for one single rendering run. The regression was caused by the introduction of a member variable for the FOTreeBuilder which is used to fetch the rendering results.
Jeremias Maerki [Fri, 12 Aug 2005 08:23:57 +0000 (08:23 +0000)]
Bugzilla #36146
Image scaling didn't work in the Java2D based renderers, as the putImage
function was referring to the wrong height/width.
Submitted by: Richard Wheeldon <richardw.at.geoquip-rnd.demon.co.uk>
Jeremias Maerki [Wed, 10 Aug 2005 19:21:39 +0000 (19:21 +0000)]
Removed Jakarta Commons Lang. It is not used. Don't know why I once thought Commons IO depends on Commons Lang. Shrug.
Upgrade for Apache Xerces-J from 2.2.1 to 2.7.1.
Upgrade for Apache Xalan-J from 2.4.1 to 2.7.0 (notice the new serializer.jar which was separated out from xalan.jar because xercesImpl.jar now needs this functionality because of the latest JAXP)
Upgrade for XML Commons Externals (xml-apis.jar). This is version 1.3.02 which is bundled with both Xerces-J 2.7.1 and Xalan-J 2.7.0)
Upgrade for Apache Batik to 1.6 ("all-jar" built using JDK 1.3.1_15 from the source distribution)
Upgrade for Apache Avalon Framework from 4.1.4 to 4.2.0.
Added a README.txt which documents all dependencies and should serve as primary for licensing information on FOP dependencies.
Adjusted fop.bat to the changed JAR names.
Jeremias Maerki [Wed, 10 Aug 2005 12:56:30 +0000 (12:56 +0000)]
AbstractFopImage subclass using ImageIO (JDK >= 1.4) to load images (works with GIF, too). Some of the code dealing with the BufferedImage could probably be extracted to a common subclass since it's mostly a copy from a different FopImage implementation.
Jeremias Maerki [Wed, 10 Aug 2005 12:56:24 +0000 (12:56 +0000)]
AbstractFopImage subclass using ImageIO (JDK >= 1.4) to load images (works with GIF, too). Some of the code dealing with the BufferedImage could probably be extracted to a common subclass since it's mostly a copy from a different FopImage implementation.
Jeremias Maerki [Wed, 10 Aug 2005 11:56:35 +0000 (11:56 +0000)]
Bugzilla #36112
Fix for Java2DRenderer to paint regions other than region-body. Area tree was not properly cloned.
Submitted by: Richard Wheeldon <richardw.at.geoquip-rnd.demon.co.uk>
Jeremias Maerki [Mon, 8 Aug 2005 06:06:04 +0000 (06:06 +0000)]
Committing a hack I've started earlier. The analyzer did not always recognize an SVG file as such, especially XML encoded in a two-byte charset. This will still need some attention.
Logging reenabled.