aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/util
Commit message (Collapse)AuthorAgeFilesLines
* * Javadoc update: use {@inheritDoc} instead of @see where applicable, ↵Andreas L. Delmelle2007-07-181-1/+1
| | | | | | | | | | removal of some @author tags * Additional code cleanup: removal of unused imports (mainly in the fo.flow package) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@557337 13f79535-47bb-0310-9956-ffa450edef68
* Correction of premature javadoc commit in r557035Andreas L. Delmelle2007-07-1810-68/+68
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@557272 13f79535-47bb-0310-9956-ffa450edef68
* Fixed incomplete support for Unicode word joinersManuel Mall2007-07-181-1/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@557219 13f79535-47bb-0310-9956-ffa450edef68
* Undo changes of r556112Andreas L. Delmelle2007-07-1711-316/+68
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@557035 13f79535-47bb-0310-9956-ffa450edef68
* Addition of a general-purpose int-to-int map to replace Integer-to-Integer ↵Andreas L. Delmelle2007-07-131-0/+248
| | | | | | HashMaps + first usage in TTFFile git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@556112 13f79535-47bb-0310-9956-ffa450edef68
* Bugzilla #42278:Jeremias Maerki2007-06-294-0/+346
| | | | | | | | | | | | | Refactoring of color map cache and uri/fo resolution from FopFactory Submitted by: Adrian Cumiskey <fop-dev@cumiskey.com> Changes in addition to the patch by jeremias: - Moved the color map cache to the util package so it doesn't clutter the API (apps) package. - Factored out the data URL resolution into its own URIResolver class which can now be used separately. - Added a utility class for generating RFC2397 data URLs. - Added a unit test for data URL handling. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@551874 13f79535-47bb-0310-9956-ffa450edef68
* Bug #42476:Vincent Hennebert2007-05-291-0/+46
| | | | | | | | | | | - fix NPE in XMLReader when no handler is found for the image - prevent SVGReader from closing the input stream if the image actually isn't SVG - reduce log level in SVGReader and XMLReader to avoid "false positive" (read error reported whereas the image format actually isn't recognized). This may hide regular I/O errors to the end-user, but I assume this will be rare enough compared to the annoyance of such messages when third-party plugins are used. Patch submitted by Max Berger (max.at.berger.name) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@542447 13f79535-47bb-0310-9956-ffa450edef68
* Bugzilla #41831:Jeremias Maerki2007-05-281-0/+57
| | | | | | | | | | | | | | | | | | | | - Add support font auto-detection (easier font configuration) including a font cache to speed up the auto-detection process. - Refactoring of the configuration code: All Avalon configuration stuff is extracted into separate "Configurator" classes. - Refactoring of the FOURIResolver. Submitted by: Adrian Cumiskey <fop-dev.at.cumiskey.com> Changes to the patch by jeremias during the review: - Font cache simplified (Java object serialization instead of XML), functionality fixed and moved to the fonts.package. - Relocated default cache file location to user directory. - Fixed the font configuration for PDFDocumentGraphics2D/PDFTranscoder that got lost with the patch. - Fixed a problem with having a non-file URL as font base URL. - Simplified RendererContextInfo stuff to make it easier to understand. - Fixed handling of Type 1 fonts in auto-detection. - Reduced verbosity of font-related log output. - Updated Jakarta Commons IO to version 1.3.1 (the patch depends on it) - Various javadocs improvements git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@542237 13f79535-47bb-0310-9956-ffa450edef68
* Bugzilla #42109: Jeremias Maerki2007-05-211-5/+15
| | | | | | | Fixed the rendering of zero-width spaces for certain fonts by not generating them into the area tree. Submitted by: Paul Vinkenoog <paul.at.vinkenoog.nl> git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@540049 13f79535-47bb-0310-9956-ffa450edef68
* Bugzilla #40729:Jeremias Maerki2006-11-133-32/+418
| | | | | | | | | Support for the rgb-icc() function and for a proprietary cmyk() function (for device CMYK colors only through the PDF renderer so far). Submitted by: Peter Coppens <pc.subscriptions.at.gmail.com> Patch slightly modified to comply with our Java conventions, plus some minor editing. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@474225 13f79535-47bb-0310-9956-ffa450edef68
* Changed license headers and updated NOTICE file according to: ↵Jeremias Maerki2006-07-2816-212/+228
| | | | | | http://www.apache.org/legal/src-headers.html git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@426576 13f79535-47bb-0310-9956-ffa450edef68
* Don't do rounding here. The caller might now want that.Jeremias Maerki2006-05-311-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@410523 13f79535-47bb-0310-9956-ffa450edef68
* Extended PageViewport to carry foreign attributes.Jeremias Maerki2006-05-181-0/+24
| | | | | | | | | | | | | Foreign attributes from simple-page-master are transferred to the PageViewport. Added foreign attributes handling in AreaTreeParser. Fixed proper generation of foreign attributes in XMLRenderer. EvalCheck extended so it can use namespace prefix mappings in its context. Test case for foreign attributes. Paper source/tray support for PCL (pcl:paper-source="<tray-code>" on s-p-m) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@407541 13f79535-47bb-0310-9956-ffa450edef68
* The default sRGB color profile provided by the Java class library is no ↵Jeremias Maerki2006-05-071-0/+67
| | | | | | longer embedded if it is encountered. This should reduce the PDF size considerably. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@404759 13f79535-47bb-0310-9956-ffa450edef68
* Bugzilla #38946:Jeremias Maerki2006-05-031-0/+480
| | | | | | | 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> git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@399185 13f79535-47bb-0310-9956-ffa450edef68
* Introduced "ignored namespaces" list on FopFactory. Attributes from ignored ↵Jeremias Maerki2006-04-282-0/+231
| | | | | | | | | | | 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). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@397806 13f79535-47bb-0310-9956-ffa450edef68
* List NBSP under adjustable spaces in CharUtilities.Jeremias Maerki2006-04-101-1/+3
| | | | | | | | | | 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 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@392901 13f79535-47bb-0310-9956-ffa450edef68
* Adding dependency on XML Graphics Commons.Jeremias Maerki2006-04-0410-1031/+5
| | | | | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@391332 13f79535-47bb-0310-9956-ffa450edef68
* Merged Temp_API_Finalization branch back into FOP Trunk:Jeremias Maerki2006-03-271-12/+0
| | | | | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@389086 13f79535-47bb-0310-9956-ffa450edef68
* Added support for fixed-width spaces and kerning.Jeremias Maerki2006-03-161-18/+56
| | | | | | | | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@386327 13f79535-47bb-0310-9956-ffa450edef68
* DOM2SAX code replaced. Copied and adapted from Xalan-J: ↵Jeremias Maerki2006-02-171-70/+224
| | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@378503 13f79535-47bb-0310-9956-ffa450edef68
* Initial support for XMP metadata (PDF 1.4) under fo:declarations. Both ↵Jeremias Maerki2006-02-174-1/+609
| | | | | | | | | | | | | | | | 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. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@378482 13f79535-47bb-0310-9956-ffa450edef68
* New interface XMLizable (copied from Apache Excalibur) to mark classes that ↵Jeremias Maerki2006-01-193-0/+224
| | | | | | | | | | | can serialize themselves to XML (SAX stream). New interface ContentHandlerFactory (plus associated Factory with Service discovery) for sub-document parsing plug-ins. Used by the area tree but could be used independently. ExtensionAttachments are now part of the area tree and are written by XMLRenderer and parsed by AreaTreeParser. The PS Extensions are extended to support serialization to and deserialization from XML. Added a test case that tests the PS Extension WRT the handling in the area tree XML. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@370452 13f79535-47bb-0310-9956-ffa450edef68
* New feature: "Intermediate format" (IF). The IF is basically the XML dialect ↵Jeremias Maerki2006-01-171-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | written by the area tree renderer (XMLRenderer). A new parser for this format allows reparsing a serialized and possibly modified area tree and rendering it to the final target format. More details on the Wiki at http://wiki.apache.org/xmlgraphics-fop/AreaTreeIntermediateXml. No advanced features have been implemented, yet, only the basic functionality. The whole change should be fully backwards-compatible WRT the outer FOP API except maybe for FOTreeBuilder.addElementMapping(), and the area tree XML which got small changes. The area tree has been cleaned up. The serializability has been restored. The CachedRenderPagesModel works again and can, in certain situations, decrease the maximum amount of memory held at one point in time. Some adjustments were necessary in the area tree to help the work of the AreaTreeParser. The AreaTreeParser is new and is responsible for parsing area tree XML files and adding pages to a RenderPagesModel instance. It is SAX-based and should be pretty efficient. XMLUnit (http://xmlunit.sourceforge.net, BSD license) is a new dependency for the test code. It is used to verify the correctness of the intermediate format code. It doesn't have to be installed for the build to run through, though. ElementMapping got a new method getDOMImplementation() which provides the DOMImplementation used to handle a subdocument of a particular namespace. For example, SVG uses Batik's SVG DOM. The AreaTreeParser needs that to properly recreate foreign objects because it can't use the mechanism of the FO tree. The default implementation returns null. The ElementMapping instances are no longer maintained by the FOTreeBuilder, but by the newly created ElementMappingRegistry class. It is expected that the instance of this class is moved from the FOTreeBuilder and the AreaTreeParser's Handler class to the "environment class" once it is created to cut down on the startup time for each processed document. The XMLRenderer has been slightly modified to improve the serialization/deserialization qualities of the area tree XML format. The XMLRenderer can now mimic another renderer (see mimicRenderer(Renderer)) in order to use its font setup. That way it is made certain that the reparsed area tree will render to the final target format exactly as expected. Fixed a bug in the XMLHandlerRegistry which did not always return the right XMLHandler for every situation. Added a DefaultErrorListener to the util package. I've had problems with Xalan-J swallowing exceptions with its default ErrorListener, so I added a simple one for convenience and use in AreaTreeParser. Example code for working with the AreaTreeParser can be found in examples/embedding. Documentation will follow. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@369753 13f79535-47bb-0310-9956-ffa450edef68
* Updated from Jakarta Commons IO 1.0 to 1.1. CopyUtils.copy() becomes ↵Jeremias Maerki2005-11-143-5/+0
| | | | | | | | | IOUtils.copy() again. CopyUtils in 1.0 was not ideal design decision. Fixed most of the unappropriate System.err/System.out/Exception.printStackTrace(). Those that aren't fixed and are not legitimate calls (in main() methods etc.) are marked with a TODO item. Some Javadocs and style updates. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@344111 13f79535-47bb-0310-9956-ffa450edef68
* Moved the text-splitting logic from TextArea to TextLM, as suggested by ↵Luca Furini2005-10-271-0/+13
| | | | | | | | Manuel and Jeremias. Some simplification in TextLM#addAreas(). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@328882 13f79535-47bb-0310-9956-ffa450edef68
* Package documentation.Jeremias Maerki2005-10-271-0/+22
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@328824 13f79535-47bb-0310-9956-ffa450edef68
* Implemented embedding of Type 1 fonts. Jeremias Maerki2005-09-051-0/+92
| | | | | | | | | | font dict writing moved to new class PSFontUtils. PSGenerator.resolveURI() does the same as FOUserAgent.resolveURI() but thus avoids the dependency on FOUserAgent. Needed for font embedding. Treat fonts as resources now. Wrap font keying in FOP-specific comments for reliable finding. New class SubInputStream which reads a maximum number of bytes from an underlying InputStream and then behaves like it has reached EOF. Used for Type1 font embedding. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@278782 13f79535-47bb-0310-9956-ffa450edef68
* Two constants I'd like to reuse elsewhere.Jeremias Maerki2005-08-241-2/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@239924 13f79535-47bb-0310-9956-ffa450edef68
* Made Service a stand-alone class so it can be reused. Jeremias Maerki2005-07-251-0/+113
| | | | | | | | | | Made XMLHandler discoverable through the Service class. Moved XMLHandler collection into new XMLHandlerRegistry class. Adjusted the Renderers and XMLHandler to the above changes. This should make it easier to write certain FOP extensions. The changes were triggered by my work on the FOP extension for Barcode4J for the FOP Trunk. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@225143 13f79535-47bb-0310-9956-ffa450edef68
* Bugzilla patch 31162:Jeremias Maerki2004-09-111-0/+261
| | | | | | | | | | Better command-line logging without losing the possibility to fine-tune Commons Logging from outside. Submitted by: Finn Bock <bckfnn.at.apache.org> plus using the new CommandLineLogger for PFMReader and TTFReader, too. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197940 13f79535-47bb-0310-9956-ffa450edef68
* Applied Apache License Version 2.0 by following the instructions at ↵Jeremias Maerki2004-02-2710-470/+150
| | | | | | http://www.apache.org/dev/apply-license.html. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197384 13f79535-47bb-0310-9956-ffa450edef68
* Remove unused imports to quieten Eclipse.Peter Bernard West2004-01-031-2/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197099 13f79535-47bb-0310-9956-ffa450edef68
* Not needed anymore. Everything we need is in Commons IO.Jeremias Maerki2003-11-071-243/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196992 13f79535-47bb-0310-9956-ffa450edef68
* Layout changed to account for fo:region-body borders and padding whenGlen Mazza2003-11-011-4/+4
| | | | | | | | | determining printable width and height for each page. Various method nitpicks also fixed. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196974 13f79535-47bb-0310-9956-ffa450edef68
* move static methods getCharWidth and getWordWidth from util.CharUtilities to ↵William Victor Mote2003-10-101-94/+0
| | | | | | instance methods in fonts.Font git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196954 13f79535-47bb-0310-9956-ffa450edef68
* port layout/FontState.getWordWidth from maintenance branchWilliam Victor Mote2003-10-071-12/+28
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196947 13f79535-47bb-0310-9956-ffa450edef68
* move layout.FontState to fonts.FontWilliam Victor Mote2003-08-141-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196800 13f79535-47bb-0310-9956-ffa450edef68
* clean up gump javadoc warningsWilliam Victor Mote2003-07-064-55/+55
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196628 13f79535-47bb-0310-9956-ffa450edef68
* Move here from org.apache.fop.render.psJeremias Maerki2003-07-047-0/+1050
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196599 13f79535-47bb-0310-9956-ffa450edef68
* Some touch-up for styleJeremias Maerki2003-07-041-12/+18
| | | | git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196595 13f79535-47bb-0310-9956-ffa450edef68
* Special OutputStream decorator that suppresses calls to the close() method. ↵Jeremias Maerki2003-03-271-0/+81
| | | | | | This is my new approach for handling filters. Before I used the Finalizable interface (see PS renderer). But that didn't work out for the PDF library. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196148 13f79535-47bb-0310-9956-ffa450edef68
* ColorSpace descendant representing an uncalibrated CMYK color space. Used to ↵Jeremias Maerki2003-03-151-0/+109
| | | | | | fix CMYK JPEG support. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196097 13f79535-47bb-0310-9956-ffa450edef68
* Moved sources from src/org/** to src/java/org/**Jeremias Maerki2003-03-112-0/+475
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196061 13f79535-47bb-0310-9956-ffa450edef68