Jeremias Maerki [Mon, 15 May 2006 09:59:59 +0000 (09:59 +0000)]
Bugfix: tables nested in inline elements caused a NullPointerException.
Furthermore, keep-together handling was not appropriate when a table is nested in an inline (fixes a ClassCastException).
Finally, TableContentPosition did not indicate that it generates area which made them be ignored by the InlineLM.
Jeremias Maerki [Wed, 10 May 2006 13:45:46 +0000 (13:45 +0000)]
Important improvements for the Java2DRenderer:
Support for letter- and word-spacing which also enables justified text.
Fix for font metric access. Fractional metrics was off. charWidth() only returned integers.
Removed the obscure 1.4 factor (Thanks to Chris Dail for the hint!)
Dispose of Graphics2D instance if no longer used to free up resources.
Jeremias Maerki [Sun, 7 May 2006 13:43:35 +0000 (13:43 +0000)]
The default sRGB color profile provided by the Java class library is no longer embedded if it is encountered. This should reduce the PDF size considerably.
Jeremias Maerki [Sun, 7 May 2006 12:21:56 +0000 (12:21 +0000)]
Bugzilla #39443:
Bugfix: Sections with span="all" lead to overlapping text if spanning multiple pages.
Tables and list produced an illegal value for break class on normal breaks.
Jeremias Maerki [Thu, 4 May 2006 07:24:18 +0000 (07:24 +0000)]
fox:disable-clipping on the i-f-o or e-g can be used to perform more painting operations natively in the HP GL/2 space. Since HP GL/2 provides only limited clipping functionality (which is not supported, yet) and the PCLGraphics2D fails with an UnsupportedException if it encounters an unsupported painting operation, every SVG graphic ends up being painted as a bitmap. This setting can help avoid that. Of course, I have yet to implement the IW (InputWindow, used for rectangular clipping) command.
Jeremias Maerki [Wed, 3 May 2006 13:47:18 +0000 (13:47 +0000)]
Some refactoring in the XML handling area which results in more code reuse and less redundancy.
Support for i-f-o for the AFPRenderer including a Graphics2DAdapter so extensions like Barcode4J can paint barcodes more efficiently (i.e. not via SVG).
The SVGConverter class could now be removed except for the writeImage() method because the same functionality is now covered by the Graphics2DAdapter via renderDocument() in the renderer.
PCL and AFP now use practically the same extension painting code (both render to bitmap images).
Jeremias Maerki [Wed, 3 May 2006 07:21:02 +0000 (07:21 +0000)]
Bugzilla #38946:
First step for improved color handling. FOP's own ColorType was replaced with java.awt.Color throughout the codebase.
Submitted by: Max Berger <max.at.berger.name>
Jeremias Maerki [Tue, 2 May 2006 14:39:32 +0000 (14:39 +0000)]
Java2D Renderer:
Symbol and ZapfDingbats now work due to a little change in FontSetup.java
Made the class a subclass of AbstractPathOrientedRenderer. This enables to remove some redundant code.
Border painting on a Graphics2D is now available to other renderers.
PCL Renderer:
Improved Graphics2D implementation.
PCLGraphic2D throws an UnsupportedOperationException if it encounters a feature it cannot properly handle. The Graphics2DAdapter can then fall back to painting a graphic in-memory and then as a bitmap.
Added border painting.
PCLRenderer supports to modes "quality" and "speed". The user can configure the mode depending on his needs. In "speed" mode borders are painted as shaded rectangles only. In "quality" mode it uses border rendering of the Java2DRenderer.
Manuel Mall [Fri, 28 Apr 2006 11:58:33 +0000 (11:58 +0000)]
Some cleanup of the AFP Renderer code (tab char removal and a few other things). Changed AFP extension namespace to http://xmlgraphics.apache.org/fop/extensions/afp. Added another missing file.
Introduced "ignored namespaces" list on FopFactory. Attributes from ignored namespaces are not complained about. Not done for elements, yet.
Added support for foreign attributes (attributes in a non-FO namespace) on formatting objects, for example to specify additional (proprietary) hints for rendering i-f-o and e-g. First usage example is PCLRendererContext which the PCLGraphics2DAdapter uses to decide whether to paint natively using HP GL/2 or using a bitmap.
PCL Renderer revived: Basic framework constructed based on the old one. Still incomplete (no border painting, incomplete Graphics2D implementation, problems with reference orientation, no kerning etc.). The PCL Renderer implements PCL5 (monochrome) and HP GL/2. Work in progress!
Added UnitConv helper class which could also be useful elsewhere (Could be a candidate for Commons).
Manuel Mall [Thu, 27 Apr 2006 15:08:17 +0000 (15:08 +0000)]
AFP Renderer as per IP clearance (http://mail-archives.apache.org/mod_mbox/xmlgraphics-general/200604.mbox/%3c20060426085421.B456.DEV@jeremias-maerki.ch%3e) plus some further corrections and changes made by manuel@apache.org since
Bugzilla #39416:
Fixed classpath for the embedding example.
Removed all build.* scripts following Ant best practices.
Removed a deprecation warning in ExampleConcat.
Content in block-containers makes better use of shrink to fit content vertically into the available area. This can be used indirectly to justify content vertically in a block-container.
PageBreakingAlgorithm now writes to a different logger than its base class. Makes debugging easier.
Some minor logging improvements to improve clarity.
Bypass URI resolution for "data:" URLs (RFC 2397). If a large data URL is given to Apache XML Commons Resolver, it tries to construct a java.net.URL from it which takes forever and fails in the end when no protocol handler for "data" URLs is installed.
Bugfix: Fixed ClassCastException when retrieve-marker is used as a direct child if static-content in which case leading and trailing white space is not properly removed.
Note: This is probably more a hack than anything else, but it fixes the problem for now. If anyone has a better solution, please feel free to improve.
Bugzilla #39118:
Initial support for page-number-citation-last (XSL 1.1). Works without problems only for page-sequence so far.
Submitted by: Pierre-Henri Kraus <phkraus.at.skynet.be>
Modifications to the patch by jeremias during review:
- Tab character removed
- Some style fixes and javadoc enhancements
- Renamed some methods in AreaTreeHandler to some more speaking names
- Changed the ..._basic.xml testcase so it shows a remaining problem: Forward references are not properly resolved, yet.
Bugfix: The generation of the PDF "d" (setdash) command was assuming that only integer values can be used but that isn't the case. Dash patterns PDFGraphics2D would be wrong in the process.
Adding a test case that demonstrates a problem with forward references and page-number-citation. The reference's width is adjusted, but not the whole line. Some code in the area tree tries to adjust word- and letter-spacing but it does not seem to be working properly.
Bugfix: Fixed a division by zero problem in TTFReader popping up with arialuni.ttf.
Improved the detection of the capHeight and xHeight font metric values for TrueType fonts. Fonts that contain a version 3.0 PostScript table don't contain unicode glyph names. Without an xHeight value, super- and subscript does not work in FOP.
Bugzilla #39033:
Enancement: convert java.awt.GradientPaint to Batik's LinearGradientPaint to avoid rasterization when painting. This is useful when someone uses PDFGraphics2D outside FOP.
Submitted by: Michal Sevcenko <sevcenko.at.vc.cvut.cz>
List NBSP under adjustable spaces in CharUtilities.
Generate space elements in the area tree from spaces in fo:character.
Clearly mark test cases which test for NBSP.
Document failure to generate adjustable spaces from fo:character in a disabled test case.
Adjust checks to the fact the fo:character can now also generate spaces.
Enable block_white-space-collapse_2.xml again
Manuel Mall [Sat, 8 Apr 2006 07:17:59 +0000 (07:17 +0000)]
Fixed various white space (non)removal issues during line building. white-space-treatment is now supported properly especially for the "preserve" case.
Improved JUnit report creation.
Added support for OutputIntent objects in PDF. When PDF/A-1b is activated OutputIntents are created and the sRGB color space is used by default (hardcoded for the moment for lack of better color infrastructure in FOP).
The sRGB color profile from HP (covering sRGB IEC61966-2.1) is now embedded in fop.jar as a resource so the PDF library can embed it. The sRGB profile from the Sun JRE is much bigger. That's why it's not used.
The Gladiator TrueType font (glb12.ttf) has been copied over from Batik and is used to verify PDF/A-1b's conformance checks.
CMYK JPEG image added to test resources so PDF/A-1b color space checks can be performed.
With the color space checks, support for PDF/A-1b is complete to the degree that FOP supports the creation of elements described in ISO 19005-1, except for the case where an embedded XMP packet is used in the fo:declarations element. In this case the metadata is not synchronized with the values in the Info PDF object which could lead to validation errors when checking for PDF/A-1b conformance.
Adding dependency on XML Graphics Commons.
Switching to code in XML Graphics Commons for:
- PSGraphics2D
- Service discovery
- Codecs
Removed local classes that have been ported to Commons.
xmlgraphics-commons-snapshot.jar is a Trunk snapshot built with JDK 1.4.2 from today. It should work under JDK 1.3.1.
Jeremias Maerki [Thu, 30 Mar 2006 09:57:32 +0000 (09:57 +0000)]
Changed PDFText.escapeText() so it doesn't output 7bit ASCII texts in hex mode. This makes it easier to read the PDF in a text editor in most cases.
Fixed the property names for xmp:CreatorTool and xmp:CreateDate (case mistake on my side).
Changed XMP-generation to output the creation date including the time zone to keep Acrobat's preflight check for PDF/A-1b happy. Found that only after more than 3 hours of trial&error.
Jeremias Maerki [Mon, 27 Mar 2006 18:01:20 +0000 (18:01 +0000)]
Fixed addition of ElementMapping instances. Witnessed in the FO tree tests.
The ElementMapping list is not necessary since we now have the ElementMappingRegistry.
Jeremias Maerki [Mon, 27 Mar 2006 09:51:14 +0000 (09:51 +0000)]
Merged Temp_API_Finalization branch back into FOP Trunk:
Finalized API according to the plan in the Wiki: http://wiki.apache.org/xmlgraphics-fop/ApiDesign
In addition to that:
Deprecated the rest of the Fop constructors.
Refactored the FopServlet a bit to make it more versatile and still easy to understand. The FopPrintServlet is now a subclass of FopServlet.
Some further cleanup on the way.
Jeremias Maerki [Sat, 25 Mar 2006 14:36:45 +0000 (14:36 +0000)]
No stacktrace when encountering problems while building a base URL. It's not necessary and draws too much attention. Instead added the URL to the log message that causes the problem.
Don't validate Base URLs anymore in FOUserAgent because that produces errors (because an URL cannot be built) if a symbolic URI is used which is later resolved through a URIResolver.
Improved support for relative URLs for accessing font resources.
ServletContextURIResolver can now use a base URI that starts with "servlet-context:".
Jeremias Maerki [Fri, 24 Mar 2006 08:56:55 +0000 (08:56 +0000)]
Bugfix for ICC color profile parsing in JPEG images.
Ported detection code for CMYK JPEG images generated by Adobe Photoshop from maintenance branch. Adobe inverts CMYK images.
Reenabled ICC color profile embedding for PDF.
Jeremias Maerki [Thu, 23 Mar 2006 09:52:24 +0000 (09:52 +0000)]
The about attribute must have the "rdf" namespace prefix.
Adobe Acrobat uses an outdated namespace URI for the PDF/A identification, so do the same as Adobe Distiller: write the PDF/A identification twice, once with each namespace URI. Reason: Acrobat is probably the best tool to verify PDF/A conformance right now. jHove covers only part of ISO 19005-1.