Jeremias Maerki [Fri, 21 Nov 2008 17:24:32 +0000 (17:24 +0000)]
Fixed possible ClassCastException that was caused by my earlier attempt to support SVG 1.2. Batik's SAXSVGDocumentFactory doesn't currently deal well with the case when namespaces are declared outside of its scope. Worked around that by doing the SVG version detection in FOP code. SVG12DOMImplementation is obtained by reflection in order to keep backwards compatilibility with earlier Batik versions that don't support SVG 1.2.
Jeremias Maerki [Fri, 21 Nov 2008 16:33:33 +0000 (16:33 +0000)]
Fix for unit test failure in transcoder tests (NullPointerException):
Have to pass the root PSGraphics2D to NativeTextHandler instead of the PSGenerator as this one hasn't been initialized in PSGraphics2D when the NativeTextHandler is built in AbstractPSTranscoder.
Jeremias Maerki [Fri, 21 Nov 2008 16:07:58 +0000 (16:07 +0000)]
Added support for SVG 1.2 inside fo:instream-foreign-object. The code just used the basic SVGDOMImplementation for SVG 1.1. Now it delegates the DOM building to Batik code instead of to a normal DOM builder.
Jeremias Maerki [Wed, 19 Nov 2008 20:13:48 +0000 (20:13 +0000)]
Added page master name to IFDocumentHandler.startPage() method.
Wired together the support for out-of-order rendering (only applicable to PDF) when the intermediate format is not used (in-memory rendering).
Fixed a logical bug in IFRenderer that caused some unneeded code. Glyph adjustments (kerning, letter/word space...) were not done right. All painters fixed/adjusted accordingly.
Started implementation of the PostScript painter: Supports only text and filled rectangles so far. Work in progress...
Jeremias Maerki [Wed, 19 Nov 2008 19:46:45 +0000 (19:46 +0000)]
Reduced warning on ascender+descender > EM box to DEBUG level, as this case is compensated for by additional code in guessVerticalMetricsFromGlyphBBox() and is therefore only confusing. I tested problematic fonts and they show an acceptable line layout. No semantics changed.
Bugzilla 46211:
Fixed some multi-threading issues in FontCache.java (+ some minor cleanup: simplification of conditionals)
Thanks to rogov.AT.devexperts.com for tracing and reporting the problem.
Jeremias Maerki [Tue, 4 Nov 2008 15:10:31 +0000 (15:10 +0000)]
Making conversion hints available to ImageHandler implementations, too.
(Re-)implemented Graphics2D support for PCL. It can be disabled by fox:conversion-mode="bitmap" if necessary.
Fixed a bug with non-uniform image scaling when encoding bitmap images.
Commented some code that did not reliably convert color images to grayscale. The (probably slower) fallback code is used instead.
Some performance improvements for text painting using bitmaps when <rendering>speed<rendering> is selected.
Removed the RenderingContext interface from RendererContext since it's not used.
Jeremias Maerki [Thu, 30 Oct 2008 08:49:44 +0000 (08:49 +0000)]
Re-Implemented "quality" rendering mode (painting borders and rules using bitmaps).
Added a new rendering mode "bitmap" (in addition to "speed" and "bitmap") that uses Java2DPainter for the whole page and paints a single bitmap (much like most PCL drivers operate). Quality: "speed" < "quality" < "bitmap", Performance: "speed" > "quality" > "bitmap" (at high page complexity "bitmap" might actually be better), File Size: "speed" < "quality" < "bitmap"
Increased bitmap encoding performance by up to 100% (by optimizing the Java code and by supporting the "zeroed row" PCL command)
Bugzilla 45113:
Added PDF /Launch action, which is used in case of references to URIs using the file:// protocol.
Thanks to Alexander Stamenov (astamenov.AT.gmail.com) for the input!
Jeremias Maerki [Fri, 24 Oct 2008 13:42:59 +0000 (13:42 +0000)]
Fixed a problem where the BPD or a block area could be wrong if there is a nested, absolutely positioned area (for example a block-container).
This was most probably introduced by rev 618992.
Adrian Cumiskey [Fri, 24 Oct 2008 13:20:51 +0000 (13:20 +0000)]
AFPFontReader a lot more robust now with less copy/pasted code but still far from ideal, the whole AFP FOCA parsing/handling still in need of a rewrite at some point.
CharacterSetOrientation width() renamed to getWidth() and now protects itself against a possible ArrayIndexOutOfBoundsException.
Jeremias Maerki [Thu, 23 Oct 2008 10:03:27 +0000 (10:03 +0000)]
Moved IFState instance variable into AbstractIFPainter as all implementations use it.
Refactored default image handling methods in AbstractIFPainter a bit to make them more universal.
Fixed a small mistake in Java2DImageHandlerRenderedImage.
Added configurator code for new PCL implementation.
Fixed smaller issues in PCLGenerator.
Added support for painting images (e-g and i-f-o) as bitmaps (depends on rev 707329 in XML Graphics Commons).
Added support for text with custom fonts to be painted as bitmaps.
Jeremias Maerki [Mon, 20 Oct 2008 13:20:26 +0000 (13:20 +0000)]
Fixed size of images when vector graphic images are painted using fox:conversion-mode="bitmap" (for PDF output).
Added support for fox:conversion-mode="bitmap" for PS output.
Avoid "unsupported target ImageFlavor" error after the fix in XML Graphics Commons (rev 706270).
Bugzilla #45971: improved the behaviour of the command line interface:
- display 'fop' instead of 'Fop' in help messages
- do not throw exception when running fop without argument or with -v or -h
- return more meaningful error codes
Patch submitted with some modifications by Tom Browder (tom_dot.browder.at_gmail.dot_com)
Split IFPainter into IFDocumentHandler and IFPainter. This makes the implementation classes smaller, better allows to isolate the painting parts and helps with formats that generate one object per page (SVG, PNG etc.).
Added ImageHandlerFactory to FopFactory.
Started TIFF output in order to develop the Java2DPainter that will be needed for certain tasks when generating PCL.
Tweaked the way XML is generated for IF and SVG output.
Bugzilla 40798: A conditional-page-master-reference with page-position="last" is also eligible for an only page (first as well as last)
Additionally: added support for page-position="only"
Re-enabled image loader testcases
Made sure SVG converters use SVG flavor (updated in commons)
Added new ImageLoaderTest which tests JPGs embedded in SVG
Bugzilla #45734:
Fix for PFMReader after bug #43089 (r567078) changed the behavior of PFMFile. Fixes baseline problems when Type 1 fonts are used in conjunction with XML font metric files.
Submitted by: J. Frantzius <jfrantzius.at.web.de>
Bugzilla #45616:
Fix for table handling in RTF output, so the output works with OpenOffice and AbiWord, too.
Submitted by: Pavel Kysilka <goldenfish.at.linuxsoft.cz>
Adrian Cumiskey [Tue, 9 Sep 2008 13:35:13 +0000 (13:35 +0000)]
This is a better fix which will cater for the case where the first character encountered is the EOF (-1) character. EOF test now only occurs when loop is exit so this should execute more efficiently.
Jeremias Maerki [Wed, 20 Aug 2008 20:47:34 +0000 (20:47 +0000)]
Added support for painting leaders (implemented as drawLine in IFPainter).
Removed unused "stroke" parameter in drawRect and renamed the method to fillRect.
Adrian Cumiskey [Wed, 20 Aug 2008 15:13:56 +0000 (15:13 +0000)]
* Updated xmlgraphics-commons-14svn.jar to reflect UnitConv additions.
* Removed UnitConv and its unit test case (now resides in commons).
* Updated all fop util package references fpr UnitConv to xmlgraphics commons util package.
Jeremias Maerki [Fri, 15 Aug 2008 15:31:55 +0000 (15:31 +0000)]
Had to introduce "clip-rect" to handle clipping on background images, leader etc. A full viewport is probably too heavy-weight here. This is to be considered temporary pending verification with SVG and PCL implementations.
Jeremias Maerki [Fri, 15 Aug 2008 14:19:51 +0000 (14:19 +0000)]
Made the IFRenderer smarter so it combines lines of text into a single text element where possible. Makes the final output files smaller.
Fixed problems with letter and word spacing.