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.
Jeremias Maerki [Tue, 21 Mar 2006 10:24:45 +0000 (10:24 +0000)]
Made the loading of user-specified hyphenation patterns usable again and plugged it into URI resolution.
Backwards-compatibility should be maintained.
PatternParser now uses JAXP to get the SAX parser.
Moved the hyphenation pattern cache into a separate class so I can easily plug it into FopFactory later instead of having static variables.
Added serialVersionUID to HyphenationTree. Necessary because the class signature changed.
FOURIResolver does not complain about "file not found" on the log anymore since this should be done by the caller. Until now, this resulted in two log messages about the same problem on the log. "File not found" is still reported but only on level "debug" which might be helpful when tracking down a problem, but at least it's not a "WARNING" anymore.
Jeremias Maerki [Tue, 21 Mar 2006 08:17:39 +0000 (08:17 +0000)]
block-container did not tell the breaker if it's in auto-height mode. That causes false alarms for block-containers which are not constrained in b-p-d.
Jeremias Maerki [Mon, 20 Mar 2006 13:49:05 +0000 (13:49 +0000)]
Certain filter combinations in PDF could lead to invalid PDFs. DecodeParams were not properly handled.
Default filter for XMP metadata set to NullFilter as XMP metadata should always be embedded as clear-text so non-PDF-aware XMP processors can extract the metadata.
Default filter for DCT/JPEG- and CCITT/TIFF-encoded images set to NullFilter because these two compression methods already do a good job. An additional flate filter (as was applied before due to the single default) helps a just little but also adds processing time. If anyone wants to squeeze every possible bit out of the PDF you can use the following in the user configuration:
<filterList type="tiff">
<value>flate</value>
</filterList>
<filterList type="jpeg">
<value>flate</value>
</filterList>
Jeremias Maerki [Mon, 20 Mar 2006 07:32:22 +0000 (07:32 +0000)]
Bugzilla #39030:
Output filenames with a space resulted in "%20" in the generated file. Looks like a bug in Xalan-J.
We now open the OutputStream ourselves. The two practically identical write methods pulled up into the abstract base class.
Jeremias Maerki [Sun, 19 Mar 2006 11:12:44 +0000 (11:12 +0000)]
Bugzilla #38731:
More accurate font size selection.
Outer transformation matrix is no longer ignored when painting text.
Improvement for transparent bitmaps (effect can be seen on filters-composite-01-b and render-groups-03-t in SVG 1.1 test suite)
Submitted by: Michal Sevcenko <sevcenko.at.vc.cvut.cz>
Jeremias Maerki [Sat, 18 Mar 2006 20:30:47 +0000 (20:30 +0000)]
Avoid exception when ImageIO is used as image adapter for TIFF images. The stream is already closed and the bitmap loaded when FopPDFImages wants to write the image to the PDF.
Jeremias Maerki [Sat, 18 Mar 2006 20:28:33 +0000 (20:28 +0000)]
Bugfix: CCITT Group 4 encoded TIFF images were not properly embedded in PDF files. FopPDFImage always used the bits/pixel and color space of the original image although our image adapter mostly convert all images to 24bit RGB. One day, we will need to improve the image handling.
Jeremias Maerki [Thu, 16 Mar 2006 13:51:14 +0000 (13:51 +0000)]
Added support for fixed-width spaces and kerning.
Note: letter-spacing is still implemented as before. Fixing this cannot be done without looking at space resolution as a whole on inline level.
The Character area tree object is now deprecated. Normal Text objects should be used to keep renderers simpler.
Introduced FontResolver interface to remove the dependency of FOUserAgent into the font package.
Added kerning information to the base14 fonts, Helvetica and Times. By default it is not used to keep the status-quo. Enable base14 kerning through the FOUserAgent (FopFactory after the API finalization).
Restored the production of EPS images in PDF output as PostScript XObjects.
Restored functionality for a more compact format for the area tree renderer to save space.
LayoutEngineTester slightly changed to allow for configuration values from the XML file. For now, only enabling base14 kerning is supported.
Removed duplicate offset variable in SpaceArea.
Jeremias Maerki [Mon, 6 Mar 2006 07:59:52 +0000 (07:59 +0000)]
Removed duplicate entry in Renderer list.
Register FOEventHandlers using Service discovery, too.
Removed superfluous discovery and registration methods.
Renamed META-INF file to match the pattern established in the sandbox.
Add dynamic lookup of the RendererMakers to RendererFactory (as suggested by Nils Meier; proposed patch slightly altered to make use of org.apache.fop.util.Service instead of sun.misc.Service)
Jeremias Maerki [Thu, 2 Mar 2006 08:19:29 +0000 (08:19 +0000)]
Disabled the resolution setting because it can lead to ugly side-effects. Resolution is poort now (72dpi) but at least the SVG gets rendered correctly.
Jeremias Maerki [Wed, 1 Mar 2006 17:26:21 +0000 (17:26 +0000)]
Bugfix: Fixed a problem with certain TrueType fonts which are missing the "PCLT" table, where a baseline-shift="sub" had no effect due to a missing x-height value.
(Note: This only affects TTFReader, so the font metric file has to be regenerated.)
Activated refinement white-space-handling for fo:title and fo:bookmark-title
(treating fo:title the same as fo:bookmark-title
-- see XSL-FO 1.1 6.11.3 -> Trait derivation)
Jeremias Maerki [Mon, 27 Feb 2006 08:47:52 +0000 (08:47 +0000)]
Ignore attributes from foreign namespaces. This is a temporary fix to get rid of ugly warnings until a proper mechanism for handling foreign attributes is available.
Submitted by: Nils Meier <nmeier.at.users.sourceforge.net>
Jeremias Maerki [Sun, 26 Feb 2006 11:35:52 +0000 (11:35 +0000)]
Added support for page sequence title in AreaTreeParser (IF). Fixes problems in intermediate format test suite.
Introduced a PageSequence area tree object to achieve the proper sequence of Renderer.startPageSequence() calls and Renderer.renderPage() calls. Otherwise, the pageSequence elements are not properly placed in the intermediate format. Doesn't really affect the other renderers because they don't really care.