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.
Jeremias Maerki [Thu, 23 Feb 2006 10:32:58 +0000 (10:32 +0000)]
Changed the way the URL stream is opened. Use URLConnection now.
Added an empty protected method that can be overridden to set parameters like HTTP Basic Authentication on the URLConnection.
Convenience method added for handling HTTP Basic Authentication.
Jeremias Maerki [Wed, 22 Feb 2006 16:35:14 +0000 (16:35 +0000)]
Added a convenience URIResolver that uses the ServletContext in a servlet to access resources packed into a web application.
The URIResolver listens to the "servlet-context:" protocol.
Integrated the new URIResolver into out two servlets at all levels (TransformerFactory, Transformer and FOP).
Jeremias Maerki [Wed, 22 Feb 2006 15:40:44 +0000 (15:40 +0000)]
More work on PDF/A-1:
ID entry is now generated in the trailer.
More conformance checks especially for fonts.
PDF/A Identification Schema for XMP added.
Almost finished. Only color space checking is left to do, I think.
Jeremias Maerki [Sun, 19 Feb 2006 10:22:38 +0000 (10:22 +0000)]
Reduced the use of categories and programming languages as requested on site-dev. This will likely be compensated with an additional extension schema to specify implemented specifications/standards.
Jeremias Maerki [Fri, 17 Feb 2006 16:18:04 +0000 (16:18 +0000)]
XMP metadata generation from the PDFInfo object now conforms to PDF/A-1 (6.7.3 in ISO 19005-1:2005(E)).
On PDFDocument, it is now possible to set the PDF-A mode which triggers conformance checks where necessary.
The first PDF/A-1b conformance checks are now in the code. When conformance problems are detected, the new PDFConformanceException (subclass of RuntimeException since this would be a programmer error) is thrown.
PDF Renderer got a setting (through rendering options and XML configuration) to set the PDF/A-1 mode. Default is "disabled".
Jeremias Maerki [Fri, 17 Feb 2006 13:20:40 +0000 (13:20 +0000)]
DOM2SAX code replaced. Copied and adapted from Xalan-J: http://svn.apache.org/repos/asf/xalan/java/trunk/src/org/apache/xalan/xsltc/trax/DOM2SAX.java
There were issues with well-formedness and namespace prefixes when an XMP fragment was serialized to XML. Now this works fine.
Jeremias Maerki [Fri, 17 Feb 2006 10:57:15 +0000 (10:57 +0000)]
Initial support for XMP metadata (PDF 1.4) under fo:declarations. Both xmpmeta and RDF elements can be used as root elements for XMP metadata.
Extracted DOM2SAX functionality from XMLXMLHandler into utility class since it is now reused elsewhere.
New DOMBuilderContentHandlerFactory is used to create ContentHandlers that build generic DOMs.
New DelegatingContentHandler is a convenience base class modelled after XMLFilterImpl but as passive SAX receiver. It is used by DOMBuilderContentHandlerFactory.
Refactored FOTreeBuilder. FO tree building is now in a special ContentHandler which can be replaced temporarily when handling foreign XML like SVG or XMP. Extension Elements wanting the set their own ContentHandlers (instead of using the standard FO tree building mechanism) return a non-null value in getContentHandlerFactory(). The old mechanism is still supported (MathML, Plan and Barcode4J still use that). However, SVG support is changed to use a ContentHandlerFactory.
Extension elements for xmpmeta and RDF elements making use of the new DOM build-up using ContentHandlerFactory.
XMP metadata is passed to the renderer as ExtensionAttachment to the document. Only PDFRenderer uses the XMP extension attachment at this time.
The PDFRenderer automatically builds XMP metadata based on the basic metadata information in the PDFInfo object if no explicit XMP metadata has been added to the XSL-FO document.
XMP metadata merging is not implemented because this would involve a more sophisticated XMP infrastructure. That also means that XMP metadata is not validated. It's passed into the PDF as is.
The PDF library now provides the PDFMetadata class to embed XMP metadata in PDFs version >=1.4. stream contents use a special filter list which is initially empty, so non-PDF-aware XMP readers can extract (and optionally modify) the XMP metadata.
Trivial update:
Change the wording of a few attributeWarnings -- properties aren't ignored (possible inheritance,
property value function calls...)
see: http://marc.theaimsgroup.com/?l=fop-dev&m=114001378911300&w=2
Added default empty String to the border shorthand. Avoids NPE mentioned in Bugzilla 38648. Still need to add a warning, since property now silently falls back to the default(s).
Jeremias Maerki [Fri, 10 Feb 2006 14:39:34 +0000 (14:39 +0000)]
Creation of Font instances centralized in FontInfo and added a cache for them. This removes duplicate code in a number of places, improves speed a little and saves memory.
Jeremias Maerki [Thu, 9 Feb 2006 13:48:48 +0000 (13:48 +0000)]
Reworked area building in AreaTreeParser to match the scheme that the FOTreeBuilder uses. Cuts away another 10-15% processing time. Too many String.equals() calls and a minor optimization in setTraits().
Jeremias Maerki [Thu, 9 Feb 2006 08:54:06 +0000 (08:54 +0000)]
Bugfix: padding-top and padding-bottom on list-items could lead to wrong page break decisions and thus to overlapping text.
Bugfix: break-before and break-after were ignored on list-items.
Jeremias Maerki [Wed, 8 Feb 2006 15:42:03 +0000 (15:42 +0000)]
Added missing values in area tree XML for PageViewport (simple-page-master-name and blank).
Performance improvement of about 10% for a simple document inside the AreaTreeParser (Hotspot: setTraits())
Changed the way that trait info lookup is done in Trait.java. Should be just a little faster now.
Unused traits disabled.
Commented unused methods.
Jeremias Maerki [Tue, 7 Feb 2006 14:18:38 +0000 (14:18 +0000)]
Non-SVG XML got loaded into a non-namespace-aware node which caused problems later when serializing the foreign XML to the intermediate format. Fixes a problem with serializing barcodes (Barcode4J) to the intermediate format.
Jeremias Maerki [Thu, 2 Feb 2006 16:20:22 +0000 (16:20 +0000)]
Bugzilla #38453:
Bugfix: Text-decoration was not promoted if no text-decoration attribute was specified on a nested element.
Nice side-effect: more efficient evaluation of text-decoration.
Simon Pepping [Sat, 28 Jan 2006 15:57:59 +0000 (15:57 +0000)]
An addition to FOP that can be used to render a hyphenation tree in
various ways, among which a complete tree representation. And
correction of a few typos in HyphenationTree.
Jeremias Maerki [Fri, 27 Jan 2006 15:34:10 +0000 (15:34 +0000)]
Added safe-guard against reuse to avoid problems with the renderers.
Removed reset() method. Compared to the many hundred object instances that get created by the FO tree and layout engine, the Fop and FOTreeBuilder instance are negligible. Better keep the API as simple as possible and create an environmental class in the long run.
Jeremias Maerki [Wed, 25 Jan 2006 21:16:26 +0000 (21:16 +0000)]
Bugzilla #37506:
Extracted a base class for both PFMReader and TTFReader to remove duplicate code.
Submitted by: Kev Jackson <kevin.jackson.at.it.fts-vn.com>
(Patch applied with changes: escape method removed, tabs removed, javadocs added)
Jeremias Maerki [Tue, 24 Jan 2006 20:02:30 +0000 (20:02 +0000)]
Following the model of Graphics2DAdapter, added a new interface ImageAdapter which can optionally be implemented by Renderers to support painting of RenderedImage or BufferedImage instances from inside XMLHandler implementations. First implementation by the PSRenderer. Barcode4J is going to be extended to use this interface so barcode support can easily be added to the AFP Renderer without having a Graphics2D implementation at first.