Browse Source

Merged revisions 611142,611175,611278,611285,611766-611768,612560,612785,612815-612816,612825,613144,613185,613828,613831,613835,613896,614156,614169-614170,614191,614201-614202,614566,614845,614920,614924,614964,614966,614993,615144,615164,615197,615251,615598,615604,615845,615906,615917,616080,616191,616260,616334,616485,616691,616694,616798,617126,617473,617512,617531,617550,617708,617716,617765,617812,617907,617909,617976,617989,618239,618470,618626-618627,618992,619417,619461,619670,619674,619790,619854,619856,619870,619923,619979,620272,620276-620278,620283,620285,620558-620559,620565,620567,620570,620723,620750,620761,627318,627324,627367,627495,627497,627553,627576,627679,627698,627702,627712,627719,627721,628140,628280,628652,628668,628775,628804,628816,628826,628829,629048,629093,629103,629129,629131,629169,629769,629902,630215,630772,630814,631178,631226,631276,631575,631609,631984,632121-632122,632321,632558,632716,632784,632938,632972,633389-633391,633396-633397,633437,633460,633470,633473,633525,633557,633559,633561,633961,634187,635508,635686,635701,635741,635884,635961,635967,636276,636293,636295,636405,636409,636471,637057,637076,638396,640089,640242,641742,641764,641827 via svnmerge from

https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk

................
  r611142 | jeremias | 2008-01-11 11:13:42 +0000 (Fri, 11 Jan 2008) | 3 lines
  
  Initialized merge tracking via "svnmerge" with revisions "1-594557" from 
  https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ImagePackageRedesign
................
  r611175 | jeremias | 2008-01-11 13:41:54 +0000 (Fri, 11 Jan 2008) | 4 lines
  
  Removed merge tracking for "svnmerge" for 
  https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ImagePackageRedesign
  
  (I'm not happy with the result)
................
  r611278 | jeremias | 2008-01-11 19:50:53 +0000 (Fri, 11 Jan 2008) | 925 lines
  
  Merged branch https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ImagePackageRedesign (revs 594558 to 611138) into Trunk:
  A new image loading framework has been introduced to fix various problems with external graphics and improve performance.
  
  Switched to Batik 1.7.
  Added xml-apis-ext.jar as needed by Batik 1.7.
  Updated to latest XML Graphics Commons snapshot.
  
  Changelog of branch:
  ------------------------------------------------------------------------
  r594558 | jeremias | 2007-11-13 16:04:56 +0100 (Di, 13 Nov 2007) | 1 line
  
  Branch for image package redesign
  ------------------------------------------------------------------------
  r594560 | jeremias | 2007-11-13 16:10:35 +0100 (Di, 13 Nov 2007) | 1 line
  
  Implementation of Dijkstra's algorithm for finding the shortest path. Used in the new image package to find the best combination of image loaders and image converters to provide an image in the optimal form for a renderer.
  ------------------------------------------------------------------------
  r594848 | jeremias | 2007-11-14 13:12:50 +0100 (Mi, 14 Nov 2007) | 3 lines
  
  Initial upload of what I have already for the image package redesign.
  For now, it's in a parallel package (image2). The final package name is TBD.
  The code isn't hooked into the renderers, yet, and there's no image cache. This is still all work in progress.
  ------------------------------------------------------------------------
  r594851 | jeremias | 2007-11-14 13:20:12 +0100 (Mi, 14 Nov 2007) | 1 line
  
  Test cases and additional test files for the new image package.
  ------------------------------------------------------------------------
  r595305 | jeremias | 2007-11-15 15:01:37 +0100 (Do, 15 Nov 2007) | 1 line
  
  Small mistake while reimplementing JPEG.
  ------------------------------------------------------------------------
  r595308 | jeremias | 2007-11-15 15:13:36 +0100 (Do, 15 Nov 2007) | 5 lines
  
  Introduced a usage penalty for ImageLoaders so we can calculate an overall penalty for a pipeline.
  Multiple image flavors can be passed to ImageManager.getImage() if the caller supports multiple formats. The image package chooses the best pipeline.
  Implemented a converter from RenderedImage to PNG.
  Implemented loaders for raw formats (EMF, JPEG and PNG).
  Hooked the new image package into the RTF handler as first real proof-of-concept.
  ------------------------------------------------------------------------
  r596240 | jeremias | 2007-11-19 11:02:13 +0100 (Mo, 19 Nov 2007) | 1 line
  
  Fixed bug in pipeline selection.
  ------------------------------------------------------------------------
  r596242 | jeremias | 2007-11-19 11:03:06 +0100 (Mo, 19 Nov 2007) | 1 line
  
  MIME type in parentheses behind the URI makes more sense.
  ------------------------------------------------------------------------
  r599430 | jeremias | 2007-11-29 14:08:01 +0100 (Do, 29 Nov 2007) | 1 line
  
  Support for baseline information (needed by at least MathML).
  ------------------------------------------------------------------------
  r599433 | jeremias | 2007-11-29 14:09:04 +0100 (Do, 29 Nov 2007) | 1 line
  
  Bugfix: BMP don't all have resolution information.
  ------------------------------------------------------------------------
  r599434 | jeremias | 2007-11-29 14:10:54 +0100 (Do, 29 Nov 2007) | 1 line
  
  Change MIME type
  ------------------------------------------------------------------------
  r599436 | jeremias | 2007-11-29 14:17:14 +0100 (Do, 29 Nov 2007) | 3 lines
  
  Started integrating into Java2D and PostScript renderers and ExternalGraphic.
  Added support for EPS graphics.
  Added support for raw embedding of JPEG images (for PostScript).
  ------------------------------------------------------------------------
  r600821 | jeremias | 2007-12-04 08:51:06 +0100 (Di, 04 Dez 2007) | 5 lines
  
  Clean up
  Javadocs
  Generally make more useful.
  Reuse FOProcessor instance for the whole run to actually feel the effect of an image cache attached to the FopFactory.
  Add option to prompt the user before actually starting (in order to connect a VM monitor).
  ------------------------------------------------------------------------
  r600870 | jeremias | 2007-12-04 11:27:51 +0100 (Di, 04 Dez 2007) | 14 lines
  
  Note: The API of the new image package has changed a bit. (it became necessary when I introduced caching)
  
  The direct dependency on FOUserAgent has been removed to make the image package more universally usable. Instead an ImageContext (provided by FopFactory in FOP) and ImageSessionContext (provided by FOUserAgent in FOP) was introduced.
  Introduced image caching with soft references (I didn't reintroduce the FOUserAgent lock, yet, because it doesn't help much)
  ImageInfo doesn't carry the Source for the image anymore. The Source is provided by the new ImageSessionContext.java and only shared within the same thread to make things simpler and to avoid complex synchronization and cleanup.
  Image instances now indicate whether they are cacheable (not all Image instances are cacheable, for example when they just carry an InputStream).
  Moved the converter pipeline functionality into its own subpackage to keep "spi" clean.
  Added checks in ImageSize to detect incomplete Preloaders.
  ImageSource can now indicate whether its a fast source (loading from local file) or a slow source (loading over the network). (but this isn't used, yet)
  Fixed a bug in WMF and SVG preloaders: they didn't close their Sources after fully loading the images.
  Bugfix in ImageRawJPEG: it illegally reported being an EPS file
  ImageRawStream got an "InputStreamFactory" so it is possible to reuse raw images if they have been loaded into memory (or to a local file which hasn't been implemented, yet).
  The pipeline code now converts single-use raw images to reusable raw images when possible. But there's nothing built in to restrict the image size to a maximum, yet.
  Improved JPEG preloader so it can stop early an deal with images that have to APP0 segment. Images from digicams are such an example. They carry the resolution info in the EXIF block which is currently not interpreted. Fallback is to the configured source resolution.
  ------------------------------------------------------------------------
  r600930 | jeremias | 2007-12-04 14:25:43 +0100 (Di, 04 Dez 2007) | 1 line
  
  Package HTML Files.
  ------------------------------------------------------------------------
  r600934 | jeremias | 2007-12-04 14:34:41 +0100 (Di, 04 Dez 2007) | 1 line
  
  Javadoc fixes
  ------------------------------------------------------------------------
  r602023 | jeremias | 2007-12-07 09:46:56 +0100 (Fr, 07 Dez 2007) | 2 lines
  
  Bugfix for bug in SVG preloader which didn't calculate the size of an SVG correctly when there's no explicit size.
  
  ------------------------------------------------------------------------
  r602024 | jeremias | 2007-12-07 09:49:49 +0100 (Fr, 07 Dez 2007) | 1 line
  
  Some small javadoc and logging improvements/refinements.
  ------------------------------------------------------------------------
  r602025 | jeremias | 2007-12-07 09:50:22 +0100 (Fr, 07 Dez 2007) | 1 line
  
  Enable assert keyword for javadoc production.
  ------------------------------------------------------------------------
  r602032 | jeremias | 2007-12-07 09:59:10 +0100 (Fr, 07 Dez 2007) | 11 lines
  
  Added color space information and an optional ICC color profile to the basic Image interface.
  Reimplemented transparency support (for now only for ImageIO loader and PDF output)
  ImageIO preloader passes the already loaded metadata to the ImageIO loader through the "custom objects" so it doesn't have to load them again.
  PDF library: Corrected the naming of the method indicating the "bits per component" (bits per component != bits per pixel)
  PDF library: Added a method which lets a user override values in an XObject's dictionary after the major values have been set (useful not to make the PDFImage interface more complicated).
  PDF library: Support for gray transparent colors.
  PDF library: Added a convenience class for alpha channel bitmaps (AlphaRasterImage)
  
  Integration of the new image package into the PDFRenderer (currently supports all previous embedding methods except deprecated EPS embedding and CCITT embedding, now supports even more transparency options than before)
  
  
  ------------------------------------------------------------------------
  r602033 | jeremias | 2007-12-07 09:59:57 +0100 (Fr, 07 Dez 2007) | 1 line
  
  Small optimization from my failed experiments to support native PNG embedding.
  ------------------------------------------------------------------------
  r602034 | jeremias | 2007-12-07 10:01:34 +0100 (Fr, 07 Dez 2007) | 1 line
  
  Don't use "content" filter for ICC profiles. Instead compress using "default". "content" is for page content.
  ------------------------------------------------------------------------
  r602036 | jeremias | 2007-12-07 10:02:25 +0100 (Fr, 07 Dez 2007) | 1 line
  
  Added general key for precompressed content of any kind.
  ------------------------------------------------------------------------
  r602037 | jeremias | 2007-12-07 10:03:39 +0100 (Fr, 07 Dez 2007) | 1 line
  
  Various variants of the FOP logo for testing. Some of them have transparency info.
  ------------------------------------------------------------------------
  r602228 | jeremias | 2007-12-07 22:30:17 +0100 (Fr, 07 Dez 2007) | 4 lines
  
  Discarded PreloaderPNG in favor of PreloaderImageIO which now supports all formats supported by ImageIO (meaning that you can uses JPEG-2000 images if you have a suitable ImageIO codec installed).
  ImagePreloader.getMimeType() removed because it isn't really used in the new setup.
  ImagePreloader.getPriority() introduced which allows to prioritize preloaders and thus gives the opportunity to tweak the order in which the preloaders are checked when an image is inspected.
  ImageLoaderImageIO can now use multiple Readers if one fails (one codec may not support all format variants, for example).
  ------------------------------------------------------------------------
  r602229 | jeremias | 2007-12-07 22:30:48 +0100 (Fr, 07 Dez 2007) | 1 line
  
  Added a toString() impl for debugging.
  ------------------------------------------------------------------------
  r602442 | jeremias | 2007-12-08 11:36:32 +0100 (Sa, 08 Dez 2007) | 6 lines
  
  Support handling images with no associated URI (from instream-foreign-object). These images are not cached.
  Add support for plain image conversion (i.e. with no loading) for instream-foreign-object.
  Add convenience writeTo() methods in ImageRawStream to save a few lines of code.
  
  Support for instream-foreign-object in RTF output.
  Teach RTF library to handle images without an associated URL.
  ------------------------------------------------------------------------
  r603191 | jeremias | 2007-12-11 11:03:32 +0100 (Di, 11 Dez 2007) | 2 lines
  
  Bugfix: Graphics2DAdapter didn't do the graphics state save correct so subsequent images may have been painted with the wrong transformation matrix.
  Bugfix: bitmap images didn't scale correctly when the resolutions were changed.
  ------------------------------------------------------------------------
  r603207 | jeremias | 2007-12-11 12:08:36 +0100 (Di, 11 Dez 2007) | 1 line
  
  Convenience method for obtaining the image size in points.
  ------------------------------------------------------------------------
  r603208 | jeremias | 2007-12-11 12:12:50 +0100 (Di, 11 Dez 2007) | 3 lines
  
  Precisely define the expectations for the area parameter in Graphics2DImagePainter.
  New ImageConverter: Bitmap -> Graphics2D
  
  ------------------------------------------------------------------------
  r603209 | jeremias | 2007-12-11 12:15:49 +0100 (Di, 11 Dez 2007) | 3 lines
  
  Refine pipeline building:
  Expose a method to allow the PS Renderer to predict what kind of pipeline will be selected (because it doesn't support all image types as PostScript forms)
  If there are multiple candidate pipelines for one conversion type, choose the one with the lowest penalty, not just the one that happens to be first.
  ------------------------------------------------------------------------
  r603250 | jeremias | 2007-12-11 15:17:32 +0100 (Di, 11 Dez 2007) | 1 line
  
  Removing failed experiment: raw PNG embedding didn't work out.
  ------------------------------------------------------------------------
  r603254 | jeremias | 2007-12-11 15:29:48 +0100 (Di, 11 Dez 2007) | 2 lines
  
  Plugged new image package into form generation for PostScript.
  XML images and EPS files are currently supported as forms. They are added inline.
  ------------------------------------------------------------------------
  r603256 | jeremias | 2007-12-11 15:34:52 +0100 (Di, 11 Dez 2007) | 1 line
  
  Embedding EPS in PDF is no longer implemented as it is a deprecated feature in PDF. Therefore, this test is not needed anymore. The PDF renderer will say: "Cannot load image (no suitable loader/converter combination available) for myfile.eps (application/postscript)"
  ------------------------------------------------------------------------
  r603266 | jeremias | 2007-12-11 16:16:22 +0100 (Di, 11 Dez 2007) | 1 line
  
  Size calculation for images can be slightly different after the redesign due to different rounding. Give a little tolerance.
  ------------------------------------------------------------------------
  r603271 | jeremias | 2007-12-11 16:24:08 +0100 (Di, 11 Dez 2007) | 1 line
  
  Bugfix: Only generate the FixedLength if there is baseline information.
  ------------------------------------------------------------------------
  r603358 | jeremias | 2007-12-11 22:13:22 +0100 (Di, 11 Dez 2007) | 1 line
  
  Switched background images to new image package.
  ------------------------------------------------------------------------
  r603632 | jeremias | 2007-12-12 15:52:09 +0100 (Mi, 12 Dez 2007) | 1 line
  
  Switch to new image package for PDF/SVG support.
  ------------------------------------------------------------------------
  r603642 | jeremias | 2007-12-12 16:30:16 +0100 (Mi, 12 Dez 2007) | 3 lines
  
  Initialized merge tracking via "svnmerge" with revisions "1-594557" from 
  https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
  
  ------------------------------------------------------------------------
  r603656 | jeremias | 2007-12-12 17:13:06 +0100 (Mi, 12 Dez 2007) | 307 lines
  
  Merged revisions 594558-603642 via svnmerge from 
  https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
  
  ........
    r594571 | vhennebert | 2007-11-13 17:24:32 +0100 (Di, 13 Nov 2007) | 7 lines
    
    Moved the creation of grid units to the FO tree building stage. Brought a few improvements along with the move:
    - bugfix: border-resolution for border-end on row-spanning cells was wrong
    - bugfix: in case of missing cells the border-end of the table was applied to an inner cell, instead of the cell in the last column (but missing cells aren't painted yet :-\)
    - bugfix: in collapsing-border model, border-before and -after specified on table-column were applied to every cell of the column, instead of only the first and the last ones
    - border resolution is now made progressively when possible, and no longer triggers the fetching of all the rows of the table
    Added testcases for the border conflict resolution (between the various elements of a table and not only the cells)
  ........
    r594578 | vhennebert | 2007-11-13 17:50:09 +0100 (Di, 13 Nov 2007) | 2 lines
    
    Moved *GridUnit from layoutmgr/table to fo/flow/table
  ........
    r594579 | vhennebert | 2007-11-13 17:55:54 +0100 (Di, 13 Nov 2007) | 2 lines
    
    Changed back visibility of fields from public to package-private, due to the move of *GridUnit in the fo.flow.table package
  ........
    r594584 | vhennebert | 2007-11-13 18:13:19 +0100 (Di, 13 Nov 2007) | 2 lines
    
    Use a singleton for a default BorderInfo of style none, instead of every time a new instance
  ........
    r594592 | vhennebert | 2007-11-13 18:39:17 +0100 (Di, 13 Nov 2007) | 2 lines
    
    Cleaned up RowGroupLayoutManager and TableRowIterator
  ........
    r594821 | vhennebert | 2007-11-14 11:18:45 +0100 (Mi, 14 Nov 2007) | 2 lines
    
    Moved EffRow to the fo.flow.table package
  ........
    r594829 | vhennebert | 2007-11-14 11:41:52 +0100 (Mi, 14 Nov 2007) | 2 lines
    
    Reduced visibility of some methods and constructors from public to package-private, as a consequence of the move of *GridUnit to the fo.flow.table package
  ........
    r594836 | vhennebert | 2007-11-14 12:14:03 +0100 (Mi, 14 Nov 2007) | 2 lines
    
    Restored the setting of the parent table-row element on grid units
  ........
    r594852 | vhennebert | 2007-11-14 13:21:53 +0100 (Mi, 14 Nov 2007) | 2 lines
    
    Restored the setting of rowIndex on primary grid units (although testcases were already working...)
  ........
    r595297 | jeremias | 2007-11-15 14:28:58 +0100 (Do, 15 Nov 2007) | 2 lines
    
    Bugzilla #43143:
    Had to remove the Expert(Subset) Encoding detection as this caused problems with a barcode font that used dfCharset=2 but was not using ExpertSubset encoding. To detect Expert(Subset)Encoding, the AFM needs to be parsed. And since we don't support that encoding, yet, the fallback to WinAnsiEncoding should work well enough.
  ........
    r595637 | acumiskey | 2007-11-16 13:12:52 +0100 (Fr, 16 Nov 2007) | 3 lines
    
    This should improve the ability of the FontLoader when resolving PFM files
    for Type 1 fonts on case sensitive Unix systems.
  ........
    r596072 | jeremias | 2007-11-18 11:48:53 +0100 (So, 18 Nov 2007) | 4 lines
    
    ApacheCon US is over.
    OSSSummit was cancelled/postponed.
    Added example for total page count using XSL 1.1
    Adjusted total page count example to new FOP API. (Thanks to Miroslav Gregan for the hint)
  ........
    r596097 | jeremias | 2007-11-18 17:56:09 +0100 (So, 18 Nov 2007) | 6 lines
    
    Bugzilla #43605:
    Added methods for page-number-citation and page-number-citation-last in FOEventHandler.java
    Submitted by: V. Schappert <vschappert.at.bloomberg.net>
    
    Patch modified by Jeremias:
    Bugfix: FOEventHandler.startPageNumberCitation() was also called in the case of a page-number-citation-last. Introduced abstract base classes to avoid this.
  ........
    r596100 | jeremias | 2007-11-18 18:17:24 +0100 (So, 18 Nov 2007) | 1 line
    
    Added sample as suggested by Kumar Puppala.
  ........
    r596390 | vhennebert | 2007-11-19 19:25:27 +0100 (Mo, 19 Nov 2007) | 2 lines
    
    Bugzilla #43766: breaks generated by the merging algorithm for table rows containing empty cells has always a penalty of 900
  ........
    r596554 | jeremias | 2007-11-20 08:14:33 +0100 (Di, 20 Nov 2007) | 2 lines
    
    Bugzilla #43904:
    Buffer the OutputStreams in our transcoders if the users forget.
  ........
    r596600 | jeremias | 2007-11-20 11:20:29 +0100 (Di, 20 Nov 2007) | 3 lines
    
    Bugzilla #43910:
    Avoid a NullPointerException in AreaTreeHandler.endDocument().
    Submitted by: David Delbecq <delbd.at.oma.be>
  ........
    r596724 | jeremias | 2007-11-20 16:56:33 +0100 (Di, 20 Nov 2007) | 3 lines
    
    Bugfix: Bugfix for URI resolution: Make StreamSources without system identifier work again.
    Bugfix: Close streams opened by test font resolution in font configuration (the font URIs will be resolved again later anyway).
    Better error message when the loading of font metric files doesn't work due to missing information in the returned Source instances.
  ........
    r596727 | vhennebert | 2007-11-20 17:07:32 +0100 (Di, 20 Nov 2007) | 2 lines
    
    Bugfix in tables: wrong element generation by the merging algorithm when glues must be produced to cope with conditional spaces. The corresponding length was added twice: one in the glue itself and one in the following box.
  ........
    r596739 | cbowditch | 2007-11-20 17:49:13 +0100 (Di, 20 Nov 2007) | 1 line
    
    bug fix: memory leak in PropertyCache. Fix provided by Jeremias. There are still some thread synchronization issues to be addressed in the PropertyCache. See the following thread for details: http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-dev/200711.mbox/%3cBAY117-DAV109E36CC066889386AB917FB870@phx.gbl%3e
  ........
    r596742 | vhennebert | 2007-11-20 18:08:46 +0100 (Di, 20 Nov 2007) | 2 lines
    
    Added a news entry about Max Berger becoming a committer. Welcome Max!
  ........
    r596776 | vhennebert | 2007-11-20 19:47:39 +0100 (Di, 20 Nov 2007) | 2 lines
    
    Bugzilla #43803: table cells having no children are allowed in relaxed validation mode.
  ........
    r597052 | vhennebert | 2007-11-21 13:23:59 +0100 (Mi, 21 Nov 2007) | 2 lines
    
    Bugfix: the last element generated by the merging algorithm may now be a glue
  ........
    r597448 | jeremias | 2007-11-22 17:13:05 +0100 (Do, 22 Nov 2007) | 2 lines
    
    First draft of a possible new intermediate format for Apache FOP.
    Details on: http://wiki.apache.org/xmlgraphics-fop/AreaTreeIntermediateXml/NewDesign
  ........
    r598558 | jeremias | 2007-11-27 09:36:23 +0100 (Di, 27 Nov 2007) | 6 lines
    
    Bugzilla #40230:
    Bugfix: no empty page is generated anymore if there's no content after a break-after.
    
    Bugzilla #43917:
    Bugfix for border-after painting and element list generation when a forced break is involved.
  ........
    r599536 | vhennebert | 2007-11-29 19:31:13 +0100 (Do, 29 Nov 2007) | 4 lines
    
    Added fixes-bug attributes for:
    - wrong element generation in table when glues are produced
    - border-resolution on row-spanning cells
  ........
    r599746 | jeremias | 2007-11-30 10:04:54 +0100 (Fr, 30 Nov 2007) | 2 lines
    
    Bugzilla #37993:
    Bugfix: allow multiple bookmarks to point at the same destination.
  ........
    r600195 | adelmelle | 2007-12-01 22:11:53 +0100 (Sa, 01 Dez 2007) | 1 line
    
    Correction and simplification of the PropertyCache: subclass WeakReference and remove internal threading
  ........
    r600467 | jeremias | 2007-12-03 11:16:27 +0100 (Mo, 03 Dez 2007) | 2 lines
    
    Log RuntimeExceptions during rendering so that they are at least visible somewhere if someone doesn't set an ErrorListener on the XSLT processor (this could lead to exceptions being swallowed). This is a temporary measure until we have time to improve the exception handling in FOP.
    The original problem that led to this change was: "The number of this PDFNumber must not be empty" while producing a PDF/A with customized filter entries in the PDF configuration. The exception was a follow-up exception after a PDFConformanceException that was swallowed by a default ErrorListener.
  ........
    r600521 | jeremias | 2007-12-03 14:21:06 +0100 (Mo, 03 Dez 2007) | 1 line
    
    Added a possibility to rerun the whole run a defined number of times to test for possible issues outside a single rendering run.
  ........
    r600529 | jeremias | 2007-12-03 14:32:04 +0100 (Mo, 03 Dez 2007) | 1 line
    
    Oops.
  ........
    r601413 | vhennebert | 2007-12-05 17:56:47 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Typo in property: svn:kewords -> svn:keywords
  ........
    r601415 | acumiskey | 2007-12-05 18:11:44 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Corrected javadocs
  ........
    r601416 | acumiskey | 2007-12-05 18:12:54 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Corrected javadoc
  ........
    r601417 | acumiskey | 2007-12-05 18:13:31 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Corrected javadoc
  ........
    r601419 | acumiskey | 2007-12-05 18:15:46 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Improved use of logging
  ........
    r601423 | acumiskey | 2007-12-05 18:19:43 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Corrected javadoc, fixed checkstyle issues, and now also correctly caters for negative number conversions
  ........
    r601424 | acumiskey | 2007-12-05 18:21:15 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Fixed checkstyle issues
  ........
    r601426 | acumiskey | 2007-12-05 18:24:15 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601427 | acumiskey | 2007-12-05 18:25:07 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601428 | acumiskey | 2007-12-05 18:25:58 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601429 | acumiskey | 2007-12-05 18:27:06 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601430 | acumiskey | 2007-12-05 18:28:03 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601431 | acumiskey | 2007-12-05 18:28:48 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601432 | acumiskey | 2007-12-05 18:29:31 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601433 | acumiskey | 2007-12-05 18:30:04 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601434 | acumiskey | 2007-12-05 18:31:20 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601435 | acumiskey | 2007-12-05 18:32:29 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601436 | acumiskey | 2007-12-05 18:34:44 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601437 | acumiskey | 2007-12-05 18:35:31 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601438 | acumiskey | 2007-12-05 18:36:12 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes and cleanup
  ........
    r601439 | acumiskey | 2007-12-05 18:37:40 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601440 | acumiskey | 2007-12-05 18:39:54 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601442 | acumiskey | 2007-12-05 18:42:13 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601443 | acumiskey | 2007-12-05 18:42:48 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601444 | acumiskey | 2007-12-05 18:43:46 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601445 | acumiskey | 2007-12-05 18:44:36 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601446 | acumiskey | 2007-12-05 18:45:20 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601447 | acumiskey | 2007-12-05 18:47:44 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601448 | acumiskey | 2007-12-05 18:48:56 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601449 | acumiskey | 2007-12-05 18:49:46 +0100 (Mi, 05 Dez 2007) | 2 lines
    
    Checkstyle fixes
  ........
    r601712 | acumiskey | 2007-12-06 12:57:14 +0100 (Do, 06 Dez 2007) | 2 lines
    
    Temporary fix to the build
  ........
    r602045 | jeremias | 2007-12-07 10:20:28 +0100 (Fr, 07 Dez 2007) | 1 line
    
    Avoid a NPE in toString().
  ........
    r602125 | maxberger | 2007-12-07 16:36:53 +0100 (Fr, 07 Dez 2007) | 6 lines
    
    Updated xmlgraphics from SVN
    Added autodetection of fonts in jar files (x-font and x-font-truetype)
    Added files needed for testcase
    Please note: Actual testcase is still missing!
  ........
    r602898 | maxberger | 2007-12-10 14:35:33 +0100 (Mo, 10 Dez 2007) | 2 lines
    
    Added documentation for font-in-jar-files
  ........
    r603590 | acumiskey | 2007-12-12 13:24:10 +0100 (Mi, 12 Dez 2007) | 4 lines
    
    * Added an SVG handler and Graphics2D implementation for AFP which injects AFP GOCA structured fields into the AFPDataStream.
    * Fixed many checkstyle problems.
    * Updated xmlgraphics-commons-1.3svn.jar to include changes to TextHandler
  ........
    r603592 | acumiskey | 2007-12-12 13:26:39 +0100 (Mi, 12 Dez 2007) | 2 lines
    
    Updated status with SVG support for AFP.
  ........
  
  ------------------------------------------------------------------------
  r603661 | jeremias | 2007-12-12 17:20:09 +0100 (Mi, 12 Dez 2007) | 1 line
  
  Fix javadoc
  ------------------------------------------------------------------------
  r603886 | jeremias | 2007-12-13 12:15:48 +0100 (Do, 13 Dez 2007) | 1 line
  
  Copy/paste programming is dangerous. :-)
  ------------------------------------------------------------------------
  r603902 | jeremias | 2007-12-13 13:17:56 +0100 (Do, 13 Dez 2007) | 2 lines
  
  Factored out all image handling code in the PDFRenderer into PDFImageHandler classes. The interface was introduced to handle PDF-in-PDF images.
  The PDFImageHandler interface changes in a backwards-incompatible way but since the PDF-in-PDF plug-in probably has the only implementation, that's not very problematic. I'll release a new version as soon as the image stuff is merged back into Trunk.
  ------------------------------------------------------------------------
  r603937 | jeremias | 2007-12-13 16:20:46 +0100 (Do, 13 Dez 2007) | 1 line
  
  Some cleanup
  ------------------------------------------------------------------------
  r603938 | jeremias | 2007-12-13 16:23:23 +0100 (Do, 13 Dez 2007) | 2 lines
  
  Switch PCL renderer to new image package.
  Add an option to force a color canvas (RGB) instead of a gray canvas. Set this to true for all SVG graphics since Batik does not seem to support gradients on a grayscale canvas (IllegalArgumentException).
  ------------------------------------------------------------------------
  r604122 | jeremias | 2007-12-14 08:58:56 +0100 (Fr, 14 Dez 2007) | 1 line
  
  Stupid copy/paste again.
  ------------------------------------------------------------------------
  r604135 | jeremias | 2007-12-14 10:04:43 +0100 (Fr, 14 Dez 2007) | 1 line
  
  Preliminary changes to switch to the new image library. TIFF optimizations still missing. Untested.
  ------------------------------------------------------------------------
  r604144 | jeremias | 2007-12-14 11:12:41 +0100 (Fr, 14 Dez 2007) | 1 line
  
  Switch to new image package. At some point we will probably want to remove this example as JEuclid has a better plug-in now.
  ------------------------------------------------------------------------
  r604150 | jeremias | 2007-12-14 11:27:39 +0100 (Fr, 14 Dez 2007) | 1 line
  
  Old JEuclid doesn't notice itself if no MathML document is loaded.
  ------------------------------------------------------------------------
  r604155 | jeremias | 2007-12-14 11:48:07 +0100 (Fr, 14 Dez 2007) | 2 lines
  
  Switched to new image package.
  The preloader simply loads the full document and converts it to SVG. That's the only way to determine the intrinsic size of the image.
  ------------------------------------------------------------------------
  r604157 | jeremias | 2007-12-14 11:51:21 +0100 (Fr, 14 Dez 2007) | 1 line
  
  No longer needed.
  ------------------------------------------------------------------------
  r604214 | jeremias | 2007-12-14 17:07:30 +0100 (Fr, 14 Dez 2007) | 1 line
  
  Added work-around for decoding CMYK JPEGs with ImageIO (no guarantees for color fidelity but it's better than not being able to use CMYK images).
  ------------------------------------------------------------------------
  r604297 | jeremias | 2007-12-14 22:14:12 +0100 (Fr, 14 Dez 2007) | 68 lines
  
  Merged revisions 603643-604293 via svnmerge from 
  https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
  
  ........
    r603890 | vhennebert | 2007-12-13 12:35:17 +0100 (Do, 13 Dez 2007) | 2 lines
    
    Fixed @throws statements in javadoc
  ........
    r603926 | adelmelle | 2007-12-13 15:43:08 +0100 (Do, 13 Dez 2007) | 4 lines
    
    Minor tweaks:
    * only add text to a fo:wrapper if it is not a direct flow-descendant
    * error if an fo:wrapper that is a direct flow-descendant contains inline-level children
  ........
    r603943 | vhennebert | 2007-12-13 16:55:29 +0100 (Do, 13 Dez 2007) | 2 lines
    
    Removed calls to removeLegalBreaks since they aren't necessary (the whole content is put in a single box anyway) and the method is buggy.
  ........
    r603945 | vhennebert | 2007-12-13 17:10:32 +0100 (Do, 13 Dez 2007) | 2 lines
    
    Implemented the resolution of collapsing borders in the FO tree, for every situation (normal, cell at the top of a page, cell broken), taking conditionality, headers and footers into account.
  ........
    r603959 | vhennebert | 2007-12-13 18:21:24 +0100 (Do, 13 Dez 2007) | 2 lines
    
    Reverted change accidentally introduced in the previous commit. A proper fix needs to be found for this one.
  ........
    r603961 | vhennebert | 2007-12-13 18:31:26 +0100 (Do, 13 Dez 2007) | 2 lines
    
    Ok, now /really/ revert the previous commit :-\
  ........
    r603962 | vhennebert | 2007-12-13 18:32:43 +0100 (Do, 13 Dez 2007) | 2 lines
    
    Style only: removed trailing white spaces
  ........
    r603968 | vhennebert | 2007-12-13 19:28:56 +0100 (Do, 13 Dez 2007) | 2 lines
    
    Fixed the handling of columns in the border resolution, especially in case of column-spanning cells
  ........
    r603975 | vhennebert | 2007-12-13 19:52:48 +0100 (Do, 13 Dez 2007) | 2 lines
    
    Removed parameter from the endPart method, since the part is already passed as a parameter of the previously called startPart method
  ........
    r603979 | vhennebert | 2007-12-13 19:57:25 +0100 (Do, 13 Dez 2007) | 2 lines
    
    Removed parameter from the endTablePart method, as the part is already passed as as a parameter of the previously called startTablePart method
  ........
    r603990 | vhennebert | 2007-12-13 20:17:12 +0100 (Do, 13 Dez 2007) | 2 lines
    
    Throw a ValidationException if table-footer is put after table-body and the table uses the collapsing border model. The footer must be known to properly resolve borders.
  ........
    r604171 | vhennebert | 2007-12-14 12:32:51 +0100 (Fr, 14 Dez 2007) | 2 lines
    
    Clean up: removed all reset and resetPosition methods, which pre-date the Knuth era and are no longer needed
  ........
    r604180 | vhennebert | 2007-12-14 13:23:10 +0100 (Fr, 14 Dez 2007) | 2 lines
    
    Reduced visibility of methods from public to package-private
  ........
    r604185 | acumiskey | 2007-12-14 14:16:06 +0100 (Fr, 14 Dez 2007) | 2 lines
    
    Fixed copy constructor
  ........
    r604293 | jeremias | 2007-12-14 21:58:53 +0100 (Fr, 14 Dez 2007) | 2 lines
    
    Bugfix: DecodeParms -> DecodeParams (introduced when I changed to generic PDF structures)
    (fixes CCITT encoded images)
  ........
  
  ------------------------------------------------------------------------
  r604301 | jeremias | 2007-12-14 22:26:27 +0100 (Fr, 14 Dez 2007) | 9 lines
  
  Merged revisions 604294-604299 via svnmerge from 
  https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
  
  ........
    r604299 | jeremias | 2007-12-14 22:24:14 +0100 (Fr, 14 Dez 2007) | 1 line
    
    Don't hack when you're tired! Reverting r604293 and instead fixing the right value. It's DecodeParams -> DecodeParms!
  ........
  
  ------------------------------------------------------------------------
  r604930 | jeremias | 2007-12-17 18:05:47 +0100 (Mo, 17 Dez 2007) | 2 lines
  
  Dispose ImageReader when done reading.
  Don't close streams as some codecs appear to do "late reading" of the image, i.e. only when the rasters are accessed, at which point they still seek on the stream. For this, the streams must remain open. I hope the codecs all properly close the streams once they don't need them anymore. The javadocs are not clear enough in this regards, IMO.
  ------------------------------------------------------------------------
  r604968 | jeremias | 2007-12-17 20:03:45 +0100 (Mo, 17 Dez 2007) | 3 lines
  
  Added an isSupported() method to ImageLoaderFactory so we can check early if an ImageLoader may or may not support a particular subformat. This is used to allow optimized loading of CCITT compressed TIFF images.
  Support for undecoded embedding of single-strip CCITT compressed images for PDF, PostScript and AFP.
  Added a fallback mechanism for ImageLoaders: if one ImageLoader cannot load a particular image, try equivalent others registered for the same format.
  ------------------------------------------------------------------------
  r604972 | jeremias | 2007-12-17 20:07:43 +0100 (Mo, 17 Dez 2007) | 1 line
  
  Update Commons
  ------------------------------------------------------------------------
  r605138 | jeremias | 2007-12-18 09:42:41 +0100 (Di, 18 Dez 2007) | 2 lines
  
  Support for specifying a particular page number of a multi-page image (such as TIFF).
  Format: http://localhost/images/scan1.tif#page=3
  ------------------------------------------------------------------------
  r605479 | jeremias | 2007-12-19 10:18:33 +0100 (Mi, 19 Dez 2007) | 3 lines
  
  Removed new image package after the copying it to XML Graphics Commons.
  Adjusted to use the Commons' version.
  Batik-dependent plugins remain but will eventually need a different resting place.
  ------------------------------------------------------------------------
  r605486 | jeremias | 2007-12-19 10:39:33 +0100 (Mi, 19 Dez 2007) | 1 line
  
  Adjust the (pre)loader registration for the demo extensions.
  ------------------------------------------------------------------------
  r605567 | jeremias | 2007-12-19 16:03:25 +0100 (Mi, 19 Dez 2007) | 1 line
  
  Fixed scaling and translation (didn't work correctly in certain situations)
  ------------------------------------------------------------------------
  r607034 | jeremias | 2007-12-27 11:47:12 +0100 (Do, 27 Dez 2007) | 71 lines
  
  Merged revisions 604300-607033 via svnmerge from 
  https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
  
  ........
    r604475 | vhennebert | 2007-12-15 19:16:01 +0100 (Sa, 15 Dez 2007) | 2 lines
    
    Testcase for the resolution of collapsed and conditional borders in the FO tree
  ........
    r604678 | adelmelle | 2007-12-16 20:54:00 +0100 (So, 16 Dez 2007) | 8 lines
    
    Streamlining/Correction of the changes made in r603926
    - delegate validation of the fo:wrapper's children to the parent: added static FONode.validateChildNode()
    - narrow the condition for processing text-childnodes: 
      this is not only constrained to fo:flow and fo:static-content, but the same goes 
      for a fo:wrapper that is a direct descendant of a fo:block-container or fo:inline-container, 
      which only allow block-level content (interpretation)
    - minor javadoc fixups/improvements
  ........
    r604814 | vhennebert | 2007-12-17 11:21:04 +0100 (Mo, 17 Dez 2007) | 2 lines
    
    Organized imports
  ........
    r604965 | vhennebert | 2007-12-17 19:56:46 +0100 (Mo, 17 Dez 2007) | 2 lines
    
    Renaming GridUnitPart into the more accurate CellPart. Moreover I was always making the confusion between gup and pgu
  ........
    r604970 | vhennebert | 2007-12-17 20:05:27 +0100 (Mo, 17 Dez 2007) | 2 lines
    
    Simplified addAreasAndFlushRow: there can no longer be null GridUnits, every hole in the grid is now filled with an EmptyGridUnit
  ........
    r605195 | vhennebert | 2007-12-18 12:56:38 +0100 (Di, 18 Dez 2007) | 2 lines
    
    Reset previousRowsLength before a new row-group is handled
  ........
    r605246 | vhennebert | 2007-12-18 17:48:03 +0100 (Di, 18 Dez 2007) | 2 lines
    
    Simplification in RowPainter: avoid the use of an array to store rowOffsets and firstRow index for each part of the table (header, footer, body). One at a time is enough.
  ........
    r605253 | vhennebert | 2007-12-18 18:01:45 +0100 (Di, 18 Dez 2007) | 2 lines
    
    Renamed firstRow into firstRowIndex and moved its initialization into handeTableContentPosition
  ........
    r605295 | vhennebert | 2007-12-18 19:58:29 +0100 (Di, 18 Dez 2007) | 2 lines
    
    Streamlined the recording of row offsets, by replacing Map with a List. Fixed bug #43633 in the same time.
  ........
    r605297 | vhennebert | 2007-12-18 20:02:02 +0100 (Di, 18 Dez 2007) | 3 lines
    
    SVG support for AFP is an important addition IMO.
    IIUC it will have to be advertised in the next release as "Support for SVG images using primitive AFP graphics commands instead of bitmap images", or something like that?
  ........
    r605517 | vhennebert | 2007-12-19 12:47:38 +0100 (Mi, 19 Dez 2007) | 2 lines
    
    I said currentGU can no longer be null
  ........
    r605978 | jeremias | 2007-12-20 18:00:46 +0100 (Do, 20 Dez 2007) | 1 line
    
    Remove commented code.
  ........
    r606004 | jeremias | 2007-12-20 20:19:19 +0100 (Do, 20 Dez 2007) | 1 line
    
    Added support for scale-down-to-fit and scale-up-to-fit.
  ........
    r607032 | jeremias | 2007-12-27 11:34:15 +0100 (Do, 27 Dez 2007) | 4 lines
    
    Added new extension element: fox:external-document. It allows to add whole documents such as multi-page TIFF images to be inserted as peers to a page-sequence. Each image will make up an entire page. See the documentation for details. ATM, only single pages are possible. Multi-page images will be supported with the new image package.
    
    Some preparations for page-position="only" but the implementation is incomplete and "only" has no effect, yet. (Just uploaded some stuff I once started)
    Some javadoc cleanups.
  ........
  
  ------------------------------------------------------------------------
  r607091 | jeremias | 2007-12-27 18:13:45 +0100 (Do, 27 Dez 2007) | 1 line
  
  Avoid cutting away the URI fragment when building URLs from filenames.
  ------------------------------------------------------------------------
  r607092 | jeremias | 2007-12-27 18:15:49 +0100 (Do, 27 Dez 2007) | 3 lines
  
  Switched fox:external-document to new image package.
  Added multi-page support for fox:external-document.
  Changed multi-page.tiff: page 4 is now bigger than all other pages. (to make sure that individually sized pages are handled properly)
  ------------------------------------------------------------------------
  r607188 | jeremias | 2007-12-28 09:38:26 +0100 (Fr, 28 Dez 2007) | 2 lines
  
  Throwing IllegalStateException causes a prior exception to be swallowed by Xalan-J. Need to throw a SAXException instead.
  Instead of logging an error about the element mismatch throw a SAXException because the logging only confuses the user as it's practically always a follow-up exception of an exception happening earlier in the respective startElement() event.
  ------------------------------------------------------------------------
  r607249 | jeremias | 2007-12-28 15:27:39 +0100 (Fr, 28 Dez 2007) | 1 line
  
  Metadata didn't get transported to the renderer when only fox:external-document is used.
  ------------------------------------------------------------------------
  r607256 | jeremias | 2007-12-28 16:06:35 +0100 (Fr, 28 Dez 2007) | 1 line
  
  Corrected content model.
  ------------------------------------------------------------------------
  r607261 | jeremias | 2007-12-28 16:11:56 +0100 (Fr, 28 Dez 2007) | 1 line
  
  Added -imagein to command-line so (multi-page) images such as TIFF files can be converted to PDF and other formats supported by FOP. The default stylesheet can be overwritten (with -xslt) if desired.
  ------------------------------------------------------------------------
  r609530 | jeremias | 2008-01-07 09:16:09 +0100 (Mo, 07 Jan 2008) | 1 line
  
  Fixed copy/paste mistake. Thanks for spotting it, Vincent.
  ------------------------------------------------------------------------
  r609600 | jeremias | 2008-01-07 14:28:53 +0100 (Mo, 07 Jan 2008) | 1 line
  
  Removed "image2" package again and moved the Batik-dependent implementations under the old "image" package. In this form, the deprecated code doesn't conflict with the new implementations anymore.
  ------------------------------------------------------------------------
  r610029 | jeremias | 2008-01-08 16:48:53 +0100 (Di, 08 Jan 2008) | 3 lines
  
  Added minimal support for the .minimum/.maximum components of block/inline-progression-dimension on fo:external-graphic and fo:instream-foreign-object. This will only constrain the image itself but not allow the layout engine itself to resize the image as seen fit.
  Added missing Javadocs in ImageLayout.java.
  
  ------------------------------------------------------------------------
  r611120 | jeremias | 2008-01-11 10:20:57 +0100 (Fr, 11 Jan 2008) | 100 lines
  
  Merged revisions 607034-611115 via svnmerge from 
  https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
  
  ........
    r607036 | jeremias | 2007-12-27 11:51:11 +0100 (Do, 27 Dez 2007) | 1 line
    
    Don't just exit with no error message if the document contains no content. Pretty irritating if it does so.
  ........
    r608812 | acumiskey | 2008-01-04 13:14:33 +0100 (Fr, 04 Jan 2008) | 3 lines
    
    The fonts variable would have always had an empty Configuration node (non-null value) even if a <fonts/> wasn't present
    in the fop configuration.
  ........
    r609567 | jeremias | 2008-01-07 11:52:09 +0100 (Mo, 07 Jan 2008) | 4 lines
    
    Reenabled documentation for fox:destination.
    Enabled intermediate format functionality for fox:destination.
    Added a test case to check fox:destination.
    Deprecated FOP's XMLizable in favor of the XML Graphics Commons variant (and extend that variant).
  ........
    r609627 | jeremias | 2008-01-07 16:06:24 +0100 (Mo, 07 Jan 2008) | 5 lines
    
    Bugzilla #44176:
    Support for custom fonts in Java2DRenderer and derived renderers.
    Submitted by: Patrick Jaromin <patrick.at.jgsullivan.dot.com>
    
    Patch modified slightly by jeremias.
  ........
    r610020 | acumiskey | 2008-01-08 16:27:02 +0100 (Di, 08 Jan 2008) | 2 lines
    
    cleaned up
  ........
    r610021 | acumiskey | 2008-01-08 16:28:56 +0100 (Di, 08 Jan 2008) | 2 lines
    
    Appears to be unused/referenced and superceeded by PageGroup
  ........
    r610022 | acumiskey | 2008-01-08 16:34:07 +0100 (Di, 08 Jan 2008) | 2 lines
    
    cleaned up
  ........
    r610023 | acumiskey | 2008-01-08 16:35:18 +0100 (Di, 08 Jan 2008) | 2 lines
    
    fixed javadoc
  ........
    r610337 | vhennebert | 2008-01-09 12:02:08 +0100 (Mi, 09 Jan 2008) | 2 lines
    
    Fixed checkstyle issues: tabs and trailing spaces
  ........
    r610355 | vhennebert | 2008-01-09 13:01:21 +0100 (Mi, 09 Jan 2008) | 2 lines
    
    keep-together is an inherited property
  ........
    r610420 | acumiskey | 2008-01-09 16:40:25 +0100 (Mi, 09 Jan 2008) | 2 lines
    
    cleanup
  ........
    r610704 | jeremias | 2008-01-10 08:38:47 +0100 (Do, 10 Jan 2008) | 1 line
    
    Added basic support for PDF page labels.
  ........
    r610739 | jeremias | 2008-01-10 11:13:21 +0100 (Do, 10 Jan 2008) | 1 line
    
    PostScript output now generates the bounding box DSC comments for the whole document.
  ........
    r610821 | vhennebert | 2008-01-10 16:53:20 +0100 (Do, 10 Jan 2008) | 4 lines
    
    - renamed variables for clarity
    - moved the computation of a cell's content length in PrimaryGridUnit
    - better javadoc for getHeight method in EffRow
  ........
    r610848 | vhennebert | 2008-01-10 18:41:52 +0100 (Do, 10 Jan 2008) | 2 lines
    
    No need to check if the end of the cell is reached when creating the areas for a row
  ........
    r610853 | vhennebert | 2008-01-10 18:54:16 +0100 (Do, 10 Jan 2008) | 2 lines
    
    Simplified addAreasAndFlushRow
  ........
    r610886 | vhennebert | 2008-01-10 20:23:56 +0100 (Do, 10 Jan 2008) | 2 lines
    
    Removed endPart() method and moved its content into addAreasAndFlushRow()
  ........
    r610891 | vhennebert | 2008-01-10 20:34:13 +0100 (Do, 10 Jan 2008) | 2 lines
    
    Removed accumulatedBPD which is redundant with yoffset
  ........
    r610893 | vhennebert | 2008-01-10 20:35:24 +0100 (Do, 10 Jan 2008) | 2 lines
    
    The return value of addAreasAndFlushRow is never used, changed it to void
  ........
    r610905 | vhennebert | 2008-01-10 20:57:29 +0100 (Do, 10 Jan 2008) | 2 lines
    
    Renamed lastRow into currentRow and yoffset into currentRowOffset
  ........
    r611114 | jeremias | 2008-01-11 10:04:28 +0100 (Fr, 11 Jan 2008) | 2 lines
    
    Bugfix: Some string objects were not encrypted (for example in named destinations)
    I had to refactor the PDF library a little bit but since it only affects the inner API it shouldn't be a problem that I removed some methods which caused trouble because a didn't think about encryption when I worked on the PDF library last year.
  ........
  
  ------------------------------------------------------------------------
  r611133 | jeremias | 2008-01-11 11:45:01 +0100 (Fr, 11 Jan 2008) | 4 lines
  
  Fixed merge problems.
  Fixed a NPE when a mask is null in BitmapImage.java
  Add support for properly encoding binary data as a hexadecimal string object (including encryption).
  Adjust palette generation for indexed bitmaps to work correctly with encryption.
  ------------------------------------------------------------------------
  r611138 | jeremias | 2008-01-11 11:59:27 +0100 (Fr, 11 Jan 2008) | 1 line
  
  Removed empty package.
  ------------------------------------------------------------------------
................
  r611285 | jeremias | 2008-01-11 20:03:36 +0000 (Fri, 11 Jan 2008) | 1 line
  
  Removed stray reference to ImageFactory.
................
  r611766 | jeremias | 2008-01-14 11:01:11 +0000 (Mon, 14 Jan 2008) | 1 line
  
  java.net.URI doesn't eat non-escaped URIs so I added an escaping method to URISpecification that should cover most cases. Usually, it's just about a space in a filename.
................
  r611767 | jeremias | 2008-01-14 11:02:34 +0000 (Mon, 14 Jan 2008) | 1 line
  
  Restore default constructor for PDFArray.
................
  r611768 | jeremias | 2008-01-14 11:02:54 +0000 (Mon, 14 Jan 2008) | 1 line
  
  Clear parent if later on an object number is assigned to a PDFObject which means it is a top-level object.
................
  r612560 | jeremias | 2008-01-16 20:14:56 +0000 (Wed, 16 Jan 2008) | 1 line
  
  Fixed dead link.
................
  r612785 | acumiskey | 2008-01-17 10:36:36 +0000 (Thu, 17 Jan 2008) | 1 line
  
  added serial version id
................
  r612815 | jeremias | 2008-01-17 13:37:04 +0000 (Thu, 17 Jan 2008) | 6 lines
  
  Fixed logic error setting the transformation matrix for block-container viewports (applies to absolute and fixed block-containers only). The CTM now only rotates and shifts the content as necessary for reference-orientation and writing-mode. All the rest of the transformation is done by the renderer which allows to add additional transformations as made possible by fox:transform (see below).
  Important: External renderer implementations need to adjust for the change and implement the new method concatenateTransformationMatrix(AffineTransform) if the renderer is derived from AbstractPathOrientedRenderer.
  
  New extension attribute fox:transform on fo:block-container allows free-form transformation (rotation, scaling etc.) of absolute and fixed block-containers. Supported only for PDF, PS and Java2D-based renderers.
  
  Added missing region background painting for PCL renderer.
................
  r612816 | jeremias | 2008-01-17 13:43:33 +0000 (Thu, 17 Jan 2008) | 1 line
  
  Slight performance improvement on multi-core CPUs using a cheap trick.
................
  r612825 | jeremias | 2008-01-17 14:23:13 +0000 (Thu, 17 Jan 2008) | 2 lines
  
  Fixed layout problem in two of the changes.
  Categorized the individual changes a bit.
................
  r613144 | jeremias | 2008-01-18 12:44:56 +0000 (Fri, 18 Jan 2008) | 1 line
  
  Forgot to adjust the JAR name when updating to Batik 1.7
................
  r613185 | jeremias | 2008-01-18 15:25:26 +0000 (Fri, 18 Jan 2008) | 1 line
  
  Copy/Paste problem with TTF has long been fixed.
................
  r613828 | jeremias | 2008-01-21 10:21:25 +0000 (Mon, 21 Jan 2008) | 1 line
  
  Removed stray System.out
................
  r613831 | jeremias | 2008-01-21 10:33:10 +0000 (Mon, 21 Jan 2008) | 1 line
  
  A name object can be encoded as a stand-along PDF object with object number and all, so extend from PDFObject. Fixes a possible ClassCastException with the PDF-in-PDF extension.
................
  r613835 | jeremias | 2008-01-21 10:40:38 +0000 (Mon, 21 Jan 2008) | 1 line
  
  Correct inline writing when object has an object number.
................
  r613896 | jeremias | 2008-01-21 14:13:29 +0000 (Mon, 21 Jan 2008) | 1 line
  
  A note about the internal coordinate system when using fox:transform.
................
  r614156 | jeremias | 2008-01-22 09:26:05 +0000 (Tue, 22 Jan 2008) | 2 lines
  
  Complete overhaul of the "Graphics" page after the new image loading framework has been introduced.
  Some updates on external links and about Java 1.4.
................
  r614169 | vhennebert | 2008-01-22 10:48:43 +0000 (Tue, 22 Jan 2008) | 2 lines
  
  Fixed minor typos
................
  r614170 | vhennebert | 2008-01-22 10:50:24 +0000 (Tue, 22 Jan 2008) | 2 lines
  
  Updated text to reflect the upgrading of the minimum Java requirement to 1.4
................
  r614191 | jeremias | 2008-01-22 12:31:11 +0000 (Tue, 22 Jan 2008) | 1 line
  
  A note on the difference between JAI Image I/O Tools, the codec package, and JAI, the image library.
................
  r614201 | jeremias | 2008-01-22 14:02:27 +0000 (Tue, 22 Jan 2008) | 2 lines
  
  Bugzilla #44160:
  Fixed a possible IndexOutOfBoundsException that could happen with certain constellations when footnotes are used. Note: I haven't been able to come up with a scaled-down testcase for regression testing. Maybe someone more intimate with the footnote handling can.
................
  r614202 | jeremias | 2008-01-22 14:13:22 +0000 (Tue, 22 Jan 2008) | 1 line
  
  We need JAI Image I/O Tools now rather than Jimi or JAI.
................
  r614566 | vhennebert | 2008-01-23 15:22:05 +0000 (Wed, 23 Jan 2008) | 3 lines
  
  Added support for conditional borders (and paddings) in tables.
  The proper borders are not selected yet between the header/footer and the body. There might still be a few glitches in some cases
................
  r614845 | vhennebert | 2008-01-24 11:32:07 +0000 (Thu, 24 Jan 2008) | 2 lines
  
  Removed the no longer needed maxColumnCount parameter
................
  r614920 | vhennebert | 2008-01-24 16:40:46 +0000 (Thu, 24 Jan 2008) | 6 lines
  
  Cleanup:
  - renamed startRow/startCol into rowIndex/colIndex
  - improved javadoc of PrimaryGridUnit.getRowIndex()
  - moved colIndex from GridUnit into PrimaryGridUnit since it's only needed there
  - simplified EmptyGridUnit constructor
................
  r614924 | vhennebert | 2008-01-24 16:51:53 +0000 (Thu, 24 Jan 2008) | 2 lines
  
  Removed no longer needed reference to TableColumn in GridUnit
................
  r614964 | vhennebert | 2008-01-24 19:56:05 +0000 (Thu, 24 Jan 2008) | 2 lines
  
  Replaced 'non-lead' with 'normal'
................
  r614966 | vhennebert | 2008-01-24 19:59:20 +0000 (Thu, 24 Jan 2008) | 2 lines
  
  Added license header
................
  r614993 | vhennebert | 2008-01-24 21:10:22 +0000 (Thu, 24 Jan 2008) | 2 lines
  
  Bugzilla #44289: Wrong border resolution when header/footer omitted at break
................
  r615144 | jeremias | 2008-01-25 08:26:54 +0000 (Fri, 25 Jan 2008) | 1 line
  
  Added support for DOMSource to Preloader SVG so a URI Resolver can be written that provides the SVG as a W3C SVG DOM.
................
  r615164 | jeremias | 2008-01-25 09:59:29 +0000 (Fri, 25 Jan 2008) | 1 line
  
  Fix exception when closing Source that doesn't have any streams.
................
  r615197 | jeremias | 2008-01-25 12:14:52 +0000 (Fri, 25 Jan 2008) | 1 line
  
  Improved error tolerance: an enum property value with leading or trailing spaces is still recognized. Example: content-width="scale-to-fit "
................
  r615251 | vhennebert | 2008-01-25 15:52:53 +0000 (Fri, 25 Jan 2008) | 2 lines
  
  Fixed a bug in computeContentLength when there are empty cells
................
  r615598 | adelmelle | 2008-01-27 13:35:39 +0000 (Sun, 27 Jan 2008) | 4 lines
  
  Bugzilla #44286:
  Fixed a memory-leak in XMLWhiteSpaceHandler.
  Submitted by: Stefan Ziel <stefan.ziel.at.claninfo.ch>
................
  r615604 | vhennebert | 2008-01-27 14:09:12 +0000 (Sun, 27 Jan 2008) | 2 lines
  
  Of course startIndex == endIndex means there is one element whose length must be computed... Changed >= into >
................
  r615845 | jeremias | 2008-01-28 10:32:46 +0000 (Mon, 28 Jan 2008) | 1 line
  
  Improve breaking for block-container and static-content so there are no more "breaking artifacts" (like additional border lines) in the overflowing part of the content anymore. This is done by removing all breaks from the result list prior to constructing the area tree. The presence of breaks simply indicates that there is an overflow.
................
  r615906 | jeremias | 2008-01-28 15:04:39 +0000 (Mon, 28 Jan 2008) | 2 lines
  
  Added support for the natural language indentifier ("Lang" in the document catalog) for PDF documents based on the language/country values on fo:page-sequence. This required a few changes in the AreaTreeModel and the Renderer interface because it didn't support passing through the PageSequence object, only its title. Now, we can put other values on the PageSequence and transport them to the renderers.
................
  r615917 | jeremias | 2008-01-28 15:45:10 +0000 (Mon, 28 Jan 2008) | 1 line
  
  A note on country/language.
................
  r616080 | jeremias | 2008-01-28 22:05:39 +0000 (Mon, 28 Jan 2008) | 1 line
  
  Bugfix for invalid numTables entry in subset TrueType fonts if there was no "fpgm" table (Example: FreeSerif).
................
  r616191 | jeremias | 2008-01-29 07:30:08 +0000 (Tue, 29 Jan 2008) | 1 line
  
  A more detailed comment on RTF output explaining that RTF has limitations besides the incomplete implementation on the FOP side.
................
  r616260 | vhennebert | 2008-01-29 11:15:29 +0000 (Tue, 29 Jan 2008) | 2 lines
  
  Added more tests to ensure no weird things occurs when keep-with-previous/next is set on table. Runs ok
................
  r616334 | vhennebert | 2008-01-29 14:15:52 +0000 (Tue, 29 Jan 2008) | 2 lines
  
  Renamed testcase for clarity
................
  r616485 | vhennebert | 2008-01-29 19:12:58 +0000 (Tue, 29 Jan 2008) | 2 lines
  
  Replaced testcases for forced break on table-row with more complete ones. Tests failing because of bug #44320 have been commented out and will need to be re-enabled once the bug is fixed
................
  r616691 | jeremias | 2008-01-30 08:53:48 +0000 (Wed, 30 Jan 2008) | 1 line
  
  "cvt ", "fpgm" and "prep" are all optional tables in TrueType. Some PDF viewers fail because FOP didn't handle those correctly.
................
  r616694 | jeremias | 2008-01-30 09:05:30 +0000 (Wed, 30 Jan 2008) | 1 line
  
  Removing the previous entry because the new one basically covers the other, too.
................
  r616798 | jeremias | 2008-01-30 16:03:00 +0000 (Wed, 30 Jan 2008) | 1 line
  
  Removed the Dijkstra stuff as it was moved to Commons.
................
  r617126 | jeremias | 2008-01-31 13:44:46 +0000 (Thu, 31 Jan 2008) | 1 line
  
  Update lib README based on recent findings.
................
  r617473 | jeremias | 2008-02-01 11:11:02 +0000 (Fri, 01 Feb 2008) | 1 line
  
  Implemented drawRenderedImage() which fixes painting of PNG images embedded inside SVG images.
................
  r617512 | jeremias | 2008-02-01 14:58:30 +0000 (Fri, 01 Feb 2008) | 4 lines
  
  AlphaRasterImage now knows how to deal with TYPE_INT Rasters.
  Streamlined image handling in Graphics2D.
  Support natively handling CCITT images in SVG images.
  Add fallback to device RGB if sRGB isn't set up as the default color space in PDF.
................
  r617531 | jeremias | 2008-02-01 16:02:33 +0000 (Fri, 01 Feb 2008) | 2 lines
  
  Move sRGB installation into the PDF library. That way it can be used in PDFDocumentGraphics2D, too (via AbstractImageAdapter).
  Ensures correct handling of sRGB images in PDFTranscoder.
................
  r617550 | jeremias | 2008-02-01 16:31:24 +0000 (Fri, 01 Feb 2008) | 1 line
  
  Add a note about color space overrides which currently aren't supported for natively handled images, yet.
................
  r617708 | adelmelle | 2008-02-01 23:30:13 +0000 (Fri, 01 Feb 2008) | 5 lines
  
  Bugzilla 44343:
  Fixed a bug when using relative (smaller/larger) font-sizes in combination with percentages.
  Percentages now resolved as per the spec (XSL-FO 1.1 7.9.4):
  "A percentage value specifies an absolute font size relative to the parent element's font-size."
................
  r617716 | adelmelle | 2008-02-02 00:06:29 +0000 (Sat, 02 Feb 2008) | 4 lines
  
  Minor cleanup/improvement:
  - FontSizePropertyMaker: remove redundant casts (FixedLength already casts the doubles internally)
  - FixedLength: reduce visibility of 'fishy' convert() method (not used anywhere else)
................
  r617765 | jeremias | 2008-02-02 06:45:39 +0000 (Sat, 02 Feb 2008) | 1 line
  
  Fixed transcoder test after yesterday's changes.
................
  r617812 | adelmelle | 2008-02-02 15:13:40 +0000 (Sat, 02 Feb 2008) | 6 lines
  
  Further cleanup/refinement of FixedLength:
  * improve consistency in use of the PropertyCache
    remove public constructor ->  replaced by getInstance() in a handful of classes
  * added a sourceResolution parameter to getInstance() and the private
    constructor to allow better handling of device-dependent units (px)
................
  r617907 | adelmelle | 2008-02-02 22:11:12 +0000 (Sat, 02 Feb 2008) | 4 lines
  
  Further improvement in FixedLength:
  * added a special ZERO_FIXED_LENGTH instance
  * store only non-zero values in the PropertyCache
................
  r617909 | adelmelle | 2008-02-02 22:18:30 +0000 (Sat, 02 Feb 2008) | 2 lines
  
  Slight correction for pixel-values: pass the ratio of pixels-per-point into FixedLength.getInstance()
................
  r617976 | adelmelle | 2008-02-03 12:05:49 +0000 (Sun, 03 Feb 2008) | 5 lines
  
  Added very basic parsing for the xml:lang shorthand.
  No validation of the specified value, but the language and country
  properties now do take the shorthand into account to determine their
  value.
................
  r617989 | adelmelle | 2008-02-03 14:11:40 +0000 (Sun, 03 Feb 2008) | 5 lines
  
  Bugzilla 43705:
  Fixed a bug when the rgb-icc() function was used before the fo:declarations,
  or in documents without fo:declarations. Function now correctly (?) reverts
  to the sRGB fallback in those cases.
................
  r618239 | vhennebert | 2008-02-04 11:25:13 +0000 (Mon, 04 Feb 2008) | 2 lines
  
  Fixed minor typo I stumbled upon while doing something completely unrelated
................
  r618470 | adelmelle | 2008-02-04 22:26:53 +0000 (Mon, 04 Feb 2008) | 1 line
  
  Added testcase for Bugzilla 44343
................
  r618626 | jeremias | 2008-02-05 12:34:56 +0000 (Tue, 05 Feb 2008) | 1 line
  
  Change PDFPage to use PDFDictionary in order to make it possible to better set MediaBox/TrimBox/BleedBox.
................
  r618627 | jeremias | 2008-02-05 12:35:42 +0000 (Tue, 05 Feb 2008) | 1 line
  
  FOX_TRANSFORM constant should be static.
................
  r618992 | jeremias | 2008-02-06 14:07:03 +0000 (Wed, 06 Feb 2008) | 4 lines
  
  Bugzilla #36391:
  Fixed problem with positioning of content when reference-orientation="180" is used. CTM is now correct. It is updated after the height of the content is known. Instead of somehow inverting the element list, I've simply declared this case non-breakable, i.e. I generate one box.
  
  Fixed a few other problems mostly occurring when rotating block-container content by 90 or 270 degrees plus a few remaining auto-height handling problems. This involved switching off some sometimes unwanted side-effects from auto-updating the BPD in some area classes.
................
  r619417 | jeremias | 2008-02-07 14:02:44 +0000 (Thu, 07 Feb 2008) | 1 line
  
  Added an option to disable the default sRGB profile in PDF output for those who don't care about color fidelity, but care about PDF file size. Note that this option is not possible if PDF/A, PDF/X or an output profile is used. Makes simple PDFs about 4KB smaller. Ha!
................
  r619461 | jeremias | 2008-02-07 15:42:03 +0000 (Thu, 07 Feb 2008) | 2 lines
  
  Bugfix for date formatting with negative time zones in the PDF's Info object.
  Update of xmlgraphics-commons-1.3.jar because of a similar bug with formatting dates in XMP.
................
  r619670 | adelmelle | 2008-02-07 22:32:27 +0000 (Thu, 07 Feb 2008) | 1 line
  
  Tweak: early percentage resolution by the parser (if the base is known and absolute). Reduces the number of PercentLength instances in favor of cached FixedLengths.
................
  r619674 | adelmelle | 2008-02-07 22:41:26 +0000 (Thu, 07 Feb 2008) | 3 lines
  
  Tweak: modify PercentLength.toString() to return a value that facilitates debugging.
  Moved the original code to a getString() implementation, which is now used by the fotree test suite.
................
  r619790 | jeremias | 2008-02-08 07:27:06 +0000 (Fri, 08 Feb 2008) | 1 line
  
  Added a clarification that this bug affected PDF/A compliance.
................
  r619854 | vhennebert | 2008-02-08 12:11:04 +0000 (Fri, 08 Feb 2008) | 3 lines
  
  Removed the 900 penalty mechanism which anyway almost always produced visually bad results. Now the first step for a row is computed so that each cell starting on it can contribute some content.
  Used a similar mechanism to replace backtracking: the current row is now allowed to grow as long as there is not enough space on the current page to make the next row fit. The next row is "delayed", so this mechanism is called "row-delaying"
................
  r619856 | vhennebert | 2008-02-08 12:14:01 +0000 (Fri, 08 Feb 2008) | 2 lines
  
  Also display the column index in the toString method
................
  r619870 | jeremias | 2008-02-08 13:23:47 +0000 (Fri, 08 Feb 2008) | 1 line
  
  Added missing width for Euro glyph.
................
  r619923 | vhennebert | 2008-02-08 15:59:21 +0000 (Fri, 08 Feb 2008) | 2 lines
  
  Testcase for bug #43676, which is now fixed
................
  r619979 | spepping | 2008-02-08 19:20:27 +0000 (Fri, 08 Feb 2008) | 5 lines
  
  In addKnuthElementsForBorderPaddingXXX, if the returnlist is a
  BlockKnuthSequence, the border and padding should be added to the
  first or last paragraph inside it, but it is too late to do that
  now. At least, avoid adding it to the bpd sequence.
................
  r620272 | adelmelle | 2008-02-10 12:31:46 +0000 (Sun, 10 Feb 2008) | 5 lines
  
  Some minor tweaks:
  * added convenience shortcut to PropertyInfo to get to the user agent.
  * replaced occurrences to use the shortcut in PropertyParser and RGBColorFunction.
  * PropertyParser -> 0% of a length always yields FixedLength.ZERO_FIXED_LENGTH
................
  r620276 | adelmelle | 2008-02-10 12:50:47 +0000 (Sun, 10 Feb 2008) | 3 lines
  
  Revisit background-position shorthand implementation: always convert to percentages (more possibilities/precision).
................
  r620277 | adelmelle | 2008-02-10 13:01:07 +0000 (Sun, 10 Feb 2008) | 2 lines
  
  Tweak: wrap numeric values internally in Integers or Longs if possible, Doubles only if necessary.
................
  r620278 | adelmelle | 2008-02-10 13:07:34 +0000 (Sun, 10 Feb 2008) | 2 lines
  
  Missing file from r620272
................
  r620283 | adelmelle | 2008-02-10 13:17:20 +0000 (Sun, 10 Feb 2008) | 5 lines
  
  Correction/Rectification of changes made in r617989:
  * adjustment in ColorUtil to cater for the change
  * added check to the color_1.xml testcase, checking for bug 43705
................
  r620285 | adelmelle | 2008-02-10 13:42:39 +0000 (Sun, 10 Feb 2008) | 3 lines
  
  Bugzilla 41631: Percentage resolution for arguments to proportional-column-width()
................
  r620558 | vhennebert | 2008-02-11 18:10:09 +0000 (Mon, 11 Feb 2008) | 2 lines
  
  Added full support for breaks inside table-cell elements
................
  r620559 | vhennebert | 2008-02-11 18:11:09 +0000 (Mon, 11 Feb 2008) | 2 lines
  
  Fixed illegal character in the file
................
  r620565 | vhennebert | 2008-02-11 18:18:13 +0000 (Mon, 11 Feb 2008) | 2 lines
  
  Better javadoc for break class
................
  r620567 | vhennebert | 2008-02-11 18:24:00 +0000 (Mon, 11 Feb 2008) | 2 lines
  
  Disabled region-body_column-count_bug#37468 testcase because of bug 44393
................
  r620570 | adelmelle | 2008-02-11 18:36:14 +0000 (Mon, 11 Feb 2008) | 1 line
  
  Missing file from r620283
................
  r620723 | jeremias | 2008-02-12 08:23:04 +0000 (Tue, 12 Feb 2008) | 2 lines
  
  Bugzilla #44393:
  Recognize the newly used EN_AUTO constant for break values. Other LMs generate a -1 value for this case.
................
  r620750 | jeremias | 2008-02-12 10:45:50 +0000 (Tue, 12 Feb 2008) | 1 line
  
  Simplification.
................
  r620761 | vhennebert | 2008-02-12 11:12:25 +0000 (Tue, 12 Feb 2008) | 2 lines
  
  Fixed wrong numbering of cells
................
  r627318 | maxberger | 2008-02-13 09:12:25 +0000 (Wed, 13 Feb 2008) | 1 line
  
  Added *.xml to svn:ignore
................
  r627324 | maxberger | 2008-02-13 09:35:01 +0000 (Wed, 13 Feb 2008) | 1 line
  
  Ensured all SVN properties are set equally
................
  r627367 | maxberger | 2008-02-13 12:03:30 +0000 (Wed, 13 Feb 2008) | 1 line
  
  Ensured all SVN properties are set equally
................
  r627495 | jeremias | 2008-02-13 15:55:34 +0000 (Wed, 13 Feb 2008) | 1 line
  
  Replace useless javadoc comment.
................
  r627497 | jeremias | 2008-02-13 15:57:01 +0000 (Wed, 13 Feb 2008) | 1 line
  
  Easy way to force the discarding of the user's font cache file (especially after the recent changes).
................
  r627553 | vhennebert | 2008-02-13 18:11:06 +0000 (Wed, 13 Feb 2008) | 2 lines
  
  Added support for breaks before and after table cells
................
  r627576 | vhennebert | 2008-02-13 20:10:01 +0000 (Wed, 13 Feb 2008) | 2 lines
  
  Moved to the FO tree stage the check for break-before/after on table-row while spanning in progress, and fixed bug #44321 as well
................
  r627679 | jeremias | 2008-02-14 08:12:34 +0000 (Thu, 14 Feb 2008) | 10 lines
  
  Added support for Type 1 fonts which don't use the AdobeStandardEncoding for PDF and PS output. Details:
  Added an Type 1 AFM parser (only basic ltr script fonts are properly supported).
  Font loading changed slightly to allow loading an AFM in addition to a PFM.
  Added some mapping functionality to CodePointMapping. Now we also build custom CodePointMapping instances from AFM files and use it in SingleByteFonts.
  Changed more PDF object classes to make use of the generic PDFDictionary and PDFArray base classes.
  Type 1 Fonts with a special encoding now register their encoding in the Encoding value of the font dictionary so the mapping is correct. For PS this isn't necessary as the interpreter just uses the font's default encoding.
  Refactored CMap building code to it can also be used outside the PDF context. A CMap can now also be built from a single byte encoding.
  Update of XML Graphics Commons snapshot.
................
  r627698 | acumiskey | 2008-02-14 10:12:48 +0000 (Thu, 14 Feb 2008) | 3 lines
  
  When I first saw this it surprised me, it seems to have been here for quite some time.
  The code block directly following this if/else condition was identical so I removed the copy/paste duplication and refactored it.
................
  r627702 | jeremias | 2008-02-14 10:41:26 +0000 (Thu, 14 Feb 2008) | 2 lines
  
  Fix problem with alternate Unicode code point overriding existing better ones in CodePointMapping (ex. a char code for NBSP was used in place of SPACE for non-standard encodings).
  Made PFM completely optional if an AFM is available. Widths and Kerning are now also read from the AFM. Fallbacks for missing values are in place. If both AFM and PFM are available, both are used to get the best possible result for certain metrics.
................
  r627712 | vhennebert | 2008-02-14 11:36:01 +0000 (Thu, 14 Feb 2008) | 2 lines
  
  Simplified the detection of double as integer
................
  r627719 | maxberger | 2008-02-14 11:57:05 +0000 (Thu, 14 Feb 2008) | 1 line
  
  Created Constants for unit descriptions
................
  r627721 | vhennebert | 2008-02-14 12:09:05 +0000 (Thu, 14 Feb 2008) | 2 lines
  
  break-after set on the last child of a row-spanning cell must apply to the last row spanned by the cell
................
  r628140 | vhennebert | 2008-02-15 18:33:12 +0000 (Fri, 15 Feb 2008) | 2 lines
  
  rowStarted doesn't need to be set in the signalNewRow method. If it is, it will prevent the startTablePart event from being triggered on RowGroupBuilder, in addChildNode. This will lead to a NPE being thrown in CollapsingBorderResolver because it would be improperly set up.
................
  r628280 | jeremias | 2008-02-16 12:28:48 +0000 (Sat, 16 Feb 2008) | 7 lines
  
  Extracted most of the code in CodePointMapping (generated by XSLT) into a base class for easier maintenance and proper Javadocs.
  Deprecated FOP's copy of Glyphs.java.
  Took a different approach at handling mapping alternatives for single-byte fonts. The AFM now only lists the main character. Substitution is done through Glyphs.java later in CodePointMapping.
  Fixed a problem in Type1FontLoader where the PFM overrides asc/desc/cap/x even though the AFM provides the values. It showed itself because the URW Symbol font has wrong values in the PFM.
  Added a note to myself in Type1FontLoader to implement the "Flags" value. The whole thing still seems to work without that part.
  Added a glyph name list to the CodePointMapping so we can work with the original list from the AFM. Otherwise, various mapping operations to and from resulted in unwanted mappings (because the mappings are not necessarily 1:1) and in the end the PDF received an incorrect Encoding map. Now there's no such problem anymore.
................
  r628652 | jeremias | 2008-02-18 09:00:08 +0000 (Mon, 18 Feb 2008) | 1 line
  
  No stack traces with missing images.
................
  r628668 | jeremias | 2008-02-18 09:41:03 +0000 (Mon, 18 Feb 2008) | 2 lines
  
  Extract original exception in BasePDFTestCase.java. They are normally embedded in a TransformerException and sometimes additionally in a SAXException (depending on the JAXP implementation).
  Restore validation for Base14 font check when PDF/A is active. Got lost when I refactored to generic structures in the PDF library.
................
  r628775 | jeremias | 2008-02-18 15:02:39 +0000 (Mon, 18 Feb 2008) | 2 lines
  
  fop-rgb-icc() function did not make the round-trip which caused an error in the color_1.xml test case (intermediate format tests). Added a unit test to test the parsing and round-trip.
  Documented the cmyk() function.
................
  r628804 | jeremias | 2008-02-18 16:45:18 +0000 (Mon, 18 Feb 2008) | 1 line
  
  Reducing noise. Better messages.
................
  r628816 | jeremias | 2008-02-18 17:06:39 +0000 (Mon, 18 Feb 2008) | 1 line
  
  It currently doesn't work properly without a layout-master-set.
................
  r628826 | jeremias | 2008-02-18 17:24:23 +0000 (Mon, 18 Feb 2008) | 1 line
  
  Made the necessary changes to remove the long-standing deprecations in the apps package as discussed.
................
  r628829 | jeremias | 2008-02-18 17:30:15 +0000 (Mon, 18 Feb 2008) | 1 line
  
  Makes sense to mention the removal of deprecated methods.
................
  r629048 | vhennebert | 2008-02-19 09:36:23 +0000 (Tue, 19 Feb 2008) | 2 lines
  
  Style only: removed spurious ^M characters at the end of lines
................
  r629093 | jeremias | 2008-02-19 13:08:39 +0000 (Tue, 19 Feb 2008) | 9 lines
  
  Bugzilla #44451:
  The patch fixes two problems:
  - If distinct fonts declare the same font family name, the resulting font mapping is currently arbitrary; now, a name-similarity heuristic is used to prioritize the font mappings.
  - "Medium" and "demi" fonts are now recognized as "bold", solving several real-world problems (although this solution may be an oversimplification).
  Submitted by: Justus Piater <justus-bulk.at.piater.name>
  
  Patch modified by jeremias:
  - Style fixes (tab chars)
  - Refined font weight identification: medium -> 500, semi/demi -> 600
................
  r629103 | jeremias | 2008-02-19 14:16:08 +0000 (Tue, 19 Feb 2008) | 1 line
  
  Bugfix: a specified font-weight of 100 could result into a resolved font-weight of 400 even when a font with weight 200 is registered.
................
  r629129 | jeremias | 2008-02-19 15:43:31 +0000 (Tue, 19 Feb 2008) | 1 line
  
  Fixed NPE when no AFM is available and the PFM didn't provide a xHeight.
................
  r629131 | jeremias | 2008-02-19 15:47:48 +0000 (Tue, 19 Feb 2008) | 2 lines
  
  Added support for reading the OS/2 table's usWeightClass value which supports the same font weight values as we use in XSL-FO.
  However, in my tests these values proved to be unreliable (like ExtraBlack fonts returning 400). I just hooked the whole thing in so this work isn't lost if anyone has an idea to make it work. The FontInfoFinder will continue to only use guessed font weights for now.
................
  r629169 | vhennebert | 2008-02-19 17:32:18 +0000 (Tue, 19 Feb 2008) | 2 lines
  
  Fixed a bug leading to the content of row-spanning cells being duplicated at page breaks, when it's small enough to fit on the previous row
................
  r629769 | maxberger | 2008-02-21 12:52:33 +0000 (Thu, 21 Feb 2008) | 1 line
  
  Moved me to commiters :)
................
  r629902 | maxberger | 2008-02-21 18:22:22 +0000 (Thu, 21 Feb 2008) | 1 line
  
  Turned on XInclude processing for the main source given on the command line.
................
  r630215 | maxberger | 2008-02-22 14:17:20 +0000 (Fri, 22 Feb 2008) | 2 lines
  
  Fixed backward compatiblity with 1.4
................
  r630772 | jeremias | 2008-02-25 09:17:43 +0000 (Mon, 25 Feb 2008) | 1 line
  
  Bugfix: When scale-up/down-to-fit was used, the image scaling rule was not always respected.
................
  r630814 | vhennebert | 2008-02-25 11:30:43 +0000 (Mon, 25 Feb 2008) | 5 lines
  
  - added full support for keep-with-previous on table-row and in table-cell
  - added more testcases for keeps in tables
  - assign the right table-row element to grid units that are not on the first row spanned
  - slightly re-worked the RowGroupBuilder interface to make it more SAX-like
................
  r631178 | jeremias | 2008-02-26 11:07:20 +0000 (Tue, 26 Feb 2008) | 3 lines
  
  Reverted revision 603590 which broke the AFP renderer. The other changes after revision 603590 should be preserved as well as possible, including the switch to the new image library.
  Adjustments for change in behaviour of the block viewport CTM.
  Bugfix: SVG painting is now always done on a color canvas (like for PCL) because Batik cannot handle gradients on a grayscale canvas.
................
  r631226 | jeremias | 2008-02-26 14:30:50 +0000 (Tue, 26 Feb 2008) | 1 line
  
  GOCA support temporarily removed.
................
  r631276 | vhennebert | 2008-02-26 16:23:15 +0000 (Tue, 26 Feb 2008) | 2 lines
  
  Moved the getBody method into PrimaryGridUnit, since it's only needed there and that allows to simplify EmptyGridUnit
................
  r631575 | jeremias | 2008-02-27 13:00:54 +0000 (Wed, 27 Feb 2008) | 2 lines
  
  Bugzilla #44497:
  AFP Renderer: Bugfix for broken reference orientation on absolutely positioned block-containers.
................
  r631609 | vhennebert | 2008-02-27 15:09:06 +0000 (Wed, 27 Feb 2008) | 2 lines
  
  bpBeforeNormal and bpAfterNormal already include border-separation, no need to re-substract it from the box height
................
  r631984 | jeremias | 2008-02-28 14:30:46 +0000 (Thu, 28 Feb 2008) | 2 lines
  
  Slight improvement for thin lines in Java2D/AWT output.
  Submitted by: Gordon Cooke <cookeg.at.btinternet.com>
................
  r632121 | adelmelle | 2008-02-28 21:29:04 +0000 (Thu, 28 Feb 2008) | 6 lines
  
  Minor tweaks/updates:
  - change toString() to getLocalizedMessage() for exceptions passed to warning()
  - removed deprecated method isLocatorDisabled()
  - removed superfluous try-catch block
  - some javadoc changes
................
  r632122 | adelmelle | 2008-02-28 21:33:11 +0000 (Thu, 28 Feb 2008) | 2 lines
  
  Minor tweak: switch from toString() to getLocalizedMessage() for Exceptions passed into warning()
................
  r632321 | jeremias | 2008-02-29 14:03:01 +0000 (Fri, 29 Feb 2008) | 1 line
  
  Bugfix: Disabled setting widths from AFM since we're using WinAnsiEncoding internally but the AFM delivers the character widths using the font's native encoding which causes problems with some characters.
................
  r632558 | clay | 2008-03-01 07:10:03 +0000 (Sat, 01 Mar 2008) | 1 line
  
  Preparing for FOP 0.95 release.
................
  r632716 | clay | 2008-03-02 06:42:02 +0000 (Sun, 02 Mar 2008) | 1 line
  
  Adding Quick Start Guide.
................
  r632784 | jeremias | 2008-03-02 16:53:24 +0000 (Sun, 02 Mar 2008) | 1 line
  
  Further preparations for the 0.95 release. This was tested with the latest Forrest Trunk (which uses FOP 0.94 for the PDFs).
................
  r632938 | clay | 2008-03-03 04:44:28 +0000 (Mon, 03 Mar 2008) | 2 lines
  
  Updated the Apache FOP Quick Start to include a 'Hello World' document and make it more geared toward newbies (thanks Jeremias!).
................
  r632972 | jeremias | 2008-03-03 07:51:14 +0000 (Mon, 03 Mar 2008) | 1 line
  
  Tried to make font configuration easier to understand by splitting the basics from the advanced stuff. Otherwise, people will believe for the next 100 years that generating XML font metrics file is still always necessary.
................
  r633389 | jeremias | 2008-03-04 08:37:05 +0000 (Tue, 04 Mar 2008) | 1 line
  
  Removed 0.93 and 0.94, added 0.95. There's no noticeable difference between 0.94 and 0.95 so I removed a column to regain some space.
................
  r633390 | jeremias | 2008-03-04 08:38:36 +0000 (Tue, 04 Mar 2008) | 1 line
  
  Switched to Commons 1.3 being released.
................
  r633391 | jeremias | 2008-03-04 08:39:12 +0000 (Tue, 04 Mar 2008) | 1 line
  
  Added ApacheCon US 2008.
................
  r633396 | jeremias | 2008-03-04 09:06:03 +0000 (Tue, 04 Mar 2008) | 1 line
  
  Various updates.
................
  r633397 | jeremias | 2008-03-04 09:15:50 +0000 (Tue, 04 Mar 2008) | 1 line
  
  Using Forrest Trunk from now on (in order to use FOP 0.94 for PDFs). We'll switch to a stable release as soon as a release with a new FOP version is available.
................
  r633437 | jeremias | 2008-03-04 11:50:34 +0000 (Tue, 04 Mar 2008) | 3 lines
  
  Renamed to 0.95beta.
  Made changes and release notes work again by switching to the projectInfo plug-in rather than relying on our local copy of the stylesheets. There's a little bug (missing images) in the release notes for which I submitted a patch (https://issues.apache.org/jira/browse/FOR-1076) to Forrest.
  Brought status.xml more in line with the official status DTD.
................
  r633460 | jeremias | 2008-03-04 12:59:57 +0000 (Tue, 04 Mar 2008) | 1 line
  
  Copyright year
................
  r633470 | jeremias | 2008-03-04 13:25:12 +0000 (Tue, 04 Mar 2008) | 1 line
  
  Noted some of the major change areas in this release.
................
  r633473 | jeremias | 2008-03-04 13:40:11 +0000 (Tue, 04 Mar 2008) | 2 lines
  
  Ha! Almost forgot the most important change: Java 1.4!
  Plus a note on image libraries.
................
  r633525 | jeremias | 2008-03-04 16:13:17 +0000 (Tue, 04 Mar 2008) | 1 line
  
  Bugfix: Without the system ID (base URI), the XSLT processor cannot resolve document(<uri>, .) function calls correctly.
................
  r633557 | jeremias | 2008-03-04 17:30:40 +0000 (Tue, 04 Mar 2008) | 1 line
  
  Bugfix: If there's shrink available in an auto-height situation, the difference is now set to 0 in order to avoid unwanted effects. IOW, never shrink in an auto-height situation.
................
  r633559 | jeremias | 2008-03-04 17:35:52 +0000 (Tue, 04 Mar 2008) | 2 lines
  
  Update FOP poster for OpenExpo 2008 in Bern.
  This fixes various warnings, updates the history and simplifies configuration (if you're on Windows, it will work out of the box because all fonts are available).
................
  r633561 | jeremias | 2008-03-04 17:39:08 +0000 (Tue, 04 Mar 2008) | 1 line
  
  Update README.
................
  r633961 | vhennebert | 2008-03-05 18:22:06 +0000 (Wed, 05 Mar 2008) | 5 lines
  
  - Fixed the rendering of the area of a table corresponding to border-separation, which must be filled with the background of the table, and not the rows.
  - Improved conformance: even if a table-cell spans several rows its background must correspond to the first row spanned.
  - Added support for background on fo:table-column and fo:table-header/footer/body
    TODO more testcases needed, especially tables with collapsing border model and tables broken over pages
................
  r634187 | jeremias | 2008-03-06 08:21:06 +0000 (Thu, 06 Mar 2008) | 1 line
  
  Added some notes on getting the same output for PDF/PS and Java2D-based renderers.
................
  r635508 | jeremias | 2008-03-10 10:06:37 +0000 (Mon, 10 Mar 2008) | 4 lines
  
  Fixed NPE in BlockContainerLayoutManager when used as a child of an inline-level FO. Split IP and BP stack limits in LayoutContext (there's now a certain amount of redundancy with "refIPD" in LayoutContext which I didn't resolve).
  Areas are now generated for block-level FOs when used as children of inline-level FOs.
  ClassCastException in ListLayoutManager.mustKeepTogether() fixed (occured if used as child of an inline-level FO).
................
  r635686 | vhennebert | 2008-03-10 20:52:43 +0000 (Mon, 10 Mar 2008) | 2 lines
  
  Bugfix: forced break ignored when the minimum height of a table-row isn't reached
................
  r635701 | jeremias | 2008-03-10 21:28:08 +0000 (Mon, 10 Mar 2008) | 1 line
  
  Need to clean up after myself.
................
  r635741 | jeremias | 2008-03-10 22:39:38 +0000 (Mon, 10 Mar 2008) | 1 line
  
  Bugfix for row/body/col background painting when padding is used in the table-cells.
................
  r635884 | vhennebert | 2008-03-11 11:02:27 +0000 (Tue, 11 Mar 2008) | 2 lines
  
  Fixed a copy-paste error (getPaddingStart instead of getPaddingEnd)
................
  r635961 | vhennebert | 2008-03-11 15:05:27 +0000 (Tue, 11 Mar 2008) | 2 lines
  
  Forgot to add the testcase for forced break vs explicit row height in revision 635686
................
  r635967 | vhennebert | 2008-03-11 15:13:51 +0000 (Tue, 11 Mar 2008) | 2 lines
  
  Updated the disabled-testcases.xml file: re-enabled testcases which could easily be updated, removed the other ones which anyway were superseded by more complete ones
................
  r636276 | vhennebert | 2008-03-12 10:51:09 +0000 (Wed, 12 Mar 2008) | 2 lines
  
  Since compliance.ihtml is now the source file and it would cost too much to revert to an xml version, tidied the file a bit. No content change.
................
  r636293 | vhennebert | 2008-03-12 12:14:51 +0000 (Wed, 12 Mar 2008) | 2 lines
  
  Updated the compliance page. Re-added the 0.94 column since there are some noteworthy changes between the 0.94 and 0.95 versions
................
  r636295 | vhennebert | 2008-03-12 12:19:15 +0000 (Wed, 12 Mar 2008) | 3 lines
  
  Update of the documentation before the release.
  Added notes about improved checks and conformance in tables.
................
  r636405 | vhennebert | 2008-03-12 16:25:52 +0000 (Wed, 12 Mar 2008) | 2 lines
  
  Initialized merge tracking via "svnmerge" from the 0.95 branch
................
  r636409 | vhennebert | 2008-03-12 16:36:29 +0000 (Wed, 12 Mar 2008) | 8 lines
  
  Blocked revisions 636406 via svnmerge
  
  ........
    r636406 | vhennebert | 2008-03-12 16:28:00 +0000 (Wed, 12 Mar 2008) | 2 lines
    
    Set the version to 0.95beta
  ........
................
  r636471 | vhennebert | 2008-03-12 19:24:05 +0000 (Wed, 12 Mar 2008) | 2 lines
  
  Removed no longer used borderAndPaddingBPD field
................
  r637057 | jeremias | 2008-03-14 11:15:24 +0000 (Fri, 14 Mar 2008) | 2 lines
  
  Bugzilla #44412:
  Bugfix: When there was a forced break after a block with (conditional) borders the border-after wasn't painted.
................
  r637076 | vhennebert | 2008-03-14 12:22:44 +0000 (Fri, 14 Mar 2008) | 2 lines
  
  Reverting changes of rev. 637057. I applied the changes to the 0.95 branch instead so that they make their way into the 0.95 release. I will merge them back to the Trunk via svnmerge
................
  r638396 | vhennebert | 2008-03-18 15:01:43 +0000 (Tue, 18 Mar 2008) | 53 lines
  
  Merged revisions 636400-636405,636407-638388 via svnmerge from 
  https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95
  
  ........
    r636403 | vhennebert | 2008-03-12 16:24:48 +0000 (Wed, 12 Mar 2008) | 2 lines
    
    Updated copyright years
  ........
    r637075 | vhennebert | 2008-03-14 12:19:45 +0000 (Fri, 14 Mar 2008) | 4 lines
    
    Bugzilla #44412:
    Bugfix: When there was a forced break after a block with (conditional) borders the border-after wasn't painted.
    Changes made by Jeremias
  ........
    r637119 | jeremias | 2008-03-14 14:41:03 +0000 (Fri, 14 Mar 2008) | 2 lines
    
    Bugzilla #44412:
    Bugfix: The before border of a block is no longer swallowed if its first child issues a break-before.
  ........
    r637791 | jeremias | 2008-03-17 08:59:51 +0000 (Mon, 17 Mar 2008) | 3 lines
    
    Removed old image adapters.
    Removed support for Java 1.3 building as it didn't work anymore anyway.
    Added a check to require Java 1.4 for building.
  ........
    r637857 | jeremias | 2008-03-17 12:24:33 +0000 (Mon, 17 Mar 2008) | 3 lines
    
    Partially reverted revision 637791:
    Restored JAI as a required dependency for distribution builds (used for error diffusion dithering in the PCL Renderer). It is optional otherwise.
    Updated the licensing info and release notes to make the changes clear.
  ........
    r637993 | vhennebert | 2008-03-17 17:48:44 +0000 (Mon, 17 Mar 2008) | 3 lines
    
    Bugzilla #44621: when the after border of a cell, in the trailing case, is bigger than in the normal case, the generated sequence of Knuth elements was wrong, leading to content being swallowed
    This is a partial fix only: the content is no longer swallowed, but the penalty is wrong (shorter than it should be). This will lead to the table overflowing the region-body without warning.
  ........
    r638048 | vhennebert | 2008-03-17 20:00:36 +0000 (Mon, 17 Mar 2008) | 2 lines
    
    Changed the documentation to reflect the move to Java 1.4 as a minimum requirement
  ........
    r638308 | vhennebert | 2008-03-18 10:26:32 +0000 (Tue, 18 Mar 2008) | 2 lines
    
    Simplified the getNextKnuthElements method a little bit
  ........
    r638316 | vhennebert | 2008-03-18 11:06:59 +0000 (Tue, 18 Mar 2008) | 2 lines
    
    Removed the 'jdk1.4' suffix appended to the binary artifacts. There's no point in making the distinction anymore since there is only one binary now
  ........
    r638317 | vhennebert | 2008-03-18 11:08:29 +0000 (Tue, 18 Mar 2008) | 2 lines
    
    Updated the probable date of the release
  ........
................
  r640089 | clay | 2008-03-22 21:54:27 +0000 (Sat, 22 Mar 2008) | 1 line
  
  updates to Forrest web site (expand menu structure).
................
  r640242 | adelmelle | 2008-03-23 19:36:36 +0000 (Sun, 23 Mar 2008) | 11 lines
  
  Cleanup and minor refactoring:
  * consolidate addId() in AbstractLayoutManager
  * replace getPSLM().addIdToPage(getXXX().getId()) in various LMs
  
  Smaller changes/cleanup in the affected LMs include:
  * removal of some redundant casts
  * simplified conditionals
  * avoid duplicating the reference to the FObj as much as possible:
    the reference is already stored in AbstractLM, yet every subclass seems to
    add another reference...
................
  r641742 | jeremias | 2008-03-27 08:49:41 +0000 (Thu, 27 Mar 2008) | 6 lines
  
  Added support for addressing all glyphs available in a Type 1 font, not just the ones in the font's primary encoding.
  Typeface: getEncoding() changed to getEncodingName() to make clearer what is held here.
  Some cleanup in the font classes to put the various things in more appropriate places.
  Created a common base class for all Base 14 fonts (makes the hierarchy clearer).
  Made PDFTextUtil more universally useful and made use of it in PDFRenderer, too.
  Made PDFStream.add(String) more efficient. The encoding converter is not called for each invocation anymore as the whole thing get buffered by a BufferedWriter (as suggested by the javadoc of OutputStreamWriter).
................
  r641764 | maxberger | 2008-03-27 10:02:25 +0000 (Thu, 27 Mar 2008) | 1 line
  
  Added my key
................
  r641827 | jeremias | 2008-03-27 14:29:44 +0000 (Thu, 27 Mar 2008) | 2 lines
  
  When a JPEG image is embedded, an optionally embedded color profile is filtered out as it's already embedded separately in the PDF file.
  Worked around a problem (PDF renderer) with JPEG image containing RGB color profiles which are not sRGB. The images drifted into yellow. The color profile is simply disabled in this case. Please let us know if you know what the problem could be.
................


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@643433 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-1_0
Adrian Cumiskey 16 years ago
parent
commit
068f78cf23
100 changed files with 10177 additions and 11976 deletions
  1. 23
    1
      KEYS
  2. 40
    0
      README
  3. 2
    2
      build.properties
  4. 15
    65
      build.xml
  5. 1
    1
      fop.bat
  6. 4
    3
      forrest.properties
  7. 7
    8
      forrest.properties.xml
  8. 11
    3
      lib/README.txt
  9. BIN
      lib/xmlgraphics-commons-1.4svn.jar
  10. 3
    3
      src/codegen/fonts/font-file.xsl
  11. 2
    2
      src/documentation/content/.htaccess
  12. 4
    4
      src/documentation/content/doap.rdf
  13. 0
    125
      src/documentation/content/xdocs/0.93/extensions.xml
  14. 0
    298
      src/documentation/content/xdocs/0.93/fonts.xml
  15. 0
    338
      src/documentation/content/xdocs/0.93/graphics.xml
  16. 1
    1
      src/documentation/content/xdocs/0.94/index.xml
  17. 0
    0
      src/documentation/content/xdocs/0.95/anttask.xml
  18. 4
    3
      src/documentation/content/xdocs/0.95/compiling.xml
  19. 72
    13
      src/documentation/content/xdocs/0.95/configuration.xml
  20. 10
    3
      src/documentation/content/xdocs/0.95/embedding.xml
  21. 234
    0
      src/documentation/content/xdocs/0.95/extensions.xml
  22. 410
    0
      src/documentation/content/xdocs/0.95/fonts.xml
  23. 0
    5
      src/documentation/content/xdocs/0.95/fotree/disabled-testcases.xml
  24. 551
    0
      src/documentation/content/xdocs/0.95/graphics.xml
  25. 0
    0
      src/documentation/content/xdocs/0.95/hyphenation.xml
  26. 7
    7
      src/documentation/content/xdocs/0.95/index.xml
  27. 0
    0
      src/documentation/content/xdocs/0.95/intermediate.xml
  28. 0
    32
      src/documentation/content/xdocs/0.95/known-issues.xml
  29. 7
    9
      src/documentation/content/xdocs/0.95/knownissues_overview.xml
  30. 10
    78
      src/documentation/content/xdocs/0.95/layoutengine/disabled-testcases.xml
  31. 124
    8
      src/documentation/content/xdocs/0.95/output.xml
  32. 26
    0
      src/documentation/content/xdocs/0.95/pdfa.xml
  33. 1
    10
      src/documentation/content/xdocs/0.95/pdfencryption.xml
  34. 0
    0
      src/documentation/content/xdocs/0.95/pdfx.xml
  35. 33
    32
      src/documentation/content/xdocs/0.95/running.xml
  36. 66
    1
      src/documentation/content/xdocs/0.95/servlets.xml
  37. 16
    26
      src/documentation/content/xdocs/0.95/upgrading.xml
  38. 7161
    5609
      src/documentation/content/xdocs/compliance.ihtml
  39. 2
    2
      src/documentation/content/xdocs/dev/doc.xml
  40. 1
    1
      src/documentation/content/xdocs/dev/release.xml
  41. 20
    1
      src/documentation/content/xdocs/download.xml
  42. 15
    0
      src/documentation/content/xdocs/faq.xml
  43. 4
    3
      src/documentation/content/xdocs/index.xml
  44. 124
    0
      src/documentation/content/xdocs/quickstartguide.xml
  45. 13
    12
      src/documentation/content/xdocs/site.xml
  46. 4
    4
      src/documentation/content/xdocs/status.xml
  47. 1
    7
      src/documentation/content/xdocs/tabs.xml
  48. 25
    7
      src/documentation/content/xdocs/team.xml
  49. 2
    2
      src/documentation/content/xdocs/trunk/compiling.xml
  50. 136
    74
      src/documentation/content/xdocs/trunk/fonts.xml
  51. 29
    0
      src/documentation/content/xdocs/trunk/output.xml
  52. 2
    4
      src/documentation/content/xdocs/trunk/pdfencryption.xml
  53. 1
    1
      src/documentation/content/xdocs/trunk/running.xml
  54. 3
    2
      src/documentation/poster/README.txt
  55. 0
    7
      src/documentation/poster/cfg/README.txt
  56. 0
    1817
      src/documentation/poster/cfg/VERDANA.ttf.xml
  57. 0
    1167
      src/documentation/poster/cfg/VERDANAB.ttf.xml
  58. 1
    11
      src/documentation/poster/cfg/fop.xconf
  59. 0
    925
      src/documentation/poster/cfg/lucon.ttf.xml
  60. 2
    1
      src/documentation/poster/svg/pepe-business-card.svg
  61. 10
    9
      src/documentation/poster/xml/business-card-demo.xml
  62. 5
    6
      src/documentation/poster/xml/fop-history.xml
  63. 5
    5
      src/documentation/poster/xml/fop-poster.xml
  64. 1
    1
      src/documentation/poster/xml/fop-transformation-chain.xml
  65. 1
    2
      src/documentation/poster/xml/fop-use-cases.xml
  66. 3
    3
      src/documentation/poster/xslt/common.xsl
  67. 6
    7
      src/documentation/poster/xslt/fop-poster.xsl
  68. 6
    37
      src/documentation/sitemap.xmap
  69. 14
    6
      src/documentation/skinconf.xml
  70. 0
    237
      src/java-1.4/org/apache/fop/image/ImageIOImage.java
  71. 0
    161
      src/java-1.4/org/apache/fop/image/JpegImageIOImage.java
  72. 0
    10
      src/java/org/apache/fop/apps/FopFactory.java
  73. 7
    1
      src/java/org/apache/fop/cli/InputHandler.java
  74. 3
    3
      src/java/org/apache/fop/fo/ElementMapping.java
  75. 6
    0
      src/java/org/apache/fop/fo/FOPropertyMapping.java
  76. 35
    69
      src/java/org/apache/fop/fo/FOTreeBuilder.java
  77. 0
    7
      src/java/org/apache/fop/fo/flow/table/EmptyGridUnit.java
  78. 0
    9
      src/java/org/apache/fop/fo/flow/table/GridUnit.java
  79. 14
    12
      src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java
  80. 3
    2
      src/java/org/apache/fop/fo/properties/CommonHyphenation.java
  81. 1
    1
      src/java/org/apache/fop/fo/properties/XMLLangShorthandParser.java
  82. 6
    17
      src/java/org/apache/fop/fonts/AbstractCodePointMapping.java
  83. 3
    7
      src/java/org/apache/fop/fonts/Base14Font.java
  84. 8
    25
      src/java/org/apache/fop/fonts/CIDFont.java
  85. 177
    0
      src/java/org/apache/fop/fonts/CIDSubset.java
  86. 1
    1
      src/java/org/apache/fop/fonts/Font.java
  87. 11
    13
      src/java/org/apache/fop/fonts/LazyFont.java
  88. 38
    118
      src/java/org/apache/fop/fonts/MultiByteFont.java
  89. 142
    0
      src/java/org/apache/fop/fonts/NamedCharacter.java
  90. 145
    0
      src/java/org/apache/fop/fonts/SimpleSingleByteEncoding.java
  91. 21
    20
      src/java/org/apache/fop/fonts/SingleByteEncoding.java
  92. 188
    26
      src/java/org/apache/fop/fonts/SingleByteFont.java
  93. 2
    5
      src/java/org/apache/fop/fonts/Typeface.java
  94. 11
    8
      src/java/org/apache/fop/fonts/truetype/TTFSubSetFile.java
  95. 28
    18
      src/java/org/apache/fop/fonts/type1/AFMCharMetrics.java
  96. 2
    10
      src/java/org/apache/fop/fonts/type1/AFMFile.java
  97. 16
    1
      src/java/org/apache/fop/fonts/type1/AFMParser.java
  98. 28
    5
      src/java/org/apache/fop/fonts/type1/Type1FontLoader.java
  99. 0
    376
      src/java/org/apache/fop/image/AbstractFopImage.java
  100. 0
    0
      src/java/org/apache/fop/image/BmpImage.java

+ 23
- 1
KEYS View File

@@ -19,7 +19,8 @@ pub 1024D/5F298824 2006-09-30 Simon Pepping <spepping@leverkruid.eu>
sub 2048g/40F32100 2006-09-30
pub 1024D/4358C584 2006-12-08 Vincent Hennebert <vhennebert@apache.org>
sub 2048g/0BD6AC9B 2006-12-08

pub 1024D/CC31AE97 2008-03-27 [expires: 2011-01-01]
uid Maximilian Berger <maxberger@apache.org>

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.6 (GNU/Linux)
@@ -167,3 +168,24 @@ SQQYEQIACQUCRXmZwgIbDAAKCRCgctTQQ1jFhBc3AKCQ1X7oIVR8g7GvSGEUw6DE
HgEaUgCgkl30lcl9gGa9hqk4cuGYn1OTyks=
=XphF
-----END PGP PUBLIC KEY BLOCK-----

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.7 (OpenBSD)

mQGiBEfrX/ARBADulGs9V7StbfK8CFfClihdh4lRpw2tktMuYiQJ/rIsNq4zghkT
UGxFU0eUC2ZVPYvwG6sXgZ5SSm6i8Ii79YdIIxUG7oNwXaY/e9rK+xX193xqmDgl
Vh5vm4LUtncHi9TZDSF+g1YU1DVHbSjTd2oQEHxbBppL0CLfaLv3U1qr2wCgxeGw
ZIwb6KD6yesRLx6vGDkDzAMEAL99p0m4sNnjZdKC25Rrt6NZ7CROXWs89/+dkewg
JCZiVEoAcdSa0z5d8+XaSzmqR8BJWM1PBPjG48eEdqOevwypd0F/U1mwZ42MvQEw
oBayUY+7/pptW7C5L3Fjk18drE0a8lIzt9VBGX5fe3GoXtZKuOzDv0hEuHyzR9q9
JLXsA/sELFfrHf0tBfXAdE7pj/Mahalu17/GAyb0RHSvuOfoUvXSXZA91cFg8ycB
4x265NtYZk52M32wi5ePrYeSJIZ6vWRvPuWVAXDg5S6HCMjcXc6ElkgLcUt1NoPI
DmRXe4FIDZkGSYSXdLTUByu7+8fCuWQHCFG2sALdOyVlucij2LQoTWF4aW1pbGlh
biBCZXJnZXIgPG1heGJlcmdlckBhcGFjaGUub3JnPohmBBMRAgAmBQJH61/wAhsD
BQkFM4sABgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQ4+RAT8wxrpcs1wCeIAoI
B0MwZfWLV+wD3pt1wDkPXbsAnjuOsyZ7EeNOcpoqSteB17aPRGeLiEYEEBECAAYF
Akfrb00ACgkQByq3OugVkrx76ACgqJ8W64IhBYgBvp3dTDLS825gCQQAnjB6X5+4
eW/0pQUpJcvolxbT9xvF
=bbQO
-----END PGP PUBLIC KEY BLOCK-----


+ 40
- 0
README View File

@@ -90,6 +90,46 @@ http://xmlgraphics.apache.org/fop/stable/running.html
RELEASE NOTES
==============================================================================

Version 0.95beta
================

This is a pre-version of the third production grade release of the new FOP
codebase. It contains many bug fixes and new features. See below for details.

Compliance
----------

This release implements the XSL 1.0 and 1.1 recommendations to a high
degree of compliance. See the compliance page
http://xmlgraphics.apache.org/fop/compliance.html for a detailed
overview.

Known issues
------------

The known issues of this release are listed at
http://xmlgraphics.apache.org/fop/0.95/knownissues_overview.html.

Major Changes in Version 0.95
-----------------------------

* Add new fox:external-document extension element that allows to insert whole
documents into a page-sequence (JM)
* Add support for background on fo:table-column and fo:table-header/footer/body
elements (VH)
* Add support for conditional borders in tables (VH)
* Add support for scale-down-to-fit and scale-up-to-fit (JM)
* Fix various bugs and performance problems with external graphics by
introducing a new image loading framework (JM)

The long list of changes in this release is available at
http://xmlgraphics.apache.org/fop/0.95/changes_0.95.html.

The long list of changes in this and earlier releases is available at
http://xmlgraphics.apache.org/fop/changes.html.



Version 0.94
============


+ 2
- 2
build.properties View File

@@ -24,8 +24,8 @@
# javac.debug = on
# javac.optimize = off
# javac.deprecation = on
# javac.source = 1.3
# javac.target = 1.3
# javac.source = 1.4
# javac.target = 1.4
# javac.fork = on

## JUnit task switches

+ 15
- 65
build.xml View File

@@ -131,10 +131,6 @@ list of possible build targets.
</fileset>
</path>

<patternset id="exclude-jimi">
<exclude name="org/apache/fop/image/JimiImage.java" unless="jimi.present"/>
</patternset>

<patternset id="exclude-jai">
<exclude name="org/apache/fop/image/JAIImage.java" unless="jai.present"/>
<exclude name="org/apache/fop/render/pcl/JAIMonochromeBitmapConverter.java" unless="jai.present"/>
@@ -148,7 +144,7 @@ list of possible build targets.
<property name="name" value="fop"/>
<property name="NAME" value="FOP"/>
<property name="version" value="svn-trunk"/>
<property name="year" value="1999-2007"/>
<property name="year" value="1999-2008"/>

<property name="javac.debug" value="on"/>
<property name="javac.optimize" value="off"/>
@@ -214,7 +210,7 @@ list of possible build targets.
<!-- =================================================================== -->
<!-- Initialization target -->
<!-- =================================================================== -->
<target name="init" depends="init-avail, init-filters-jdk14, init-filters-jdk13">
<target name="init" depends="init-avail">
</target>

<target name="init-avail">
@@ -224,18 +220,6 @@ list of possible build targets.
<echo message="VM: ${java.vm.version}, ${java.vm.vendor}"/>
<echo message="JAVA_HOME: ${env.JAVA_HOME}"/>

<available property="jimi.present" classname="com.sun.jimi.core.Jimi"
classpathref="libs-build-classpath"/>
<condition property="jimi.message" value="Jimi Support PRESENT">
<equals arg1="${jimi.present}" arg2="true"/>
</condition>
<condition property="jimi.message" value="Jimi Support NOT Present">
<not>
<equals arg1="${jimi.present}" arg2="true"/>
</not>
</condition>
<echo message="${jimi.message}"/>

<available property="jai.present" classname="javax.media.jai.JAI"
classpathref="libs-build-classpath"/>
<condition property="jai.message" value="JAI Support PRESENT">
@@ -261,7 +245,8 @@ list of possible build targets.
<echo message="${jce.message}"/>

<available property="jdk14.present" classname="java.lang.CharSequence"/>

<fail message="${Name} requires at least Java 1.4!" unless="jdk14.present"/>
<available property="junit.present" classname="junit.framework.TestCase"
classpathref="libs-build-classpath"/>
<condition property="junit.message" value="JUnit Support PRESENT">
@@ -292,22 +277,6 @@ list of possible build targets.
</target>

<target name="init-filters-jdk13" depends="init-avail" unless="jdk14.present">
<echo message="Use GraphicsConfiguration adapter for JDK 1.3 or earlier."/>
<path id="graphics-configuration-adapter">
<pathelement location="src/java-1.3"/>
</path>
<property name="src.java.version.dir" value="${basedir}/src/java-1.3"/>
</target>

<target name="init-filters-jdk14" depends="init-avail" if="jdk14.present">
<echo message="Use GraphicsConfiguration adapter for JDK 1.4."/>
<path id="graphics-configuration-adapter">
<pathelement location="src/java-1.4"/>
</path>
<property name="src.java.version.dir" value="${basedir}/src/java-1.4"/>
</target>

<!-- =================================================================== -->
<!-- Help on usage -->
<!-- =================================================================== -->
@@ -401,12 +370,9 @@ list of possible build targets.
source="${javac.source}" target="${javac.target}">
<src path="${build.gensrc.dir}"/>
<src path="${src.java.dir}"/>
<src refid="graphics-configuration-adapter"/>
<patternset includes="**/*.java"/>
<!--patternset includes="org/apache/fop/svg/GraphicsConfiguration.java"/-->
<patternset refid="exclude-jce-dependencies"/>
<patternset refid="exclude-jai"/>
<patternset refid="exclude-jimi"/>
<classpath refid="libs-build-classpath"/>
</javac>
<copy todir="${build.classes.dir}">
@@ -543,7 +509,6 @@ list of possible build targets.
<uptodate property="jar.sources.uptodate" targetfile="${build.dir}/fop-sources.jar">
<srcfiles dir="${build.gensrc.dir}"/>
<srcfiles dir="${src.java.dir}"/>
<srcfiles refid="graphics-configuration-adapter"/>
</uptodate>
</target>

@@ -1032,7 +997,6 @@ NOTE:
<pathelement path="${src.java.dir}"/>
<pathelement path="${src.sandbox.dir}"/>
<pathelement path="${build.gensrc.dir}"/>
<path refid="graphics-configuration-adapter"/>
</sourcepath>
<tag name="todo" scope="all" description="To do:"/>
<group title="Control and Startup">
@@ -1206,37 +1170,24 @@ NOTE:
-->
<echo message="Make sure you have a proper Forrest installation (see http://forrest.apache.org/)"/>

<!--<antcall target="site"/>-->
<!-- You can provide a JDK 1.4 for a JDK 1.3 build by adding "javahome.jdk14" to build-local.properties -->
<condition property="javahome.jdk14.override" value="${javahome.jdk14}">
<isset property="javahome.jdk14"/>
</condition>
<echo message="java home: ${javahome.jdk14.override}"/>
<condition property="javahome.jdk14.override" value="${env.JAVA_HOME}">
<not>
<isset property="javahome.jdk14.override"/>
</not>
</condition>
<echo message="java home: ${javahome.jdk14.override}"/>
<condition property="forrest.call" value="forrest.bat" else="forrest">
<os family="windows"/>
</condition>
<exec executable="${forrest.call}">
<env key="JAVA_HOME" value="${javahome.jdk14.override}"/>
</exec>
<exec executable="${forrest.call}"/>
</target>
<!-- =================================================================== -->
<!-- Creates the distribution -->
<!-- =================================================================== -->
<target name="dist" depends="dist-src,dist-bin" description="Generates the distribution package"/>
<target name="dist" depends="dist-prereq,dist-src,dist-bin" description="Generates the distribution package"/>

<target name="dist-bin" depends="all,javadocs,docs">
<echo message="Building the binary distribution files (zip,tar)"/>
<fail message="A complete binary build requires Jimi" unless="jimi.present"/>
<target name="dist-prereq" depends="init">
<fail message="A complete binary build requires JAI" unless="jai.present"/>
<fail message="A complete binary build requires JCE" unless="jce.present"/>
</target>

<target name="dist-bin" depends="all,javadocs,docs">
<echo message="Building the binary distribution files (zip,tar)"/>
<mkdir dir="${dist.bin.result.dir}"/>
<copy todir="${dist.bin.result.dir}">
<fileset refid="dist.bin"/>
@@ -1252,10 +1203,9 @@ NOTE:
<copy todir="${dist.bin.result.dir}/build" file="build/fop.jar"/>
<chmod file="${dist.bin.result.dir}/fop" perm="ugo+rx"/>

<property name="bin.suffix" value="bin-jdk${java.specification.version}"/>
<zip zipfile="${name}-${version}-${bin.suffix}.zip" basedir="${dist.bin.dir}" includes="**"/>
<zip zipfile="${name}-${version}-bin.zip" basedir="${dist.bin.dir}" includes="**"/>
<tar longfile="gnu"
destfile="${name}-${version}-${bin.suffix}.tar">
destfile="${name}-${version}-bin.tar">
<tarfileset dir="${dist.bin.dir}" mode="755">
<include name="${name}-${version}/fop"/>
</tarfileset>
@@ -1264,8 +1214,8 @@ NOTE:
<exclude name="${name}-${version}/fop"/>
</tarfileset>
</tar>
<gzip zipfile="${name}-${version}-${bin.suffix}.tar.gz" src="${name}-${version}-${bin.suffix}.tar"/>
<delete file="${name}-${version}-${bin.suffix}.tar"/>
<gzip zipfile="${name}-${version}-bin.tar.gz" src="${name}-${version}-bin.tar"/>
<delete file="${name}-${version}-bin.tar"/>
</target>

<target name="dist-src" depends="all">

+ 1
- 1
fop.bat View File

@@ -61,7 +61,7 @@ set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl-2.7.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.7.0.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\serializer-2.7.0.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\batik-all-1.7.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xmlgraphics-commons-1.3svn.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xmlgraphics-commons-1.4svn.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\avalon-framework-4.2.0.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-io-1.3.1.jar
set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-logging-1.0.4.jar

+ 4
- 3
forrest.properties View File

@@ -56,7 +56,7 @@ project.skin=pelt
#project.images-dir=${project.resources-dir}/images
#project.schema-dir=${project.resources-dir}/schema
#project.skins-dir=${project.content-dir}/skins
#project.skinconf=${project.content-dir}/skinconf.xml
project.skinconf=${project.content-dir}/skinconf.xml
#project.lib-dir=${project.content-dir}/lib
#project.classes-dir=${project.content-dir}/classes
#project.translations-dir=${project.content-dir}/translations
@@ -97,7 +97,8 @@ forrest.validate.skins.stylesheets=${forrest.validate.skins}
# server, set to -Djava.awt.headless=true
#forrest.jvmargs=
# The bugtracking URL - the issue number will be appended
#project.bugtracking-url=http://issues.apache.org/bugzilla/show_bug.cgi?id=
project.bugtracking-url=http://issues.apache.org/bugzilla/show_bug.cgi?id=
bugtracking-url=http://issues.apache.org/bugzilla/show_bug.cgi?id=
#project.bugtracking-url=http://issues.apache.org/jira/browse/
# The issues list as rss
#project.issues-rss-url=
@@ -106,4 +107,4 @@ forrest.validate.skins.stylesheets=${forrest.validate.skins}
# The names of plugins that are required to build the project
# comma separated list (no spaces)
# project.required.plugins=
project.required.plugins=org.apache.forrest.plugin.output.pdf-0.1
project.required.plugins=org.apache.forrest.plugin.input.projectInfo,org.apache.forrest.plugin.output.pdf

src/java/org/apache/fop/image/analyser/package.html → forrest.properties.xml View File

@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -6,7 +7,7 @@
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,10 +15,8 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<HTML>
<TITLE>org.apache.fop.image.analyser Package</TITLE>
<BODY>
<P>Image analyzers for determining the format of an image and to preload its intrinsic size.</P>
</BODY>
</HTML>
<properties>
<!-- Project identity -->
<property name="projectInfo.project.fullname" value="Apache FOP"/>
<property name="projectInfo.project.url" value="http://xmlgraphics.apache.org/fop/"/>
</properties>

+ 11
- 3
lib/README.txt View File

@@ -142,8 +142,16 @@ Please make sure you've read the license of each package.
https://jai-imageio.dev.java.net/
BSD license
Note: Not the whole JAI is needed, only the ImageIO-compatible codecs
packaged as "Image I/O Tools". The name may be misleading.
Note: This is not the same as JAI! Only the ImageIO-compatible codecs
are packaged as "Image I/O Tools". The name may be misleading.

- JAI (Java Advanced Imaging API)

http://java.sun.com/products/java-media/jai
Java Research License and Java Distribution License (Check which one applies to you!)
Currently used for:
- Grayscale error diffusion dithering in the PCL Renderer

- JEuclid (MathML implementation, for the MathML extension)

@@ -182,4 +190,4 @@ Additional development-time dependencies

(not bundled, to be added to your Apache Ant installation)
http://xmlunit.sourceforge.net/
BSD style license
BSD style license

BIN
lib/xmlgraphics-commons-1.3svn.jar → lib/xmlgraphics-commons-1.4svn.jar View File


+ 3
- 3
src/codegen/fonts/font-file.xsl View File

@@ -40,10 +40,10 @@ import java.util.Map;
</xsl:if>
import java.util.Set;
import org.apache.fop.fonts.FontType;
import org.apache.fop.fonts.Typeface;
import org.apache.fop.fonts.Base14Font;
import org.apache.fop.fonts.CodePointMapping;

public class <xsl:value-of select="class-name"/> extends Typeface {
public class <xsl:value-of select="class-name"/> extends Base14Font {
private final static String fontName = "<xsl:value-of select="font-name"/>";
private final static String fullName = "<xsl:value-of select="full-name"/>";
private final static Set familyNames;
@@ -84,7 +84,7 @@ public class <xsl:value-of select="class-name"/> extends Typeface {
this.enableKerning = enableKerning;
}

public String getEncoding() {
public String getEncodingName() {
return encoding;
}


+ 2
- 2
src/documentation/content/.htaccess View File

@@ -18,8 +18,8 @@ RedirectMatch Permanent ^/fop/upgrading(.*) http://xmlgraphics.apache.org/fop/0.

# redirect to versioned documentation
Redirect Temp /fop/stable http://xmlgraphics.apache.org/fop/0.94
Redirect Temp /fop/current http://xmlgraphics.apache.org/fop/0.94
Redirect Temp /fop/unstable http://xmlgraphics.apache.org/fop/trunk
Redirect Temp /fop/current http://xmlgraphics.apache.org/fop/0.95
Redirect Temp /fop/unstable http://xmlgraphics.apache.org/fop/0.95
Redirect Temp /fop/latest http://xmlgraphics.apache.org/fop/trunk
Redirect Temp /fop/maintenance http://xmlgraphics.apache.org/fop/0.93
Redirect Temp /fop/previous http://xmlgraphics.apache.org/fop/0.93

+ 4
- 4
src/documentation/content/doap.rdf View File

@@ -77,15 +77,15 @@
<release>
<Version>
<name>Previous release</name>
<created>2003-07-16</created>
<revision>0.20.5</revision>
<created>2007-01-02</created>
<revision>0.93</revision>
</Version>
</release>
<release>
<Version>
<name>Latest stable release</name>
<created>2007-01-02</created>
<revision>0.93</revision>
<created>2007-08-23</created>
<revision>0.94</revision>
</Version>
</release>
<repository>

+ 0
- 125
src/documentation/content/xdocs/0.93/extensions.xml View File

@@ -1,125 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
<title>Standard FOP Extensions</title>
<version>$Revision$</version>
</header>
<body>
<p>
By "extension", we mean any data that can be placed in the input XML document that
is not addressed by the XSL-FO standard.
By having a mechanism for supporting extensions, FOP is able to add features that
are not covered in the specification.
</p>
<p>
The extensions documented here are included with FOP, and are automatically available
to you. If you wish to add an extension of your own to FOP, please see the
<a href="../dev/extensions.html">Developers' Extension Page</a>.
</p>
<note>All extensions required the correct use of an appropriate namespace in your input document.</note>
<section id="svg">
<title>SVG</title>
<p>
Please see the <a href="graphics.html#svg">SVG documentation</a> for more details.
</p>
</section>
<section id="fo-extensions">
<title>FO Extensions</title>
<section id="fox-namespace">
<title>Namespace</title>
<p>
By convention, FO extensions in FOP use the "fox" namespace prefix.
To use any of the FO extensions, add a namespace entry for
<code>http://xml.apache.org/fop/extensions</code> to the root element:
</p>
<source><![CDATA[<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">]]></source>
<note>
Currently, no extension elements are implemented in FOP Trunk which use the
FOP extension namespace.
</note>
</section>
<section id="bookmarks">
<title>PDF Bookmarks</title>
<p>
In previous versions of Apache FOP there was a <code>fox:outline</code> element
which was used to create outlines in PDF files. The redesigned code makes use
of the new <a href="http://www.w3.org/TR/xsl11/#fo_bookmark-tree">bookmark feature defined in the latest XSL 1.1 working draft</a>.
</p>
</section>
<section id="named-destinations">
<title>Anchors or Named Destinations</title>
<p>This extension element hasn't been reimplemented for the redesigned code, yet.</p>
<!--p>Use the fox:destination element to define "named destinations" inside a PDF document.
These are useful as fragment identifiers, e.g. "http://server/document.pdf#anchor-name".
fox:destination elements can be placed almost anywhere in the fo document, including a child of
root, a block-level element, or an inline-level element.
For the destination to actually work, it must correspond to an "id" attribute on some fo element
within the document. In other words, the "id" attribute actually creates the "view" within the
PDF document. The fox:destination simply gives that view an independent name.
</p>
<source><![CDATA[<fox:destination internal-destination="table-of-contents"/>
...
<fo:block id="table-of-contents">Table of Contents</fo:block>]]></source>
<warning>It is possible that in some future release of FOP, <em>all </em>elements with
"id" attributes will generate named-destinations, which will eliminate the need for
fox:destination.</warning-->
</section>
<section id="table-continue-label">
<title>Table Continuation Label</title>
<p>This extension element hasn't been reimplemented for the redesigned code, yet.</p>
<!--p>Use the fox:continued-label element to create content in table-header and
table-footer cells that will appear only on pages after the first page that the table
appears. fox:continued-label is itself inline content, and is a container of fo:inline
content. This content will be laid out only if the table does not fit on a single page and flows
to following pages. Here is an example of FO code creating such a table-header:</p>
<source><![CDATA[<fo:table-header>
<fo:table-row>
<fo:table-cell>
<fo:block>Header column 1 with continued label
<fox:continued-label><fo:inline> (cont.)</fo:inline></fox:continued-label>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Header column 2 with no continued label</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>]]></source-->
</section>
<section id="widow-orphan-content-limit">
<title>fox:orphan-content-limit and fox:widow-content-limit</title>
<p>
The two proprietary extension properties, fox:orphan-content-limit and
fox:widow-content-limit, are used to improve the layout of list-blocks and tables.
If you have a table with many entries, you don't want a single row to be left over
on a page. You will want to make sure that at least two or three lines are kept
together. The properties take an absolute length which specifies the area at the
beginning (fox:widow-content-limit) or at the end (fox:orphan-content-limit) of a
table or list-block. The properties are inherited and only have an effect on fo:table
and fo:list-block. An example: fox:widow-content-limit="3 * 1.2em" would make sure
the you'll have at least three lines (assuming line-height="1.2") together on a table
or list-block.
</p>
</section>
</section>
</body>
</document>


+ 0
- 298
src/documentation/content/xdocs/0.93/fonts.xml View File

@@ -1,298 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
<title>Apache FOP: Fonts</title>
<version>$Revision$</version>
<authors>
<person name="Jeremias Märki" email=""/>
<person name="Tore Engvig" email=""/>
</authors>
</header>
<body>
<section id="intro">
<title>Summary</title>
<note>The FOP Font subsystem is currently undergoing a significant change.
The details provided here especially related to the generation of FOP Font
Metrics files and the FOP Font configuration are likely to change substantially
in the future.
</note>
<p>The following table summarizes the font capabilities of the various FOP renderers:</p>
<table>
<tr>
<th>Renderer</th>
<th>Base-14</th>
<th>AWT/OS</th>
<th>Custom</th>
<th>Custom Embedding</th>
</tr>
<tr>
<td>PDF</td>
<td>yes</td>
<td>no</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>PostScript</td>
<td>yes</td>
<td>no</td>
<td>yes</td>
<td>yes</td>
</tr>
<!--tr> NOT AVAILABLE YET!!!
<td>PCL</td>
<td>yes (modified)</td>
<td>no</td>
<td>no</td>
<td>no</td>
</tr-->
<tr>
<td>TXT</td>
<td>yes (used for layout but not for output)</td>
<td>no</td>
<td>yes (used for layout but not for output)</td>
<td>no</td>
</tr>
<tr>
<td>AWT</td>
<td>if available from OS</td>
<td>yes</td>
<td>yes</td>
<td>n/a (display only)</td>
</tr>
<tr>
<td>Print</td>
<td>if available from OS</td>
<td>yes</td>
<td>yes</td>
<td>controlled by OS printer driver</td>
</tr>
<tr>
<td>RTF</td>
<td>n/a (font metrics not needed)</td>
<td>n/a</td>
<td>n/a</td>
<td>n/a</td>
</tr>
<tr>
<td>MIF</td>
<td>n/a (font metrics not needed)</td>
<td>n/a</td>
<td>n/a</td>
<td>n/a</td>
</tr>
<tr>
<td>SVG</td>
<td>if available from OS</td>
<td>yes</td>
<td>no</td>
<td>no</td>
</tr>
<tr>
<td>XML</td>
<td>yes</td>
<td>no</td>
<td>yes</td>
<td>n/a</td>
</tr>
</table>
</section>
<section>
<title>Base-14 Fonts</title>
<p>The Adobe PDF Specification specifies a set of 14 fonts that must be available to every PDF reader: Helvetica (normal, bold, italic, bold italic), Times (normal, bold, italic, bold italic), Courier (normal, bold, italic, bold italic), Symbol and ZapfDingbats.</p>
</section>
<section id="awt">
<title>AWT/Operating System Fonts</title>
<p>The AWT family of renderers (AWT, Print, SVG), use the Java AWT libraries for font metric information. Through operating system registration, the AWT libraries know what fonts are available on the system, and the font metrics for each one.</p>
</section>
<section id="custom">
<title>Custom Fonts</title>
<p>Support for custom fonts is added by creating font metric files (written in XML) from the actual font files, and registering them with FOP. Currently only Type 1 and TrueType fonts can be added.
More information about fonts can be found at:</p>
<ul>
<li><a href="http://partners.adobe.com/asn/developer/type/ftypes.html">Adobe font types</a></li>
<li><a href="http://partners.adobe.com/asn/developer/technotes/fonts.html">Adobe Font Technote</a>
</li>
</ul>
<section id="type1-metrics">
<title>Type 1 Font Metrics</title>
<p>FOP includes PFMReader, which reads the PFM file that normally comes with a Type 1 font, and generates an appropriate font metrics file for it.
To use it, run the class org.apache.fop.fonts.apps.PFMReader:</p>
<p>Windows (on JDK 1.4 and later):</p>
<source>java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file</source>
<p>Windows (on JDK 1.3.x):</p>
<source>java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar;lib\xml-apis.jar;
lib\xercesImpl.jar;lib\xalan.jar;lib\serializer.jar
org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file</source>
<p>Unix (on JDK 1.4 and later):</p>
<source>java -cp build/fop.jar:lib/avalon-framework.jar:lib/commons-logging.jar:lib/commons-io.jar
org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file</source>
<p>Unix (on JDK 1.3.1):</p>
<source>java -cp build/fop.jar:lib/avalon-framework.jar:lib/commons-logging.jar:lib/commons-io.jar:lib/xml-apis.jar:
lib/xercesImpl.jar:lib/xalan.jar:lib/serializer.jar
org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file</source>
<p>PFMReader [options]:</p>
<ul>
<li><strong>-fn &lt;fontname&gt;</strong> By default, FOP uses the fontname from the
.pfm file when embedding the font. Use the "-fn" option to override this name with one you have
chosen. This may be useful in some cases to ensure that applications using the output document
(Acrobat Reader for example) use the embedded font instead of a local font with the same
name.</li>
</ul>
<note>The classpath in the above example has been simplified for readability.
You will have to adjust the classpath to the names of the actual JAR files in the lib directory.
xml-apis.jar, xercesImpl.jar, xalan.jar and serializer.jar are not necessary for JDK version 1.4 or later.</note>
<note>The tool will construct some values (FontBBox, StemV and ItalicAngle) based on assumptions and calculations which are only an approximation to the real values.
FontBBox and Italic Angle can be found in the human-readable part of the PFB file or in the AFM file.
The PFMReader tool does not yet interpret PFB or AFM files, so if you want to be correct, you may have to adjust the values in the XML file manually.
The constructed values however appear to have no visible influence.</note>
</section>
<section id="truetype-metrics">
<title>TrueType Font Metrics</title>
<p>FOP includes TTFReader, which reads the TTF file and generates an appropriate font metrics file for it.
Use it in a similar manner to PFMReader.
For example, to create such a metrics file in Windows from the TrueType font at c:\myfonts\cmr10.ttf:</p>
<source>java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
org.apache.fop.fonts.apps.TTFReader [options]
C:\myfonts\cmr10.ttf ttfcm.xml</source>
<p>TTFReader [options]:</p>
<ul>
<li><strong>-d &lt;DEBUG | INFO &gt;</strong> Sets the debug level (default is
INFO).</li>
<li><strong>-fn &lt;fontname&gt;</strong> Same as for PFMReader.</li>
<li><strong>-ttcname &lt;fontname&gt;</strong> If you're reading data from a
TrueType Collection (.ttc file) you must specify which font from the collection you will read
metrics from.
If you read from a .ttc file without this option, the fontnames will be listed for you.</li>
<li><strong>-enc ansi</strong> Creates a WinAnsi-encoded font metrics file.
Without this option, a CID-keyed font metrics file is created.
The table below summarizes the differences between these two encoding options as currently
used within FOP.
Please note that this information only applies to TrueType fonts and TrueType collections:</li>
</ul>
<table id="ttf-encoding">
<tr>
<th>Issue</th>
<th>WinAnsi</th>
<th>CID-keyed</th>
</tr>
<tr>
<td>Usable Character Set</td>
<td>Limited to WinAnsi character set, which is roughly equivalent to iso-8889-1.</td>
<td>Limited only by the characters in the font itself.</td>
</tr>
<tr>
<td>Embedding the Font</td>
<td>Optional.</td>
<td>Mandatory. Not embedding the font produces invalid PDF documents.</td>
</tr>
</table>
<warning>
You may experience failures with certain TrueType fonts, especially if they don't contain
the so-called Unicode "cmap" table. TTFReader can currently not deal with font like this.
</warning>
</section>
<section id="truetype-collections-metrics">
<title>TrueType Collections Font Metrics</title>
<p>TrueType collections (.ttc files) contain more than one font.
To create metrics files for these fonts, you must specify which font in the collection should be generated, by using the "-ttcname" option with the TTFReader.</p>
<p>To get a list of the fonts in a collection, just start the TTFReader as if it were a normal TrueType file (without the -ttcname option).
It will display all of the font names and exit with an Exception.</p>
<p>Here is an example of generating a metrics file for a .ttc file:</p>
<source>java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
org.apache.fop.fonts.apps.TTFReader -ttcname "MS Mincho"
msmincho.ttc msminch.xml</source>
</section>
<section id="register">
<title>Register Fonts with FOP</title>
<p>You must tell FOP how to find and use the font metrics files by registering them in the <a href="configuration.html">FOP Configuration</a>. Add entries for your custom fonts, regardless of font type, to the configuration file in a manner similar to the following:</p>
<source><![CDATA[<font metrics-url="file:///C:/myfonts/FTL_____.xml" kerning="yes"
embed-url="file:///C:/myfonts/FTL_____.pfb">
<font-triplet name="FrutigerLight" style="normal" weight="normal"/>
</font>]]></source>
<note>Review the documentation for <a href="configuration.html">FOP Configuration</a> for instructions on making the FOP configuration available to FOP when it runs. Otherwise, FOP has no way of finding your custom font information.</note>
<ul>
<li>
URLs are used to access the font metric and font files.
Relative URLs are resolved relative to the font-base property (or base) if available.
See <a href="configuration.html">FOP: Configuration</a> for more information.
</li>
<li>The "kerning" and "embed-url" attributes are optional. Kerning is currently not used at all. If embedding is off, the output will position the text correctly (from the metrics file), but it will not be displayed or printed correctly unless the viewer has the applicable font available to their local system.</li>
<li>When setting the embed-url attribute for Type 1 fonts, be sure to specify the PFB (actual font data), not PFM (font metrics) file that you used to generate the XML font metrics file.</li>
<li>
If relative URLs are specified, they are evaluated relative to the value of the
"font-base" setting. If there is no "font-base" setting, the fonts are evaluated
relative to the base directory.
</li>
</ul>
<!--note>Cocoon users will need to setup the config, see FOPSerializer for more information.</note-->
</section>
<section id="embedding">
<title>Embedding</title>
<note>The PostScript renderer does not yet support TrueType fonts, but can embed Type 1 fonts.</note>
<note>The font is simply embedded into the PDF file, it is not converted.</note>
<p>Font embedding is enabled in the userconfig.xml file and controlled by the embed-url attribute.
If you don't specify the embed-url attribute the font will not be embedded, but will only be referenced.</p>
<warning>
Omitting the embed-url attribute for CID-encoded TrueType fonts will currently produce invalid
PDF files! If you create the XML font metric file using the "-enc ansi" option, you can omit
the embed-url attribute for TrueType fonts but you're restricted to the WinAnsi character set.
</warning>
<p>When FOP embeds a font, it adds a prefix to the fontname to ensure that the name will not match the fontname of an installed font.
This is helpful with older versions of Acrobat Reader that preferred installed fonts over embedded fonts.</p>
<p>When embedding PostScript fonts, the entire font is always embedded.</p>
<p>When embedding TrueType fonts (ttf) or TrueType Collections (ttc), a subset of the original font, containing only the glyphs used, is embedded in the output document.
Currently, this embedded font contains only the minimum data needed to be embedded in a pdf document, and does not contain any codepage information.
The PDF document contains indexes to the glyphs in the font instead of to encoded characters.
While the document will be displayed correctly, the net effect of this is that searching, indexing, and cut-and-paste will not work properly.</p>
<p>One workaround for this behavior is to use the "-enc ansi" option when generating metrics with TTFReader.
This will cause the whole font to be embedded in the pdf document.
Characters will be WinAnsi encoded (as specified in the PDF spec), so you lose the ability to use characters from other character sets.
See <a href="#ttf-encoding">Table of TTF Encoding Options</a> for more details.</p>
</section>
<section id="embedding-base14">
<title>Explicitely embedding the base 14 fonts</title>
<p>
There are cases where you might want to force the embedding of one or more of the base 14 fonts that
can normally be considered available on the target platform (viewer, printer). One of these cases is
PDF/A which mandates the embedding of even the base 14 fonts. Embedding a font such as Helvetica or
Courier is straight-forward. The "Symbol" and "ZapfDingbats" fonts, however, currently present a
problem because FOP cannot correctly determine the encoding of these two single-byte fonts through
the PFM file. FOP now correctly interprets the "encoding" value in the XML font metrics file, but the
PFMReader application writes "UnknownEncoding" to the generated XML file. In order to embed "Symbol"
and "ZapfDingbats" you have to manually change the XML font metrics file and specify "SymbolEncoding"
or "ZapfdingbatsEncoding" encoding respectively as the value for the "encoding" element.
</p>
<p>Example:</p>
<source><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<font-metrics type="TYPE1">
<font-name>Symbol</font-name>
<embed/>
<encoding>SymbolEncoding</encoding>
<cap-height>673</cap-height>
<x-height>766</x-height>
[..]]]></source>
</section>
</section>
</body>
</document>

+ 0
- 338
src/documentation/content/xdocs/0.93/graphics.xml View File

@@ -1,338 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
<title>Apache FOP: Graphics Formats</title>
<version>$Revision$</version>
</header>
<body>
<section id="support-overview">
<title>Overview of Graphics Support</title>
<p>
The table below summarizes the <em>theoretical</em> support for graphical formats within FOP. In other words, within the constraints of the limitations listed here, these formats <em>should</em> work. However, many of them have not been tested, and there may be limitations that have not yet been discovered or documented. The packages needed to support some formats are not included in the FOP distribution and must be installed separately. Follow the links in the "Support Thru" column for more details.
</p>
<table>
<tr>
<th>Format</th>
<th>Type</th>
<th><a href="#native">FOP native support</a></th>
<th><a href="#batik">Batik SVG</a></th>
<th><a href="#batik-codecs">Batik codecs</a></th>
<th><a href="#imageio">Image I/O</a></th>
<th><a href="#jai">JAI</a></th>
<th><a href="#jimi">JIMI</a></th>
</tr>
<tr>
<td><a href="#bmp">BMP</a> (Microsoft Windows Bitmap)</td>
<td>bitmap</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="#eps">EPS</a> (Encapsulated PostScript)</td>
<td>metafile (both bitmap and vector), probably most frequently used for vector drawings</td>
<td>(X)</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>GIF (Graphics Interchange Format)</td>
<td>bitmap</td>
<td>X</td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td><a href="#jpeg">JPEG</a> (Joint Photographic Experts Group)</td>
<td>bitmap</td>
<td>(X)</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="#png">PNG</a> (Portable Network Graphic)</td>
<td>bitmap</td>
<td></td>
<td></td>
<td>X</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="#svg">SVG</a> (Scalable Vector Graphics)</td>
<td>vector (with embedded bitmaps)</td>
<td></td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="#tiff">TIFF</a> (Tag Image Format File)</td>
<td>bitmap</td>
<td>(X)</td>
<td></td>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<!--td><a href="#native">FOP native</a> or <a href="#jai">JAI</a>, depending on the subformat. See <a href="#tiff">TIFF</a> for more details.(JIMI also supports TIFF, but this has not been implemented within FOP).</td-->
</tr>
</table>
<note>"(X)" means restricted support. Please see the details below.</note>
</section>
<section id="packages">
<title>Graphics Packages</title>
<section id="native">
<title>FOP Native</title>
<p>
FOP has native ability to handle some graphic file formats.
</p>
</section>
<section id="batik-codecs">
<title>Batik codecs</title>
<p>
Apache Batik contains codecs for PNG and TIFF access. FOP can use these.
</p>
</section>
<section id="imageio">
<title>Image I/O (JDK 1.4 or higher)</title>
<p>
For JDKs 1.4 or higher, FOP provides a wrapper to load images through the
<a class="fork" href="http://java.sun.com/j2se/1.4.2/docs/guide/imageio/index.html">JDK's Image I/O API</a> (JSR 015).
Image I/O allows to dynamically add additional image codecs. An example of such an add-on library are the
<a class="fork" href="http://java.sun.com/products/java-media/jai/">JAI Image I/O Tools</a> available from Sun.
</p>
</section>
<section id="jimi">
<title>JIMI</title>
<p>
Because of licensing issues, the JIMI image library is not included in the FOP distribution. First, <a class="fork" href="http://java.sun.com/products/jimi">download</a> and install it.
Then, copy the file "JimiProClasses.zip" from the archive to {fop-install-dir}/lib/jimi-1.0.jar. Please note that FOP binary distributions are compiled with JIMI support, so there is no need for you to build FOP to add the support. If jimi-1.0.jar is installed in the right place, it will automatically be used by FOP, otherwise it will not.
</p>
</section>
<section id="jai">
<title>JAI (Java Advanced Imaging API)</title>
<warning>JAI support is available for Release 0.20.5 and later. The comments in this section do not apply to releases earlier than 0.20.5.</warning>
<p>
FOP has been compiled with JAI support, but JAI is not included in the FOP distribution.
To use it, install <a href="http://java.sun.com/products/java-media/jai">JAI</a>, then copy the jai_core.jar and the jai_codec.jar files to {fop-install-dir}/lib.
JAI is much faster than JIMI, but is not available for all platforms. See <a href="http://java.sun.com/products/java-media/jai/forDevelopers/jaifaq.html#platforms">What platforms are supported?</a> on the JAI FAQ page for more details.
</p>
</section>
<section id="batik">
<title>Batik</title>
<p>Current FOP distributions include a distribution of the Apache <a class="fork" href="ext:batik">Batik</a> version 1.6.
It is automatically installed with FOP.
Because Batik's API changes frequently, it is highly recommended that you use the version that ships with FOP, at least when running FOP.</p>
<warning>Batik must be run in a graphical environment.</warning>
<p>Batik must be run in a graphical environment.
It uses AWT classes for rendering SVG, which in turn require an X server on Unixish systems.
If you run a server without X, or if you can't connect to the X server due to security restrictions or policies (a so-called "headless" environment), SVG rendering will fail.</p>
<p>Here are some workarounds:</p>
<ul>
<li>If you are using JDK 1.4, start it with the <code>-Djava.awt.headless=true</code> command line option.</li>
<li>Install an X server which provides an in-memory framebuffer without actually using a screen device or any display hardware. One example is Xvfb.</li>
<li>Install a toolkit which emulates AWT without the need for an underlying X server. One example is the <a href="http://www.eteks.com/pja/en">PJA toolkit</a>, which is free and comes with detailed installation instructions.</li>
</ul>
</section>
</section>
<section id="bmp">
<title>BMP</title>
<p>FOP native support for BMP images is limited to the RGB color-space.</p>
</section>
<section id="eps">
<title>EPS</title>
<p>FOP provides support for two output targets:</p>
<ul>
<li>PostScript (full support).</li>
<li>
PDF (partial support). Due to the lack of a built-in PostScript interpreter, FOP
can only embed the EPS file into the PDF. Acrobat Reader will not currently display
the EPS (it doesn't have a PostScript interpreter, either) but it will be shown
correctly when you print the PDF on a PostScript-capable printer. PostScript devices
(including GhostScript) will render the EPS correctly.
</li>
</ul>
<p>
Other output targets can't be supported at the moment because
FOP lacks a PostScript interpreter. Furthermore, FOP is not able
to parse the preview bitmaps sometimes contained in EPS files.
</p>
</section>
<section id="jpeg">
<title>JPEG</title>
<p>FOP native support of JPEG does not include all variants, especially those containing unusual color lookup tables and color profiles.
If you have trouble with a JPEG image in FOP, try opening it with an image processing program (such as Photoshop or Gimp) and then saving it.
Specifying 24-bit color output may also help.
For the PDF and PostScript renderers most JPEG images can be passed through without decompression.
User reports indicate that grayscale, RGB, and CMYK color-spaces are all rendered properly.
</p>
</section>
<section id="png">
<title>PNG</title>
<p>If using JAI for PNG support, only RGB and RGBA color-spaces are supported for FOP rendering.</p>
</section>
<section id="svg">
<title>SVG</title>
<section id="svg-intro">
<title>Introduction</title>
<p>FOP uses <a href="#batik">Batik</a> for SVG support.
This format can be handled as an <code>fo:instream-foreign-object</code> or in a separate
file referenced with <code>fo:external-graphic</code>.</p>
<note>
Batik's SVG Rasterizer utility may also be used to convert standalone SVG
documents into PDF. For more information please see the
<a href="http://xml.apache.org/batik/svgrasterizer.html">SVG Rasterizer documentation</a>
on the Batik site.
</note>
</section>
<section id="svg-pdf-graphics">
<title>Placing SVG Graphics into PDF</title>
<p>
The SVG is rendered into PDF by using PDF commands to draw and fill
lines and curves. This means that the graphical objects created with
this remain as vector graphics.
</p>
<p>
There are a number of SVG things that cannot be converted directly into
PDF. Parts of the graphic such as effects, patterns and images are inserted
into the PDF as a raster graphic. The resolution of this graphic may not
be ideal depending on the FOP dpi (72dpi) and the scaling for that graphic.
We hope to improve this in the future.</p>
<p>
Currently transparency is not supported in PDF so many svg images that
contain effects or graphics with transparent areas will not be displayed
correctly.
</p>
</section>
<section id="svg-pdf-text">
<title>Placing SVG Text into PDF</title>
<p>If possible, Batik will use normal PDF text when inserting text. It does
this by checking if the text can be drawn normally and the font is
supported. This example svg <a href="../dev/svg/text.svg">text.svg</a> /
<!--link href="../dev/svg/text.pdf"-->text.pdf<!--/link-->
shows how various types and effects with text are handled.
Note that tspan and outlined text are not yet implemented.</p>
<p>
Otherwise, text is converted and drawn as a set of shapes by batik, using the stroking text painter.
This means that a typical character will
have about 10 curves (each curve consists of at least 20 characters).
This can make the pdf files large and when the pdf is viewed the
viewer does not normally draw those fine curves very well (turning on
Smooth Line Art in the Acrobat preferences will fix this).
If the text is inserted into the PDF using the inbuilt text commands
for PDF it will use a single character.
</p>
<p>Note that because SVG text can be rendered as either text or a vector graphic, you may need to consider settings in your viewer for both.
The Acrobat viewer has both "smooth line art" and "smooth text" settings that may need to be set for SVG images to be displayed nicely on your screen (see Edit / Preferences / Display).
This setting will not affect the printing of your document, which should be OK in any case, but will only affect the quality of the screen display.</p>
</section>
<section id="svg-scaling">
<title>Scaling</title>
<p>Currently, SVG images are rendered with the dimensions specified <em>in the SVG file</em>, within the viewport specified in the fo:external-graphic element.
For everything to work properly, the two should be equal.
The SVG standard leaves this issue as an implementation detail.
FOP will probably implement a scaling mechanism in the future.</p>
</section>
<section id="svg-problems">
<title>Known Problems</title>
<ul>
<li>
soft mask transparency is combined with white so that it looks better
on pdf 1.3 viewers but this causes the soft mask to be slightly lighter
or darker on pdf 1.4 viewers
</li>
<li>
there is some problem with a gradient inside a pattern causing a pdf
error when viewed in acrobat 5
</li>
<li>
text is not always handled correctly, it may select the wrong font
especially if characters have multiple fonts in the font list
</li>
<li>
more pdf text handling could be implemented
It could draw the string using the attributed character iterator
to handle tspans and other simple changes of text.
</li>
<li>
JPEG images are not inserted directly into the pdf document
This area has not been implemented yet since the appropriate
method in batik is static
</li>
<li>
Uniform transparency for images and other svg elements that are converted
into a raster graphic are not drawn properly in PDF. The image is opaque.
</li>
</ul>
</section>
</section>
<section id="tiff">
<title>TIFF</title>
<p>FOP-native TIFF support is limited to PDF and PostScript output only. Also, according to user reports, FOP's native support for TIFF is limited to images with the following characteristics (all must be true for successful rendering):</p>
<ul>
<li>single channel images (i.e., bi-level and grayscale only)</li>
<li>uncompressed images, or images using CCITT T.4, CCITT T.6, or JPEG compression</li>
<li>images using white-is-zero encoding in the TIFF PhotometricInterpretation tag</li>
</ul>
<p><em>JAI:</em> Supports RGB and RGBA only for FOP rendering.</p>
</section>
<section id="resolution">
<title>Graphics Resolution</title>
<p>Some bitmapped image file formats store a dots-per-inch (dpi) or other resolution value. Since PDF and most output formats do not have a concept of resolution, but only of absolute image units (i.e. pixels) FOP ignores the resolution values as well. Instead, FOP uses the dimensions of the image as specified in the fo:external-graphic element to render the image:</p>
<ul>
<li>If no dimensions are given, FOP uses a default value of 72 dpi to compute the graphic's dimensions. For example, suppose a graphic 300 pixels wide and 400 pixels high. FOP will render the graphic at 4.167 inches wide, 5.555 inches high, with an apparent resolution of 72 dpi.</li>
<li>If only one dimension is given, FOP by default uses the same aspect ratio to compute the other dimension (to avoid the appearance of stretching). For example, suppose a graphic 300 pixels wide and 400 pixels high, for which content-width = ".5in". FOP will compute the content-height = .667 inches, and will render the graphic at that size, with an apparent resolution of 600 dpi.</li>
<li>If both dimensions are given, FOP simply renders the image in that space. For example, suppose a graphic 300 pixels wide and 400 pixels high, for which content-width = "3in" and content-height = "4in". FOP will render the graphic at that size, with an apparent resolution of 100 dpi.</li>
</ul>
<p>If you need a higher apparent output resolution for bitmapped images, first make sure that at least one dimension of the image is defined in your XSL-FO input. Apart from that, resolution problems are in the image file itself, and must be corrected there: use or create a higher-resolution image file.</p>
<note>The explanation above describes only the basic default behavior. There are other attributes of the fo:external-graphic element that can affect the behavior described above.</note>
</section>
<section id="caching">
<title>Image caching</title>
<p>
FOP caches images between runs. The URL is used as a key to identify images which means that when
a particular URL appears again, the image is taken from the cache. If you have a servlet that
generates a different image each time it is called with the same URL you need to use a constantly
changing dummy parameter on the URL to avoid caching.
</p>
<p>
The image cache has been improved considerably in the redesigned code. Therefore, a resetCache() method
has become unnecessary. If you still experience OutOfMemoryErrors, please notify us.
</p>
</section>
</body>
</document>

+ 1
- 1
src/documentation/content/xdocs/0.94/index.xml View File

@@ -32,7 +32,7 @@
</p>
<p>
This fifth release contains many bug fix release and new features compared
to 0.92beta. To see what has changed since the last release, please visit the
to 0.93. To see what has changed since the last release, please visit the
<a href="changes_0.94.html">Changes Page</a> and the <a href="releaseNotes_0.94.html">Release Notes</a>.
</p>
</section>

src/documentation/content/xdocs/0.93/anttask.xml → src/documentation/content/xdocs/0.95/anttask.xml View File


src/documentation/content/xdocs/0.93/compiling.xml → src/documentation/content/xdocs/0.95/compiling.xml View File

@@ -41,7 +41,7 @@
<section id="env-jdk">
<title>JDK</title>
<p>
Building FOP requires a minimum Java Development Kit (JDK/SDK) of 1.3
Building FOP requires a minimum Java Development Kit (JDK/SDK) of 1.4
(A Java Runtime Environment is not sufficient).
</p>
</section>
@@ -59,7 +59,7 @@
<p>
The build script uses <a href="ext:ant">Apache Ant</a>, a popular
Java-based build tool, which usually requires that the environment variable JAVA_HOME point to
your local JDK root directory. This is true even if you use JDK 1.2 or above, which normally
your local JDK root directory. This is true even if you use JDK 1.4 or above, which normally
does not need this setting.
</p>
</section>
@@ -103,7 +103,8 @@
needed, but may be helpful if you are having problems with the build process itself.
</li>
<li>
<strong>javadocs</strong>: Generates javadocs. This creates the FOP API documentation.
<strong>javadocs</strong>: Creates the FOP API documentation.
<note>A minimum JDK version of 1.4.2 is required for generating the javadocs.</note>
</li>
</ul>
<p>To run the build:</p>

src/documentation/content/xdocs/0.93/configuration.xml → src/documentation/content/xdocs/0.95/configuration.xml View File

@@ -64,19 +64,21 @@
<tr>
<th>Element</th>
<th>Data Type (for the value)</th>
<th>Description</th>
<th>Default Value</th>
</tr>
<tr>
<td>base</td>
<td>URL or directory</td>
<td>Specifies the base URL based on which relative URL will be resolved.</td>
<td>current directory</td>
</tr>
<tr>
<td>font-base</td>
<td>URL or directory</td>
<td>Specifies the base URL based on which relative font URLs will be resolved.
If not specified defaults to the base URL above.
</td>
<td>base URL/directory (above)</td>
</tr>
<tr>
<td>hyphenation-base</td>
@@ -85,6 +87,7 @@
files will be resolved. If not specified, support for user-supplied hyphenation
patterns remains disabled.
</td>
<td>disabled</td>
</tr>
<tr>
<td>source-resolution</td>
@@ -93,6 +96,7 @@
Resolution in dpi (dots per inch) which is used internally to determine the pixel
size for SVG images and bitmap images without resolution information.
</td>
<td>72 dpi</td>
</tr>
<tr>
<td>target-resolution</td>
@@ -102,6 +106,17 @@
images generated by bitmap renderers (such as the TIFF renderer) and by bitmaps
generated by Apache Batik for filter effects and such.
</td>
<td>72 dpi</td>
</tr>
<tr>
<td>strict-configuration</td>
<td>Boolean (true, false)</td>
<td>
Setting this option to 'true' will cause FOP to strictly verify the contents of the
FOP configuration file to ensure that defined resources (such as fonts and base
URLs/directories) are valid and available to FOP. Any errors found will cause FOP to
immediately raise an exception.</td>
<td>false</td>
</tr>
<tr>
<td>strict-validation</td>
@@ -111,6 +126,7 @@
for example, you're allowed to specify a border on a region-body which is supported
by some FO implementations but is non-standard. Note that such a border would
currently have no effect in Apache FOP.</td>
<td>true</td>
</tr>
<tr>
<td>break-indent-inheritance</td>
@@ -124,6 +140,7 @@
the desired behaviour and because the behaviour among the commercial implementations
varies. The default for this option (i.e. false) is to behave exactly like the
specification describes.</td>
<td>false</td>
</tr>
<tr>
<td>default-page-settings</td>
@@ -132,11 +149,31 @@
Specifies the default width and height of a page if "auto" is specified
for either or both values. Use "height" and "width" attributes on the
default-page-settings element to specify the two values.</td>
<td>"height" 11 inches, "width" 8.26 inches</td>
</tr>
<tr>
<td>use-cache</td>
<td>boolean (true, false)</td>
<td>All fonts information that has been gathered as a result of "directory"
or "auto-detect" font configurations will be cached for future rendering runs.
This setting should improve performance on systems where
fonts have been configured using the "directory" or "auto-detect" tag mechanisms.
By default this option is switched on.</td>
<td>true</td>
</tr>
<tr>
<td>cache-file</td>
<td>String</td>
<td>This options specifies the file/directory path of the fop cache file.
This option can also be specified on the command-line using the -cache option.
This file is currently only used to cache font triplet information for future reference.</td>
<td>${base}/conf/fop.cache</td>
</tr>
<tr>
<td>renderers</td>
<td>(see text below)</td>
<td>Contains the configuration for each renderer. See below.</td>
<td>N/A</td>
</tr>
</table>
<p>
@@ -145,6 +182,12 @@
<source><![CDATA[
<fop version="1.0">

<!-- Strict user configuration -->
<strict-configuration>true</strict-configuration>

<!-- Strict FO validation -->
<strict-validation>true</strict-validation>

<!-- Base URL for resolving relative URLs -->
<base>./</base>

@@ -234,7 +277,23 @@
<output-profile>C:\FOP\Color\EuropeISOCoatedFOGRA27.icc</output-profile>
<fonts....
</renderer>]]></source>
</renderer>]]></source>
<p>
Some people don't have high requirements on color fidelity but instead want the smallest
PDF file sizes possible. In this case it's possible to disable the default sRGB color space
which XSL-FO requires. This will cause RGB colors to be generated as device-specific RGB.
Please note that this option is unavailable (and will cause an error) if you enable
PDF/A or PDF/X functionality or if you specify an output profile. This setting will make the
PDF about 4KB smaller. To disable the sRGB color space add the following setting:
</p>
<source><![CDATA[
<renderer mime="application/pdf">
<filterList...
<disable-srgb-colorspace>true</disable-srgb-colorspace>
<fonts....
</renderer>]]></source>
</section>
<section id="ps-renderer">
<title>Special Settings for the PostScript Renderer</title>
@@ -268,7 +327,7 @@
offered by Java.
</p>
<p>
Additionally, there are certain settings that control who the renderer handles various elements.
Additionally, there are certain settings that control how the renderer handles various elements.
</p>
<source><![CDATA[<renderer mime="application/vnd.hp-PCL">
<rendering>quality</rendering>
@@ -290,10 +349,10 @@
</section>
</section>

<section>
<title>When it does not work</title>
<section>
<title>When it does not work</title>

<p>FOP searches the configuration file for the information it
<p>FOP searches the configuration file for the information it
expects, at the position it expects. When that information is not
present, FOP will not complain, it will just continue. When there is
other information in the file, FOP will not complain, it will just
@@ -301,14 +360,14 @@ ignore it. That means that when your configuration information is in
the file but in a different XML element, or in a different XML path,
than FOP expects, it will be silently ignored.</p>

<p>Check the following possibilities:</p>
<p>Check the following possibilities:</p>

<ul>
<li>The format of the configuration file has changed
<ul>
<li>The format of the configuration file has changed
considerably between FOP 0.20.5 and FOP 1.0 and its beta versions. Did
you convert your file to the new format?</li>

<li>The FOP distribution contains a schema for configuration
<li>The FOP distribution contains a schema for configuration
files, at src/foschema/fop-configuration.xsd. Did you validate your
configuration file against it? Add the following schema location to
the <code>schema</code> element:
@@ -323,13 +382,13 @@ and run the configuration file through a validating schema
parser. Note that the schema cannot detect all errors, and that it is
stricter about the order of some elements than FOP itself is.</li>

<li>Run FOP in debug mode (command line option
<li>Run FOP in debug mode (command line option
<code>-d</code>). This makes FOP report which configuration
information it finds. Check if FOP finds what you expect.</li>

</ul>
</ul>

</section>
</section>
</body>
</document>


src/documentation/content/xdocs/0.93/embedding.xml → src/documentation/content/xdocs/0.95/embedding.xml View File

@@ -166,7 +166,7 @@ try {
<title>Logging</title>
<p>
Logging is now a little different than it was in FOP 0.20.5. We've switched from
Avalon Logging to <a href="ext:jakarta/commons/logging">Jakarta Commons Logging</a>.
Avalon Logging to <a href="ext:commons-logging">Jakarta Commons Logging</a>.
While with Avalon Logging the loggers were directly given to FOP, FOP now retrieves
its logger(s) through a statically available LogFactory. This is similar to the
general pattern that you use when you work with Apache Log4J directly, for example.
@@ -187,10 +187,10 @@ try {
which documents what we're going to build.
</note>
<p>
By default, <a href="ext:jakarta/commons/logging">Jakarta Commons Logging</a> uses
By default, <a href="ext:commons-logging">Jakarta Commons Logging</a> uses
JDK logging (available in JDKs 1.4 or higher) as its backend. You can configure Commons
Logging to use an alternative backend, for example Log4J. Please consult the
<a href="ext:jakarta/commons/logging">documentation for Jakarta Commons Logging</a> on
<a href="ext:commons-logging">documentation for Jakarta Commons Logging</a> on
how to configure alternative backends.
</p>
</section>
@@ -291,6 +291,13 @@ try {
</p>
<source>fopFactory.setFontBaseURL("file:///C:/Temp/fonts");</source>
</li>
<li>
<p>
The <strong>hyphenation base URL</strong> to use when resolving relative URLs for
hyphenation patterns. Example:
</p>
<source>fopFactory.setHyphenBaseURL("file:///C:/Temp/hyph");</source>
</li>
<li>
<p>
Disable <strong>strict validation</strong>. When disabled FOP is less strict about the rules

+ 234
- 0
src/documentation/content/xdocs/0.95/extensions.xml View File

@@ -0,0 +1,234 @@
<?xml version="1.0" standalone="no"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
<title>Standard FOP Extensions</title>
<version>$Revision$</version>
</header>
<body>
<p>
By "extension", we mean any data that can be placed in the input XML document that
is not addressed by the XSL-FO standard.
By having a mechanism for supporting extensions, FOP is able to add features that
are not covered in the specification.
</p>
<p>
The extensions documented here are included with FOP, and are automatically available
to you. If you wish to add an extension of your own to FOP, please see the
<a href="../dev/extensions.html">Developers' Extension Page</a>.
</p>
<note>All extensions require the correct use of an appropriate namespace in your input document.</note>
<section id="svg">
<title>SVG</title>
<p>
Please see the <a href="graphics.html#svg">SVG documentation</a> for more details.
</p>
</section>
<section id="fo-extensions">
<title>FO Extensions</title>
<section id="fox-namespace">
<title>Namespace</title>
<p>
By convention, FO extensions in FOP use the "fox" namespace prefix.
To use any of the FO extensions, add a namespace entry for
<code>http://xml.apache.org/fop/extensions</code> to the root element:
</p>
<source><![CDATA[<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">]]></source>
</section>
<section id="bookmarks">
<title>PDF Bookmarks</title>
<p>
In previous versions of Apache FOP there was a <code>fox:outline</code> element
which was used to create outlines in PDF files. The redesigned code makes use
of the new <a href="http://www.w3.org/TR/xsl11/#fo_bookmark-tree">bookmark feature defined in the latest XSL 1.1 working draft</a>.
</p>
</section>
<section id="named-destinations">
<title>Anchors or Named Destinations</title>
<p>Use the fox:destination element to define "named destinations" inside a PDF document.
These are useful as fragment identifiers, e.g. "http://server/document.pdf#anchor-name".
fox:destination elements can be placed almost anywhere in the fo document, including a child of
root, a block-level element, or an inline-level element.
For the destination to actually work, it must correspond to an "id" attribute on some fo element
within the document. In other words, the "id" attribute actually creates the "view" within the
PDF document. The fox:destination simply gives that view an independent name.
</p>
<source><![CDATA[<fox:destination internal-destination="table-of-contents"/>
...
<fo:block id="table-of-contents">Table of Contents</fo:block>]]></source>
<warning>It is possible that in some future release of FOP, <em>all </em>elements with
"id" attributes will generate named-destinations, which will eliminate the need for
fox:destination.</warning>
</section>
<section id="table-continue-label">
<title>Table Continuation Label</title>
<p>This extension element hasn't been reimplemented for the redesigned code, yet.</p>
<!--p>Use the fox:continued-label element to create content in table-header and
table-footer cells that will appear only on pages after the first page that the table
appears. fox:continued-label is itself inline content, and is a container of fo:inline
content. This content will be laid out only if the table does not fit on a single page and flows
to following pages. Here is an example of FO code creating such a table-header:</p>
<source><![CDATA[<fo:table-header>
<fo:table-row>
<fo:table-cell>
<fo:block>Header column 1 with continued label
<fox:continued-label><fo:inline> (cont.)</fo:inline></fox:continued-label>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>Header column 2 with no continued label</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>]]></source-->
</section>
<section id="widow-orphan-content-limit">
<title>fox:orphan-content-limit and fox:widow-content-limit</title>
<p>
The two proprietary extension properties, fox:orphan-content-limit and
fox:widow-content-limit, are used to improve the layout of list-blocks and tables.
If you have a table with many entries, you don't want a single row to be left over
on a page. You will want to make sure that at least two or three lines are kept
together. The properties take an absolute length which specifies the area at the
beginning (fox:widow-content-limit) or at the end (fox:orphan-content-limit) of a
table or list-block. The properties are inherited and only have an effect on fo:table
and fo:list-block. An example: fox:widow-content-limit="3 * 1.2em" would make sure
the you'll have at least three lines (assuming line-height="1.2") together on a table
or list-block.
</p>
</section>
<section id="external-document">
<title>fox:external-document</title>
<note>
This feature is incomplete. Support for multi-page documents will be added shortly.
At the moment, only single-page images will work. And this will not work with RTF output.
</note>
<p>
This is a proprietary extension element which allows to add whole images as pages to
an FO document. For example, if you have a scanned document or a fax as multi-page TIFF
file, you can append or insert this document using the <code>fox:external-document</code>
element. Each page of the external document will create one full page in the target
format.
</p>
<p>
The <code>fox:external-document</code> element is structurally a peer to
<code>fo:page-sequence</code>, so wherever you can put an <code>fo:page-sequence</code>
you could also place a <code>fox:external-document</code>.
Therefore, the specified contents for <code>fo:root</code> change to:
</p>
<p>
<code>
(layout-master-set, declarations?, bookmark-tree?, (page-sequence|page-sequence-wrapper|fox:external-document|fox:destination)+)
</code>
</p>
<section>
<title>Specification</title>
<p>
The <code>fox:external-document</code> extension formatting object is used to specify
how to create a (sub-)sequence of pages within a document. The content of these pages
comes from the individual subimages/pages of an image or paged document (for example:
multi-page TIFF in the form of faxes or scanned documents, or PDF files). The
formatting object creates the necessary areas to display one image per page.
</p>
<p>
In terms of page numbers, the behaviour is the same as for
<code>fo:page-sequence</code>. The placement of the image inside the page is similar
to that of <code>fo:external-graphic</code> or <code>fo:instream-foreign-object</code>,
i.e. the viewport (and therefore the page size) is defined by either the intrinsic
size of the image or by the size properties that apply to this formatting object.
</p>
<p>Content: EMPTY</p>
<p>The following properties apply to this formatting object:</p>
<ul>
<li>(Common Accessibility Properties) (not implemented, yet)</li>
<li>(Common Aural Properties) (not implemented, yet)</li>
<li>block-progression-dimension</li>
<li>content-height</li>
<li>content-type</li>
<li>content-width</li>
<li>display-align</li>
<li>height</li>
<li>id</li>
<li>inline-progression-dimension</li>
<li>overflow</li>
<li>pages: &lt;page-set&gt; (see below) (not implemented, yet)</li>
<li>reference-orientation</li>
<li>scaling</li>
<li>scaling-method</li>
<li>src</li>
<li>text-align</li>
<li>width</li>
</ul>
<p>
Datatype "page-set": Value: auto | &lt;integer-range&gt;,
Default: "auto" which means all pages/subimages of the document.
&lt;integer-range&gt; allows values such as "7" or "1-3"
</p>
<note>
<code>fox:external-document</code> is not suitable for concatenating FO documents.
For this, XInclude is recommended.
</note>
</section>
</section>
<section id="transform">
<title>Free-form Transformation for fo:block-container</title>
<p>
For <code>fo:block-container</code> elements whose <code>absolute-position</code> set to
"absolute" or "fixed" you can use the extension attribute <code>fox:transform</code>
to apply a free-form transformation to the whole block-container. The content of the
<code>fox:transform</code> attribute is the same as for
<a href="http://www.w3.org/TR/SVG/coords.html#TransformAttribute">SVG's transform attribute</a>.
The transformation specified here is performed in addition to other implicit
transformations of the block-container (resulting from top, left and other properties)
and after them.
</p>
<p>
Examples: <code>fox:transform="rotate(45)"</code> would rotate the block-container
by 45 degrees clock-wise around its upper-left corner.
<code>fox:transform="translate(10000,0)"</code> would move the block-container to the
right by 10 points (=10000 millipoints, FOP uses millipoints internally!).
</p>
<note>
This extension attribute doesn't work for all output formats! It's currently only
supported for PDF, PS and Java2D-based renderers.
</note>
</section>
<section id="color-functions">
<title>Color functions</title>
<p>
XSL-FO supports specifying color using the rgb(), rgb-icc() and system-color() functions.
Apache FOP provides additional color functions for special use cases. Please note that
using these functions compromises the interoperability of an FO document.
</p>
<section id="color-function-cmyk">
<title>cmyk()</title>
<p><code>color cmyk(numeric, numeric, numeric, numeric)</code></p>
<p>
This function will construct a color in device-specific CMYK color space. The numbers
must be between 0.0 and 1.0. For output formats that don't support device-specific
color space the CMYK value is converted to an sRGB value.
</p>
</section>
</section>
</section>
</body>
</document>


+ 410
- 0
src/documentation/content/xdocs/0.95/fonts.xml View File

@@ -0,0 +1,410 @@
<?xml version="1.0" standalone="no"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
<title>Apache FOP: Fonts</title>
<version>$Revision$</version>
<authors>
<person name="Jeremias Märki" email=""/>
<person name="Tore Engvig" email=""/>
<person name="Adrian Cumiskey" email=""/>
<person name="Max Berger" email=""/>
</authors>
</header>
<body>
<section id="intro">
<title>Summary</title>
<p>The following table summarizes the font capabilities of the various FOP renderers:</p>
<table>
<tr>
<th>Renderer</th>
<th>Base-14</th>
<th>AWT/OS</th>
<th>Custom</th>
<th>Custom Embedding</th>
</tr>
<tr>
<td>PDF</td>
<td>yes</td>
<td>no</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>PostScript</td>
<td>yes</td>
<td>no</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>PCL</td>
<td>yes (modified)</td>
<td>yes (painted as bitmaps)</td>
<td>yes (painted as bitmaps)</td>
<td>no</td>
</tr>
<tr>
<td>AFP</td>
<td>no</td>
<td>no</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>Java2D/AWT/Bitmap</td>
<td>if available from OS</td>
<td>yes</td>
<td>yes</td>
<td>n/a (display only)</td>
</tr>
<tr>
<td>Print</td>
<td>if available from OS</td>
<td>yes</td>
<td>yes</td>
<td>controlled by OS printer driver</td>
</tr>
<tr>
<td>RTF</td>
<td>n/a (font metrics not needed)</td>
<td>n/a</td>
<td>n/a</td>
<td>n/a</td>
</tr>
<tr>
<td>TXT</td>
<td>yes (used for layout but not for output)</td>
<td>no</td>
<td>yes (used for layout but not for output)</td>
<td>no</td>
</tr>
<!--tr> NOT AVAILABLE
<td>MIF</td>
<td>n/a (font metrics not needed)</td>
<td>n/a</td>
<td>n/a</td>
<td>n/a</td>
</tr-->
<!--tr> NOT AVAILABLE
<td>SVG</td>
<td>if available from OS</td>
<td>yes</td>
<td>no</td>
<td>no</td>
</tr-->
<tr>
<td>XML</td>
<td>yes</td>
<td>no</td>
<td>yes</td>
<td>n/a</td>
</tr>
</table>
</section>
<section>
<title>Base-14 Fonts</title>
<p>
The Adobe PostScript and PDF Specification specify a set of 14 fonts that must be
available to every PostScript interpreter and PDF reader:
Helvetica (normal, bold, italic, bold italic),
Times (normal, bold, italic, bold italic),
Courier (normal, bold, italic, bold italic),
Symbol and ZapfDingbats.
</p>
<p>
Please note that recent versions of Adobe Acrobat Reader replace
"Helvetica" with "Arial" and "Times" with "Times New Roman" internally.
GhostScript replaces "Helvetica" with "Nimbus Sans L" and "Times" with
"Nimbus Roman No9 L". Other document viewers may do similar font
substitutions. If you need to make sure that there are no such
substitutions, you need to specify an explicit font and embed it in
the target document.
</p>
</section>
<section>
<title>Missing Fonts</title>
<p>
When FOP does not have a specific font at its disposal (because it's
not installed in the operating system or set up in FOP's configuration),
the font is replaced with "any". "any" is internally mapped to the
Base-14 font "Times" (see above).
</p>
</section>
<section id="awt">
<title>Java2D/AWT/Operating System Fonts</title>
<p>
The Java2D family of renderers (Java2D, AWT, Print, TIFF, PNG), use the
Java AWT subsystem for font metric information. Through operating system
registration, the AWT subsystem knows what fonts are available on the system,
and the font metrics for each one.
</p>
<p>
When working with one of these output formats and you're missing a font, just
install it in your operating system and they should be available for these
renderers. Please note that this is not true for other output formats such as
PDF or PostScript.
</p>
</section>
<section id="custom">
<title>Custom Fonts</title>
<p>
Support for custom fonts is highly output format dependent (see above table).
This section shows how to add Type 1 and TrueType fonts to the PDF, PostScript and
Java2D-based renderers. Other renderers (like AFP) support other font formats. Details
in this case can be found on the page about <a href="output.html">output formats</a>.
</p>
<p>
Prior to FOP version 0.94, it was always necessary to create an XML font metrics file
if you wanted to add a custom font. This unconvenient step has been removed and in
addition to that, FOP supports auto-registration of fonts, i.e. FOP can find fonts
installed in your operating system or can scan user-specified directories for fonts.
Font registration via XML font metrics file is still supported and is still necessary
if you want to use a TrueType Collection (*.ttc). Direct support for TrueType
collections may be added later. Furthermore, the XML font metrics files are still
required if you don't want to embed, but only reference a font.
</p>
<p>
Basic information about fonts can be found at:
</p>
<ul>
<li><a href="http://partners.adobe.com/asn/developer/type/ftypes.html">Adobe font types</a></li>
<li><a href="http://partners.adobe.com/asn/developer/technotes/fonts.html">Adobe Font Technote</a></li>
</ul>
</section>
<section id="basics">
<title>Basic font configuration</title>
<p>
If you want FOP to use custom fonts, you need to tell it where to find them. This
is done in the configuration file and once per renderer (because each output format
is a little different). In the basic form, you can either tell FOP to find your
operating system fonts or you can specify directories that it will search for
support fonts. These fonts will then automatically be registered.
</p>
<source><![CDATA[
<fonts>
<!-- register all the fonts found in a directory -->
<directory>C:\MyFonts1</directory>
<!-- register all the fonts found in a directory
and all of its sub directories (use with care) -->
<directory recursive="true">C:\MyFonts2</directory>

<!-- automatically detect operating system installed fonts -->
<auto-detect/>
</fonts>]]></source>
<note>
Review the documentation for <a href="configuration.html">FOP Configuration</a>
for instructions on making the FOP configuration available to FOP when it runs.
Otherwise, FOP has no way of finding your custom font information. It is currently
not possible to easily configure fonts from Java code.
</note>
</section>
<section id="advanced">
<title>Advanced font configuration</title>
<p>
The instructions found above should be sufficient for most users. Below are some
additional instructions in case the basic font configuration doesn't lead to
the desired results.
</p>
<section id="type1-metrics">
<title>Type 1 Font Metrics</title>
<p>FOP includes PFMReader, which reads the PFM file that normally comes with a Type 1 font, and generates an appropriate font metrics file for it.
To use it, run the class org.apache.fop.fonts.apps.PFMReader:</p>
<p>Windows:</p>
<source>java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file</source>
<p>Unix:</p>
<source>java -cp build/fop.jar:lib/avalon-framework.jar:lib/commons-logging.jar:lib/commons-io.jar
org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file</source>
<p>PFMReader [options]:</p>
<ul>
<li><strong>-fn &lt;fontname&gt;</strong> By default, FOP uses the fontname from the
.pfm file when embedding the font. Use the "-fn" option to override this name with one you have
chosen. This may be useful in some cases to ensure that applications using the output document
(Acrobat Reader for example) use the embedded font instead of a local font with the same
name.</li>
</ul>
<note>The classpath in the above example has been simplified for readability.
You will have to adjust the classpath to the names of the actual JAR files in the lib directory.
xml-apis.jar, xercesImpl.jar, xalan.jar and serializer.jar are not necessary for JDK version 1.4 or later.</note>
<note>The tool will construct some values (FontBBox, StemV and ItalicAngle) based on assumptions and calculations which are only an approximation to the real values.
FontBBox and Italic Angle can be found in the human-readable part of the PFB file or in the AFM file.
The PFMReader tool does not yet interpret PFB or AFM files, so if you want to be correct, you may have to adjust the values in the XML file manually.
The constructed values however appear to have no visible influence.</note>
</section>
<section id="truetype-metrics">
<title>TrueType Font Metrics</title>
<p>FOP includes TTFReader, which reads the TTF file and generates an appropriate font metrics file for it.
Use it in a similar manner to PFMReader.
For example, to create such a metrics file in Windows from the TrueType font at c:\myfonts\cmr10.ttf:</p>
<source>java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
org.apache.fop.fonts.apps.TTFReader [options]
C:\myfonts\cmr10.ttf ttfcm.xml</source>
<p>TTFReader [options]:</p>
<ul>
<li><strong>-d &lt;DEBUG | INFO &gt;</strong> Sets the debug level (default is
INFO).</li>
<li><strong>-fn &lt;fontname&gt;</strong> Same as for PFMReader.</li>
<li><strong>-ttcname &lt;fontname&gt;</strong> If you're reading data from a
TrueType Collection (.ttc file) you must specify which font from the collection you will read
metrics from.
If you read from a .ttc file without this option, the fontnames will be listed for you.</li>
<li><strong>-enc ansi</strong> Creates a WinAnsi-encoded font metrics file.
Without this option, a CID-keyed font metrics file is created.
The table below summarizes the differences between these two encoding options as currently
used within FOP.
Please note that this information only applies to TrueType fonts and TrueType collections:</li>
</ul>
<table id="ttf-encoding">
<tr>
<th>Issue</th>
<th>WinAnsi</th>
<th>CID-keyed</th>
</tr>
<tr>
<td>Usable Character Set</td>
<td>Limited to WinAnsi character set, which is roughly equivalent to iso-8889-1.</td>
<td>Limited only by the characters in the font itself.</td>
</tr>
<tr>
<td>Embedding the Font</td>
<td>Optional.</td>
<td>Mandatory. Not embedding the font produces invalid PDF documents.</td>
</tr>
</table>
<warning>
You may experience failures with certain TrueType fonts, especially if they don't contain
the so-called Unicode "cmap" table. TTFReader can currently not deal with font like this.
</warning>
</section>
<section id="truetype-collections-metrics">
<title>TrueType Collections Font Metrics</title>
<p>TrueType collections (.ttc files) contain more than one font.
To create metrics files for these fonts, you must specify which font in the collection should be generated, by using the "-ttcname" option with the TTFReader.</p>
<p>To get a list of the fonts in a collection, just start the TTFReader as if it were a normal TrueType file (without the -ttcname option).
It will display all of the font names and exit with an Exception.</p>
<p>Here is an example of generating a metrics file for a .ttc file:</p>
<source>java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
org.apache.fop.fonts.apps.TTFReader -ttcname "MS Mincho"
msmincho.ttc msminch.xml</source>
</section>
<section id="register">
<title>Register Fonts with FOP</title>
<p>You must tell FOP how to find and use the font metrics files by registering them in the <a href="configuration.html">FOP Configuration</a>. Add entries for your custom fonts, regardless of font type, to the configuration file in a manner similar to the following:</p>
<source><![CDATA[
<fonts>
<!-- register a particular font -->
<font metrics-url="file:///C:/myfonts/FTL_____.xml" kerning="yes"
embed-url="file:///C:/myfonts/FTL_____.pfb">
<font-triplet name="FrutigerLight" style="normal" weight="normal"/>
</font>
<!-- register all the fonts found in a directory -->
<directory>C:\MyFonts1</directory>
<!-- register all the fonts found in a directory
and all of its sub directories (use with care) -->
<directory recursive="true">C:\MyFonts2</directory>

<!-- automatically detect operating system installed fonts -->
<auto-detect/>
</fonts>]]></source>
<ul>
<li>
URLs are used to access the font metric and font files.
Relative URLs are resolved relative to the font-base property (or base) if available.
See <a href="configuration.html">FOP: Configuration</a> for more information.
</li>
<li>The "metrics-url" attribute is generally not necessary except if you run into problems with certain fonts.</li>
<li>Either an "embed-url" or a "metrics-url" must be specified for font tag configurations.</li>
<li>The font "kerning" attribute is optional. Default is "true".</li>
<li>If embedding is off (i.e. embed-url is not set), the output will position the text correctly (from the metrics file), but it will not be displayed or printed correctly unless the viewer has the applicable font available to their local system.</li>
<li>When setting the "embed-url" attribute for Type 1 fonts, be sure to specify the PFB (actual font data), not PFM (font metrics) file that you used to generate the XML font metrics file.</li>
<li>The fonts "directory" tag can be used to register fonts contained within a single or list of directory paths. The "recursive" attribute can be specified to recursively add fonts from all sub directories.</li>
<li>The fonts "auto-detect" tag can be used to automatically register fonts that are found to be installed on the native operating system.</li>
<li>Fonts registered with "font" tag configurations override fonts found by means of "directory" tag definitions.</li>
<li>Fonts found as a result of a "directory" tag configuration override fonts found as a result of the "auto-detect" tag being specified.</li>
<li>
If relative URLs are specified, they are evaluated relative to the value of the
"font-base" setting. If there is no "font-base" setting, the fonts are evaluated
relative to the base directory.
</li>
</ul>
<!--note>Cocoon users will need to setup the config, see FOPSerializer for more information.</note-->
</section>
<section id="autodetect">
<title>Auto-Detect and auto-embedd feature</title>
<p>When the "auto-detect" flag is set in the configuration, FOP will automatically search for fonts in the default paths for your operating system.</p>
<p>FOP will also auto-detect fonts which are available in the classpath, if they are described as "application/x-font" in the MANIFEST.MF file. For example, if your .jar file contains font/myfont.ttf:</p>
<source>Manifest-Version: 1.0
Name: font/myfont.ttf
Content-Type: application/x-font</source>
<p>This feature allows you to create JAR files containing fonts. The JAR files can be added to fop by providem them in the classpath, e.g. copying them into the lib/ directory.</p>
</section>
<section id="embedding">
<title>Embedding</title>
<note>The PostScript renderer does not yet support TrueType fonts, but can embed Type 1 fonts.</note>
<note>The font is simply embedded into the PDF file, it is not converted.</note>
<p>Font embedding is enabled in the userconfig.xml file and controlled by the embed-url attribute.
If you don't specify the embed-url attribute the font will not be embedded, but will only be referenced.</p>
<warning>
Omitting the embed-url attribute for CID-encoded TrueType fonts will currently produce invalid
PDF files! If you create the XML font metric file using the "-enc ansi" option, you can omit
the embed-url attribute for TrueType fonts but you're restricted to the WinAnsi character set.
</warning>
<p>When FOP embeds a font, it adds a prefix to the fontname to ensure that the name will not match the fontname of an installed font.
This is helpful with older versions of Acrobat Reader that preferred installed fonts over embedded fonts.</p>
<p>When embedding PostScript fonts, the entire font is always embedded.</p>
<p>When embedding TrueType fonts (ttf) or TrueType Collections (ttc), a subset of the
original font, containing only the glyphs used, is embedded in the output document.</p>
</section>
<!-- The following section should no longer be required
<section id="embedding-base14">
<title>Explicitly embedding the base 14 fonts</title>
<p>
There are cases where you might want to force the embedding of one or more of the base 14 fonts that
can normally be considered available on the target platform (viewer, printer). One of these cases is
<a href="pdfa.html">PDF/A</a> which mandates the embedding of even the base 14 fonts. Embedding a font such as Helvetica or
Courier is straight-forward. The "Symbol" and "ZapfDingbats" fonts, however, currently present a
problem because FOP cannot correctly determine the encoding of these two single-byte fonts through
the PFM file. FOP now correctly interprets the "encoding" value in the XML font metrics file, but the
PFMReader application writes "UnknownEncoding" to the generated XML file. In order to embed "Symbol"
and "ZapfDingbats" you have to manually change the XML font metrics file and specify "SymbolEncoding"
or "ZapfdingbatsEncoding" encoding respectively as the value for the "encoding" element.
</p>
<p>Example:</p>
<source><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<font-metrics type="TYPE1">
<font-name>Symbol</font-name>
<embed/>
<encoding>SymbolEncoding</encoding>
<cap-height>673</cap-height>
<x-height>766</x-height>
[..]]]></source>
</section-->
</section>
</body>
</document>

src/documentation/content/xdocs/0.93/fotree/disabled-testcases.xml → src/documentation/content/xdocs/0.95/fotree/disabled-testcases.xml View File

@@ -17,11 +17,6 @@
-->
<!-- $Id$ -->
<disabled-testcases>
<testcase>
<name>demo test failure</name>
<file>demo-test-failure.fo</file>
<description></description>
</testcase>
<testcase>
<name>Markers and core function evaluation</name>
<file>from-table-column_marker.fo</file>

+ 551
- 0
src/documentation/content/xdocs/0.95/graphics.xml View File

@@ -0,0 +1,551 @@
<?xml version="1.0" standalone="no"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
<title>Apache FOP: Graphics Formats</title>
<version>$Revision$</version>
</header>
<body>
<section id="introduction">
<title>Introduction</title>
<p>
After the Apache FOP 0.94 release, the image handling subsystem has been rewritten in
order to improve the range of supported images and image subtypes, to lower the
overall memory consumption when handling images, to produce smaller output files and to
increase the performance in certain areas. Of course, this causes a few changes most of
which the user will probably not notice. The most important changes are:
</p>
<ul>
<li>
The image libraries Jimi and JAI are no longer supported. Instead, Apache FOP uses the
Image I/O API that was introduced with Java 1.4 for all bitmap codecs.
</li>
<li>
Some bitmap images are no longer converted to a standardized 24 bit RGB image but are
instead handled in their native format.
</li>
<li>
A plug-in mechanism offers a possibility to add support for new formats without changing
the FOP's source code.
</li>
</ul>
<p>
The actual <a href="http://xmlgraphics.apache.org/commons/image-loader.html">image loading framework</a>
no longer resides in Apache FOP, but was instead placed in
<a href="ext:xmlgraphics.apache.org/commons/">XML Graphics Commons</a>.
</p>
</section>
<section id="support-overview">
<title>Overview of Graphics Support</title>
<p>
The table below summarizes the <em>theoretical</em> support for graphical formats
within FOP. In other words, within the constraints of the limitations listed here,
these formats <em>should</em> work. However, many of them have not been tested,
and there may be limitations that have not yet been discovered or documented.
The packages needed to support some formats are not included in the FOP distribution
and must be installed separately. Follow the links in the "Support Through" columns
for more details.
</p>
<table>
<tr>
<th rowspan="2">Format</th>
<th rowspan="2">Type</th>
<th colspan="3">Support Through</th>
</tr>
<tr>
<th><a href="#native">Apache FOP (native)</a></th>
<th><a href="#batik">Apache Batik</a></th>
<th><a href="#imageio">Image I/O</a></th>
</tr>
<tr>
<td><a href="#bmp">BMP</a> (Microsoft Windows Bitmap)</td>
<td>bitmap</td>
<td></td>
<td></td>
<td>X [1]</td>
</tr>
<tr>
<td><a href="#emf">EMF</a> (Windows Enhanced Metafile)</td>
<td>vector (with embedded bitmaps)</td>
<td>(X)</td>
<td></td>
<td></td>
</tr>
<tr>
<td><a href="#eps">EPS</a> (Encapsulated PostScript)</td>
<td>metafile (both bitmap and vector), most frequently used for vector drawings</td>
<td>(X)</td>
<td></td>
<td></td>
</tr>
<tr>
<td>GIF (Graphics Interchange Format)</td>
<td>bitmap</td>
<td></td>
<td></td>
<td>X</td>
</tr>
<tr>
<td><a href="#jpeg">JPEG</a> (Joint Photographic Experts Group)</td>
<td>bitmap</td>
<td>(X)</td>
<td></td>
<td>X</td>
</tr>
<tr>
<td><a href="#png">PNG</a> (Portable Network Graphic)</td>
<td>bitmap</td>
<td></td>
<td></td>
<td>X</td>
</tr>
<tr>
<td><a href="#svg">SVG</a> (Scalable Vector Graphics)</td>
<td>vector (with embedded bitmaps)</td>
<td></td>
<td>X</td>
<td></td>
</tr>
<tr>
<td><a href="#tiff">TIFF</a> (Tag Image Format File)</td>
<td>bitmap</td>
<td>(X)</td>
<td></td>
<td>X [1]</td>
</tr>
<tr>
<td><a href="#wmf">WMF</a> (Windows Metafile)</td>
<td>vector (with embedded bitmaps)</td>
<td></td>
<td>(X)</td>
<td></td>
</tr>
</table>
<p>
Legend:
</p>
<ul>
<li>"(X)" means restricted support. Please see the details below.</li>
<li>
[1]: Requires the presence of <a href="http://jai-imageio.dev.java.net/">JAI Image I/O Tools</a>
(or an equivalent Image I/O compatible codec) in the classpath. JAI Image I/O Tools also
adds support for JPEG 2000, WBMP, RAW and PNM. Other Image I/O codecs may provide
support for additional formats.
</li>
</ul>
<note>
<a href="http://jai-imageio.dev.java.net/">JAI Image I/O Tools</a> is not the same as the
<a href="http://java.sun.com/javase/technologies/desktop/media/jai/">JAI library</a>! The
former simply exposes JAI's codecs using the Image&nbsp;I/O API but does not include all
the image manipulation functionality.
</note>
<section id="format-map">
<title>Map of supported image formats by output format</title>
<p>
Not all image formats are supported for all output formats! For example, while you can
use EPS (Encapsulated PostScript) files when you generate PostScript output, this format
will not be supported by any other output format. Here's an overview of which image
formats are supported by which output format:
</p>
<table>
<tr>
<th>Image Format</th>
<th>PDF</th>
<th>PostScript</th>
<th>Java2D, PNG, TIFF, AWT</th>
<th>PCL</th>
<th>AFP</th>
<th>RTF</th>
</tr>
<tr>
<td><a href="#bmp">BMP</a> (Microsoft Windows Bitmap)</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td><a href="#emf">EMF</a> (Windows Enhanced Metafile)</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X [1]</td>
</tr>
<tr>
<td><a href="#eps">EPS</a> (Encapsulated PostScript)</td>
<td></td>
<td>X [1]</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>GIF (Graphics Interchange Format)</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td><a href="#jpeg">JPEG</a> (Joint Photographic Experts Group)</td>
<td>X [1]</td>
<td>X [1]</td>
<td>X</td>
<td>X</td>
<td>X [1]</td>
<td>X</td>
</tr>
<tr>
<td><a href="#png">PNG</a> (Portable Network Graphic)</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td><a href="#svg">SVG</a> (Scalable Vector Graphics)</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td><a href="#tiff">TIFF</a> (Tag Image Format File)</td>
<td>X [2]</td>
<td>X [2]</td>
<td>X</td>
<td>X</td>
<td>X [2]</td>
<td>X</td>
</tr>
<tr>
<td><a href="#wmf">WMF</a> (Windows Metafile)</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
</table>
<p>
Legend:
</p>
<ul>
<li>
[1]: Supported without the need to decode the image.
</li>
<li>
[2]: Supported without the need to decode the image, but only for certain subtypes.
</li>
</ul>
</section>
</section>
<section id="packages">
<title>Graphics Packages</title>
<section id="native">
<title>XML Graphics Commons Native</title>
<p>
<a href="ext:xmlgraphics.apache.org/commons">XML Graphics Commons</a> supports a number
of graphic file formats natively as basic functionality: all bitmap formats for which
there are Image I/O codecs available (JPEG, PNG, GIF, TIFF, etc.), EPS and EMF.
</p>
</section>
<section id="fop-native">
<title>FOP Native</title>
<p>
FOP has no native image plug-ins for the image loading framework of its own but currently
hosts the Batik-dependent SVG and WMF plug-ins until they can be moved to
<a href="ext:xmlgraphics.apache.org/batik">Apache Batik</a>.
</p>
</section>
<section id="batik">
<title>Apache Batik</title>
<p>
<a href="ext:xmlgraphics.apache.org/batik">Apache Batik</a> will later receive the
SVG and WMF plug-ins for the image loading framework that are currently hosted inside
FOP.
</p>
<p>
Current FOP distributions include a distribution of the
<a class="fork" href="ext:xmlgraphics.apache.org/batik">Apache Batik</a>.
Because Batik's API changes frequently, it is highly recommended that you use the
version that ships with FOP, at least when running FOP.
</p>
<warning>Batik must be run in a graphical environment.</warning>
<p>
Batik must be run in a graphical environment.
It uses AWT classes for rendering SVG, which in turn require an X server on Unixish
systems. If you run a server without X, or if you can't connect to the X server due to
security restrictions or policies (a so-called "headless" environment), SVG rendering
will fail.
</p>
<p>Here are some workarounds:</p>
<ul>
<li>
Start Java with the <code>-Djava.awt.headless=true</code> command line option.
</li>
<li>
Install an X server which provides an in-memory framebuffer without actually using a
screen device or any display hardware. One example is Xvfb.
</li>
<li>
Install a toolkit which emulates AWT without the need for an underlying X server. One
example is the <a href="http://www.eteks.com/pja/en">PJA toolkit</a>, which is free
and comes with detailed installation instructions.
</li>
</ul>
</section>
</section>
<section id="image-formats">
<title>Details on image formats</title>
<section id="bmp">
<title>BMP</title>
<p>
BMP images are supported through an Image I/O codec. There may be limitations of the
codec which are outside the control of Apache FOP.
</p>
</section>
<section id="emf">
<title>EMF</title>
<p>
Windows Enhanced Metafiles (EMF) are only supported in RTF output where they are
embedded without decoding.
</p>
</section>
<section id="eps">
<title>EPS</title>
<p>Apache FOP allows to use EPS files when generating PostScript output only.</p>
<p>
Other output targets can't be supported at the moment because
FOP lacks a PostScript interpreter. Furthermore, FOP is currently not able
to parse the preview bitmaps sometimes contained in EPS files.
</p>
</section>
<section id="gif">
<title>GIF</title>
<p>
GIF images are supported through an Image&nbsp;I/O codec. Transparency is supported but
not guaranteed to work with every output format.
</p>
</section>
<section id="jpeg">
<title>JPEG</title>
<p>
FOP native support (i.e. the handling of undecoded images) of JPEG does not include all
variants, especially those containing unusual color lookup tables and color profiles.
If you have trouble with a JPEG image in FOP, try opening it with an image processing
program (such as Photoshop or Gimp) and then saving it. Specifying 24-bit color output
may also help. For the PDF and PostScript renderers most JPEG images can be passed
through without decompression. User reports indicate that grayscale, RGB, and
CMYK color spaces are all rendered properly. However, for other output formats, the
JPEG images have to be decompressed. Tests have shown that there are some limitation
in some Image&nbsp;I/O codecs concerning images in the CMYK color space. Work-arounds are
in place but may not always work as expected.
</p>
</section>
<section id="png">
<title>PNG</title>
<p>
PNG images are supported through an Image&nbsp;I/O codec. Transparency is supported but
not guaranteed to work with every output format.
</p>
</section>
<section id="svg">
<title>SVG</title>
<section id="svg-intro">
<title>Introduction</title>
<p>FOP uses <a href="#batik"> Apache Batik</a> for SVG support.
This format can be handled as an <code>fo:instream-foreign-object</code> or in a separate
file referenced with <code>fo:external-graphic</code>.</p>
<note>
Batik's SVG Rasterizer utility may also be used to convert standalone SVG
documents into PDF. For more information please see the
<a href="http://xmlgraphics.apache.org/batik/svgrasterizer.html">SVG Rasterizer documentation</a>
on the Batik site.
</note>
</section>
<section id="svg-pdf-graphics">
<title>Placing SVG Graphics into PDF</title>
<p>
The SVG is rendered into PDF by using PDF commands to draw and fill
lines and curves. This means that the graphical objects created with
this remain as vector graphics. The same applies to PostScript output.
For other output formats the SVG graphic may be converted to a bitmap
image.
</p>
<p>
There are a number of SVG things that cannot be converted directly into
PDF. Parts of the graphic such as effects, patterns and images are inserted
into the PDF as a raster graphic. The resolution of these raster images can
be controlled through the "target resolution" setting in the
<a href="configuration.html">configuration</a>.</p>
<p>
Currently transparency is limited in PDF so many SVG images that
contain effects or graphics with transparent areas may not be displayed
correctly.
</p>
</section>
<section id="svg-pdf-text">
<title>Placing SVG Text into PDF and PostScript</title>
<p>If possible, Batik will use normal PDF or PostScript text when inserting text. It does
this by checking if the text can be drawn normally and the font is
supported. This example svg <a href="../dev/svg/text.svg">text.svg</a> /
<!--link href="../dev/svg/text.pdf"-->text.pdf<!--/link-->
shows how various types and effects with text are handled.
Note that tspan and outlined text are not yet implemented.</p>
<p>
Otherwise, text is converted and drawn as a set of shapes by Batik, using the
stroking text painter. This means that a typical character will
have about 10 curves (each curve consists of at least 20 characters).
This can make the output files large and when it is viewed the
viewer may not normally draw those fine curves very well (In Adobe Acrobat, turning on
"Smooth Line Art" in the preferences will fix this). Copy/paste functionality
will not be supported in this case.
If the text is inserted into the output file using the inbuilt text commands
it will use a single character.
</p>
<p>
Note that because SVG text can be rendered as either text or a vector graphic, you
may need to consider settings in your viewer for both. The Acrobat viewer has both
"smooth line art" and "smooth text" settings that may need to be set for SVG images
to be displayed nicely on your screen (see Edit / Preferences / Display).
This setting will not affect the printing of your document, which should be OK in
any case, but will only affect the quality of the screen display.</p>
</section>
<section id="svg-scaling">
<title>Scaling</title>
<p>
Currently, SVG images are rendered with the dimensions specified <em>in the SVG
file</em>, within the viewport specified in the fo:external-graphic element.
For everything to work properly, the two should be equal. The SVG standard leaves
this issue as an implementation detail. Additional scaling options are available
through XSL-FO means.
</p>
<p>
If you use pixels to specify the size of an SVG graphic the "source resolution" setting
in the <a href="configuration.html">configuration</a> will be used to determine the
size of a pixel. The use of pixels to specify sizes is discouraged as they may
be interpreted differently in different environments.
</p>
</section>
<section id="svg-problems">
<title>Known Problems</title>
<ul>
<li>
Soft mask transparency is combined with white so that it looks better
on PDF 1.3 viewers but this causes the soft mask to be slightly lighter
or darker on PDF 1.4 viewers.
</li>
<li>
There is some problem with a gradient inside a pattern which may cause a PDF
error when viewed in Acrobat 5.
</li>
<li>
Text is not always handled correctly, it may select the wrong font
especially if characters have multiple fonts in the font list.
</li>
<li>
Uniform transparency for images and other SVG elements that are converted
into a raster graphic are not drawn properly in PDF. The image is opaque.
</li>
</ul>
</section>
</section>
<section id="tiff">
<title>TIFF</title>
<p>
FOP can embed TIFF images without decompression into PDF, PostScript and AFP if they
have either CCITT T.4, CCITT T.6, or JPEG compression. Otherwise, a TIFF-capable
Image&nbsp;I/O codec is necessary for decoding the image.
</p>
<p>
There may be some limitation concerning images in the CMYK color space.
</p>
</section>
<section id="wmf">
<title>WMF</title>
<p>
Windows Metafiles (WMF) are supported through classes in
<a href="ext:xmlgraphics.apache.org/batik">Apache Batik</a>. At the moment, support
for this format is experimental and may not always work as expected.
</p>
</section>
</section>
<section id="resolution">
<title>Graphics Resolution</title>
<p>
Some bitmapped image file formats store a dots-per-inch (dpi) or other resolution
values. FOP tries to use this resolution information whenever possible to determine
the image's intrinsic size. This size is used during the layout process when it is not
superseded by an explicit size on fo:external-graphic (content-width and content-height
properties).
</p>
<p>
Please note that not all images contain resolution information. If it's not available
the source resolution set on the FopFactory (or through the user configuration XML) is used.
The default here is 72 dpi.
</p>
<p>
Bitmap images are generally embedded into the output format at their original resolution
(as is). No resampling of the image is performed. Explicit resampling is on our wishlist,
but hasn't been implemented, yet. Bitmaps included in SVG graphics may be resampled to
the resolution specified in the "target resolution" setting in the
<a href="configuration.html">configuration</a> if SVG filters are applied. This can be
used as a work-around to resample images in FO documents.
</p>
</section>
<section id="page-selection">
<title>Page selection for multi-page formats</title>
<p>
Some image formats such as TIFF support multiple pages/sub-images per file. You can
select a particular page using a special URI fragment in the form:
&lt;uri&gt;#page=&lt;nr&gt;
(for example: <code>http://localhost/images/myimage.tiff#page=3</code>)
</p>
</section>
<section id="caching">
<title>Image caching</title>
<p>
FOP caches images between runs. There is one cache per FopFactory instance. The URI is
used as a key to identify images which means that when a particular URI appears again,
the image is taken from the cache. If you have a servlet that generates a different
image each time it is called with the same URI you need to use a constantly
changing dummy parameter on the URI to avoid caching.
</p>
<p>
The image cache has been improved considerably in the redesigned code. Therefore, a
resetCache() method like in earlier versions of FOP has become unnecessary. If you
still experience OutOfMemoryErrors, please notify us.
</p>
</section>
</body>
</document>

src/documentation/content/xdocs/0.93/hyphenation.xml → src/documentation/content/xdocs/0.95/hyphenation.xml View File


src/documentation/content/xdocs/0.93/index.xml → src/documentation/content/xdocs/0.95/index.xml View File

@@ -19,22 +19,22 @@
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document>
<header>
<title>Apache FOP Version 0.93</title>
<title>Apache FOP Version 0.95</title>
<version>$Revision$</version>
</header>
<body>
<section id="intro">
<title>Introduction</title>
<p>
The Apache FOP team is proud to present to you this production quality release. It has taken
over three years to get this far and over two years without a new release from the FOP
project. We're still in the process of adding new features. We welcome any feedback you
The Apache FOP team is proud to present to you this production quality release.
We're still in the process of adding new features. We welcome any feedback you
might have and even more, any other form of help to get the project forward.
</p>
<p>
This fourth release contains many bug fix release and new features compared
to 0.92beta. To see what has changed since the last release, please visit the
<a href="changes_0.93.html">Changes Page</a> and the <a href="releaseNotes_0.93.html">Release Notes</a>.
This sixth release contains many bug fix release and new features compared
to 0.94. To see what has changed since the last release, please visit the
<a href="changes_0.95.html">Changes Page</a> and the
<a href="releaseNotes_0.95.html">Release Notes</a>.
</p>
</section>
<section id="upgrading">

src/documentation/content/xdocs/0.93/intermediate.xml → src/documentation/content/xdocs/0.95/intermediate.xml View File


src/documentation/content/xdocs/0.93/known-issues.xml → src/documentation/content/xdocs/0.95/known-issues.xml View File

@@ -20,17 +20,9 @@
<known-issue>
MIF and SVG output support have not been restored, yet.
</known-issue>
<known-issue>
Java2D/AWT support has been improved, but some problems remain,
for example with block-containers.
</known-issue>
<known-issue>
Auto table layout is not implemented, yet.
</known-issue>
<known-issue>
The collapsing border model on tables is not implemented, yet. Please
use border-collapse="separate" for now.
</known-issue>
<known-issue>
Footnotes may overlap with text of the region-body in multi-column
documents.
@@ -56,22 +48,9 @@
<known-issue>
There are several small problems around white space handling.
</known-issue>
<known-issue>
Images currently don't shrink so they fit on a page when they are
too big and shrinking is allowed to happen.
</known-issue>
<known-issue>
inline-container may not work as expected.
</known-issue>
<known-issue>
letter-spacing and word-spacing properties may not work as expected.
</known-issue>
<known-issue>
leaders with leader-pattern="use-content" may not work as expected.
</known-issue>
<known-issue>
keep-with-previous doesn't work inside tables and lists, yet.
</known-issue>
<known-issue>
If two consecutive pages don't have the same available width, the
content currently isn't properly fit into the available space on
@@ -84,19 +63,8 @@
Not all FO elements can be referenced by their "id", most notably:
table-body, table-header, table-footer and table-row.
</known-issue>
<known-issue>
The backgrounds of table-body, table-header, table-footer and
table-column are not painted, yet.
</known-issue>
<known-issue>
Border and padding conditionality are not supported on table-cells, yet.
</known-issue>
<known-issue>
Column balancing in multi-column documents may not work as expected
(<a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=36356">Bugzilla #36356</a>)
</known-issue>
<known-issue>
Internal basic-links don't point to the exact location on a page, yet, as they
did in 0.20.5. Currently you land in the upper left corner of the page.
</known-issue>
</known-issues>

src/documentation/content/xdocs/0.93/knownissues_overview.xml → src/documentation/content/xdocs/0.95/knownissues_overview.xml View File

@@ -46,25 +46,23 @@
<section>
<title>FO Tree</title>
<p>
This section lists currently disabled test cases in the test suite for the FO tree tests.
The data for this section comes from
<a href="http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/test/fotree/disabled-testcases.xml">test/fotree/disabled-testcases.xml</a>.
This section lists disabled test cases in the test suite for the FO tree tests, at the time
of the release.
</p>
<xi:include href="cocoon://knownissues-raw-fotree_0.93.xml#xpointer(/document/body/*)"/>
<xi:include href="cocoon://knownissues-raw-fotree_0.95.xml#xpointer(/document/body/*)"/>
</section>
<section>
<title>Layout Engine</title>
<p>
This section lists currently disabled test cases in the test suite for the layout engine tests.
The data for this section comes from
<a href="http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/test/layoutengine/disabled-testcases.xml">test/layoutengine/disabled-testcases.xml</a>.
This section lists disabled test cases in the test suite for the layout engine tests, at the
time of the release.
</p>
<xi:include href="cocoon://knownissues-raw-layoutengine_0.93.xml#xpointer(/document/body/*)"/>
<xi:include href="cocoon://knownissues-raw-layoutengine_0.95.xml#xpointer(/document/body/*)"/>
</section>
<section>
<title>Other known issues</title>
<p>This section lists other known issues.</p>
<xi:include href="cocoon://knownissues-raw-static_0.93.xml#xpointer(/document/body/*)"/>
<xi:include href="cocoon://knownissues-raw-static_0.95.xml#xpointer(/document/body/*)"/>
</section>
</section>
</body>

src/documentation/content/xdocs/0.93/layoutengine/disabled-testcases.xml → src/documentation/content/xdocs/0.95/layoutengine/disabled-testcases.xml View File

@@ -26,13 +26,6 @@
is not sized correctly if it wraps an image that is higher than the
nominal line.</description>
</testcase>
<testcase>
<name>Bugzilla #36391: reference-orientation</name>
<file>block-container_reference-orientation_bug36391.xml</file>
<description>There's a problem involving nested block-containers
and reference-orientation 180/-180.</description>
<reference>http://issues.apache.org/bugzilla/show_bug.cgi?id=36391</reference>
</testcase>
<testcase>
<name>Auto-height block-containers produce fences</name>
<file>block-container_space-before_space-after_3.xml</file>
@@ -48,8 +41,8 @@
<testcase>
<name>Hyphenation with preserved linefeeds</name>
<file>block_hyphenation_linefeed_preserve.xml</file>
<description>When hyphenation is enabled and linefeeds are preserved linefeeds
are painted as '#' and the text is output multiple times.</description>
<description>When hyphenation is enabled and linefeeds are preserved,
the text is output multiple times.</description>
</testcase>
<testcase>
<name>linefeed-treatment</name>
@@ -104,12 +97,6 @@
<description>Space resolution does not work between footnote
regions.</description>
</testcase>
<testcase>
<name>Footnotes swallowed in hyphenated fo:inlines</name>
<file>footnote_in_inline.xml</file>
<description>getChangedKnuthElements probably loses the footnote
layout manager somewhere along the way.</description>
</testcase>
<testcase>
<name>Footnotes swallowed in lists</name>
<file>footnote_in_list.xml</file>
@@ -128,11 +115,6 @@
element list.</description>
<reference>http://issues.apache.org/bugzilla/show_bug.cgi?id=37579</reference>
</testcase>
<testcase>
<name>keeps on inlines NYI</name>
<file>inline_keep-together.xml</file>
<description>Keeps are not implemented in inline-level elements, yet.</description>
</testcase>
<testcase>
<name>NPE for table inside an inline</name>
<file>inline_block_nested_3.xml</file>
@@ -250,54 +232,6 @@
<file>region-body_column-count_bug36356.xml</file>
<description>Column balancing doesn't work as expected.</description>
</testcase>
<testcase>
<name>No background-images on table-body</name>
<file>table-body_background-image.xml</file>
<description>The backgrounds of table-body, table-header,
table-footer and table-column are not painted, yet.</description>
</testcase>
<testcase>
<name>Collapsing Border Model NYI</name>
<file>table_border-collapse_collapse_1.xml</file>
<description>Border-collapse="collapse" is not yet
implemented.</description>
</testcase>
<testcase>
<name>Collapsing Border Model NYI</name>
<file>table_border-collapse_collapse_2.xml</file>
<description>Border-collapse="collapse" is not yet
implemented.</description>
</testcase>
<testcase>
<name>Problems with border and padding on tables</name>
<file>table_border_padding.xml</file>
<description>The element list seems to not be fully correct, yet, causing
the layout to look odd.</description>
</testcase>
<testcase>
<name>keep-with-previous doesn't work inside tables</name>
<file>table-cell_block_keep-with-previous.xml</file>
<description>Keep-with-previous doesn't work inside tables and
lists, yet.</description>
</testcase>
<testcase>
<name>Border and padding conditionality is NYI on table-cells</name>
<file>table-cell_border_padding_conditionality.xml</file>
<description>Border and padding conditionality are not supported
on table-cells, yet.</description>
</testcase>
<testcase>
<name>No background-images on table-header</name>
<file>table-header_background-image.xml</file>
<description>The backgrounds of table-body, table-header,
table-footer and table-column are not painted, yet.</description>
</testcase>
<testcase>
<name>keep-with-previous doesn't work on table-rows</name>
<file>table-row_keep-with-previous.xml</file>
<description>Keep-with-previous doesn't work inside tables and
lists, yet.</description>
</testcase>
<testcase>
<name>table-cell empty area with marker.xml</name>
<file>table-cell_empty_area_with_marker.xml</file>
@@ -312,17 +246,15 @@
case should be revisited.</description>
</testcase>
<testcase>
<name>fo:wrapper around block-level content</name>
<file>wrapper_block.xml</file>
<description>A ClassCastException occurs when fo:wrapper directly surrounds a
block-level element because its layout manager is written to handle only
inline content.</description>
<name>fo:wrapper around block-level content (with id)</name>
<file>wrapper_block_id.xml</file>
<description>"id" attributes on fo:wrapper around block-level content don't get
added to the area tree.</description>
</testcase>
<testcase>
<name>Bugzilla #40230: invalid extra page break</name>
<file>block_break-after_bug40230.xml</file>
<description>Currently an extra page is created even if there is nothing
after a block with break-after="page"</description>
<reference>http://issues.apache.org/bugzilla/show_bug.cgi?id=40230</reference>
<name>Soft hyphen with normal hyphenation enabled</name>
<file>block_shy_linebreaking_hyph.xml</file>
<description>A soft hyphen should be a preferred as break compared to a
normal hyphenation point but is not.</description>
</testcase>
</disabled-testcases>

src/documentation/content/xdocs/0.93/output.xml → src/documentation/content/xdocs/0.95/output.xml View File

@@ -48,6 +48,35 @@
The net effect is that the layout of a given FO document can be quite different between
renderers that do not use the same font information.
</p>
<p>
Theoretically, there's some potential to make the output of the PDF/PS renderers match
the output of the Java2D-based renderers. If FOP used the font metrics from its own
font subsystem but still used Java2D for text painting in the Java2D-based renderers,
this could probably be achieved. However, this approach hasn't been implemented, yet.
</p>
<p>
With a work-around, it is possible to match the PDF/PS output in a Java2D-based
renderer pretty closely. The clue is to use the
<a href="intermediate.html">intermediate format</a>. The trick is to layout the
document using FOP's own font subsystem but then render the document using Java2D.
Here are the necessary steps (using the command-line):
</p>
<ol>
<li>
Produce an IF file: <code>fop -fo myfile.fo -at application/pdf myfile.at.xml</code><br/>
Specifying "application/pdf" for the "-at" parameter causes FOP to use FOP's own
font subsystem (which is used by the PDF renderer). Note that no PDF file is created
in this step.
</li>
<li>Render to a PDF file: <code>fop -atin myfile.at.xml -pdf myfile.pdf</code></li>
<li>Render to a Java2D-based renderer:
<ul>
<li><code>fop -atin myfile.at.xml -print</code></li>
<li><code>fop -atin myfile.at.xml -awt</code></li>
<li><code>fop -atin myfile.at.xml -tiff myfile.tiff</code></li>
</ul>
</li>
</ol>
</section>
<section id="general-direct-output">
<title>Output to a Printer or Other Device</title>
@@ -105,7 +134,7 @@ out = proc.getOutputStream();]]></source>
<section id="pdf-postprocess">
<title>Post-processing</title>
<p>
FOP does not currently support several desirable PDF features: XMP metadata and watermarks.
FOP does not currently support several desirable PDF features: watermarks and signatures.
One workaround is to use Adobe Acrobat (the full version, not the Reader) to process
the file manually or with scripting that it supports.
</p>
@@ -199,8 +228,54 @@ out = proc.getOutputStream();]]></source>
support for most text and layout.
Images and SVG are not fully supported, yet. Currently, the PostScript
renderer generates PostScript Level 3 with most DSC comments. Actually,
the only Level 3 feature used is FlateDecode, everything else is Level 2.
the only Level 3 features used are the FlateDecode and DCTDecode
filter (the latter is used for 1:1 embedding of JPEG images), everything
else is Level 2.
</p>
<section id="ps-configuration">
<title>Configuration</title>
<p>
The PostScript renderer configuration currently allows the following settings:
</p>
<source><![CDATA[<renderer mime="application/postscript">
<auto-rotate-landscape>false</auto-rotate-landscape>
<language-level>3</language-level>
<optimize-resources>false</optimize-resources>
<safe-set-page-device>false</safe-set-page-device>
<dsc-compliant>true</dsc-compliant>
</renderer>]]></source>
<p>
The default value for the "auto-rotate-landscape" setting is "false". Setting it
to "true" will automatically rotate landscape pages and will mark them as landscape.
</p>
<p>
The default value for the "language-level" setting is "3". This setting specifies
the PostScript language level which should be used by FOP. Set this to "2"
only if you don't have a Level 3 capable interpreter.
</p>
<p>
The default value for the "optimize-resources" setting is "false". Setting it
to "true" will produce the PostScript file in two steps. A temporary file will be
written first which will then be processed to add only the fonts which were really
used and images are added to the stream only once as PostScript forms. This will
reduce file size but can potentially increase the memory needed in the interpreter
to process.
</p>
<p>
The default value for the "safe-set-page-device" setting is "false". Setting it
to "true" will cause the renderer to invoke a postscript macro which guards against
the possibility of invalid/unsupported postscript key/values being issued to the
implementing postscript page device.
</p>
<p>
The default value for the "dsc-compliant" setting is "true". Setting it
to "false" will break DSC compliance by minimizing the number of setpagedevice
calls in the postscript document output. This feature may be useful when unwanted
blank pages are experienced in your postscript output. This problem is caused by
the particular postscript implementation issuing unwanted postscript subsystem
initgraphics/erasepage calls on each setpagedevice call.
</p>
</section>
<section id="ps-limitations">
<title>Limitations</title>
<ul>
@@ -283,6 +358,7 @@ out = proc.getOutputStream();]]></source>
<source><![CDATA[<renderer mime="application/vnd.hp-PCL">
<rendering>quality</rendering>
<text-rendering>bitmap</text-rendering>
<disable-pjl>false</disable-pjl>
</renderer>]]></source>
<p>
The default value for the "rendering" setting is "speed" which causes borders
@@ -297,6 +373,12 @@ out = proc.getOutputStream();]]></source>
If the mix of painting methods results in unwelcome output, you can set this
to "bitmap" which causes all text to be rendered as bitmaps.
</p>
<p>
The default value for the "disable-pjl" setting is "false". This means that
the PCL renderer usually generates PJL commands before and after the document
in order to switch a printer into PCL language. PJL commands can be disabled
if you set this value to "true".
</p>
<p>
You can control the output resolution for the PCL using the "target resolution"
setting on the FOUserAgent. The actual value will be rounded up to the next
@@ -498,6 +580,13 @@ out = proc.getOutputStream();]]></source>
<font-triplet name="Courier" style="normal" weight="bold"/>
</font>]]></source>
</section>
<section id="afp-renderer-resolution-config">
<title>Output Resolution</title>
<p>By default the AFP Renderer creates output with a resolution of 240 dpi.
This can be overridden by the &lt;renderer-resolution/&gt; configuration element. Example:</p>
<source><![CDATA[
<renderer-resolution>240</renderer-resolution>]]></source>
</section>
<section id="afp-image-config">
<title>Images</title>
<p>By default the AFP Renderer converts all images to 8 bit grey level.
@@ -560,8 +649,7 @@ out = proc.getOutputStream();]]></source>
</section>
<section id="afp-tag-logical-element">
<title>Tag Logical Element Extension</title>
<p>The tag-logical-element extension element allows to injects TLEs into the AFP output stream. Example:
Example:</p>
<p>The tag-logical-element extension element allows to injects TLEs into the AFP output stream. Example:</p>
<source><![CDATA[
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:afp="http://xmlgraphics.apache.org/fop/extensions/afp">
@@ -577,6 +665,24 @@ out = proc.getOutputStream();]]></source>
The name and value attributes are mandatory.
</p>
</section>
<section id="afp-no-operation">
<title>No Operation Extension</title>
<p>The no-operation extension provides the ability to carry up to 32K of comments or any other type
of unarchitected data into the AFP output stream. Example:</p>
<source><![CDATA[
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:afp="http://xmlgraphics.apache.org/fop/extensions/afp">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple">
<afp:no-operation name="My NOP">insert up to 32k of character data here!</afp:no-operation>
</fo:simple-page-master>
</fo:layout-master-set>
]]></source>
<p>The no-operation extension element can only occur within a simple-page-master.
Multiple no-operation extension elements within a simple-page-master are allowed.
The name attribute is mandatory.
</p>
</section>
</section>
</section>
<section id="rtf">
@@ -584,10 +690,19 @@ out = proc.getOutputStream();]]></source>
<p>
JFOR, an open source XSL-FO to RTF converter has been integrated into Apache FOP.
This will create an RTF (rich text format) document that will
attempt to contain as much information from the fo document as
possible. The RTF output follows Microsoft's RTF specifications
attempt to contain as much information from the XSL-FO document as
possible. It should be noted that is not possible (due to RTF's limitations) to map all
XSL-FO features to RTF. For complex documents, the RTF output will never reach the feature
level from PDF, for example. Thus, using RTF output is only recommended for simple documents
such as letters.
</p>
<p>
The RTF output follows Microsoft's RTF specifications
and produces best results on Microsoft Word.
</p>
<note>RTF output is currently unmaintained and lacks many features compared to other output
formats. Using other editable formats like Open Document Format, instead of producing XSL-FO
then RTF through FOP, might give better results.</note>
</section>
<section id="xml">
<title>XML (Area Tree XML)</title>
@@ -662,8 +777,8 @@ out = proc.getOutputStream();]]></source>
<fonts><!-- described elsewhere --></fonts>
</renderer>]]></source>
<p>
The default value for the "compression" setting is "PackBits" which is a
widely supported RLE compression scheme for TIFF. The set of compression
The default value for the "compression" setting is "PackBits" which
which is a widely supported RLE compression scheme for TIFF. The set of compression
names to be used here matches the set that the Image I/O API uses. Note that
not all compression schemes may be available during runtime. This depends on the
actual codecs being available. Here is a list of possible values:
@@ -770,3 +885,4 @@ out = proc.getOutputStream();]]></source>
</body>
</document>



src/documentation/content/xdocs/0.93/pdfa.xml → src/documentation/content/xdocs/0.95/pdfa.xml View File

@@ -129,5 +129,31 @@ Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent);
activated at the same time.
</p>
</section>
<section id="interoperability">
<title>Interoperability</title>
<p>
There has been some confusion about the namespace for the PDF/A indicator in the XMP
metadata. At least three variants have been seen in the wild:
</p>
<table>
<tr>
<td>http://www.aiim.org/pdfa/ns/id.html</td>
<td><strong>obsolete</strong>, from an early draft of ISO-19005-1, used by Adobe Acrobat 7.x</td>
</tr>
<tr>
<td>http://www.aiim.org/pdfa/ns/id</td>
<td><strong>obsolete</strong>, found in the original ISO 19005-1:2005 document</td>
</tr>
<tr>
<td>http://www.aiim.org/pdfa/ns/id/</td>
<td><strong>correct</strong>, found in the technical corrigendum 1 of ISO 19005-1:2005</td>
</tr>
</table>
<p>
If you get an error validating a PDF/A file in Adobe Acrobat 7.x it doesn't mean that
FOP did something wrong. It's Acrobat that is at fault. This is fixed in Adobe Acrobat 8.x
which uses the correct namespace as described in the technical corrigendum 1.
</p>
</section>
</body>
</document>

src/documentation/content/xdocs/0.93/pdfencryption.xml → src/documentation/content/xdocs/0.95/pdfencryption.xml View File

@@ -29,10 +29,6 @@
<body>
<section>
<title>Overview</title>
<warning>
PDF Encryption is available in Release 0.20.5 and later. The comments on this page do
not apply to releases earlier than 0.20.5.
</warning>
<p>
FOP supports encryption of PDF output, thanks to Patrick
C. Lankswert. This feature is commonly used to prevent
@@ -207,16 +203,11 @@ Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent);
install.
</p>
<ol>
<li>
Download the binary distribution for your JDK version. If you have JDK
1.3 or earlier you must also download a JCE from the same page.
</li>
<li>
Unpack the distribution. Add the jar file to your classpath. A
convenient way to use the jar on Linux is to simply drop it into the
FOP lib directory, it will be automatically picked up by
<code>fop.sh</code>. If you have JDK 1.3 or earlier don't forget to
install the JCE as well.
<code>fop.sh</code>.
</li>
<li>
Open the <code>java.security</code> file and add<br/>

src/documentation/content/xdocs/0.93/pdfx.xml → src/documentation/content/xdocs/0.95/pdfx.xml View File


src/documentation/content/xdocs/0.93/running.xml → src/documentation/content/xdocs/0.95/running.xml View File

@@ -28,21 +28,24 @@
<title>System Requirements</title>
<p>The following software must be installed:</p>
<ul>
<li>Java 1.3.x or later Runtime Environment.</li>
<li>
Java 1.4.x or later Runtime Environment.
<ul>
<li>
Many JREs >=1.4 contain older JAXP implementations (which often contain bugs). It's
usually a good idea to replace them with a current implementation.
</li>
</ul>
</li>
<li>
Apache FOP. The <a href="../download.html">FOP distribution</a> includes all libraries that you will
need to run a basic FOP installation. These can be found in the [fop-root]/lib directory. These
libraries include the following:
<ul>
<li>
A JAXP-compatible XML Parser (FOP comes with <a class="fork" href="ext:xerces">Apache Xerces-J</a>).
</li>
<li>
A JAXP-compatible XSLT Processor (FOP comes with <a class="fork" href="ext:xalan">Apache Xalan-J</a>).
</li>
<li><a class="fork" href="ext:xmlgraphics.apache.org/commons">Apache XML Graphics Commons</a>, an shared library for Batik and FOP.</li>
<li><a class="fork" href="ext:batik">Apache Batik</a>, an SVG library.</li>
<li><a class="fork" href="ext:jakarta/commons/logging">Apache Jakarta Commons Logging</a>, a logger abstraction kit.</li>
<li><a class="fork" href="ext:jakarta/commons/io">Apache Jakarta Commons IO</a>, a library with I/O utilities.</li>
<li><a class="fork" href="ext:commons-logging">Apache Commons Logging</a>, a logger abstraction kit.</li>
<li><a class="fork" href="ext:commons-io">Apache Commons IO</a>, a library with I/O utilities.</li>
<li><a class="fork" href="ext:excalibur/framework">Apache Excalibur/Avalon Framework</a>, for XML configuration handling.</li>
</ul>
</li>
@@ -50,7 +53,8 @@
<p>The following software is optional, depending on your needs:</p>
<ul>
<li>
Graphics libraries. Support for some graphics formats requires additional packages. See
Graphics libraries. Generally, FOP contains direct support for the most important
bitmap image formats (including PNG, JPEG and GIF). See
<a href="graphics.html">FOP: Graphics Formats</a> for details.
</li>
<li>
@@ -178,7 +182,7 @@ Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl
Fop foo.fo -awt]]></source>
<p>
PDF encryption is only available if FOP was compiled with encryption support
<strong>and</strong> if compatible encryption support is availabe at run time.
<strong>and</strong> if compatible encryption support is available at run time.
Currently, only the JCE is supported. Check the <a href="pdfencryption.html">Details</a>.
</p>
</section>
@@ -220,25 +224,27 @@ Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl
<title>FOP's dynamical classpath construction</title>

<p>If FOP is started without a proper classpath, it tries to
add its dependencies dynamically. FOP uses the current working
directory as the base directory for its search. If the base
directory is called <code>build</code>, then its parent
directory becomes the base directory.</p>
add its dependencies dynamically. If the system property
<code>fop.home</code> contains the name of a directory, then
FOP uses that directory as the base directory for its
search. Otherwise the current working directory is the base
directory. If the base directory is called <code>build</code>,
then its parent directory becomes the base directory.</p>

<p>FOP expects to find <code>fop.jar</code> in the
<code>build</code> subdirectory of the base directory, and
adds it to the classpath. Subsequently FOP adds all
<code>jar</code> files in the lib directory to the
classpath. The lib directory is either the <code>lib</code>
subdirectory of the base directory, or, if that does not
exist, the base directory itself.</p>
<code>build</code> subdirectory of the base directory, and
adds it to the classpath. Subsequently FOP adds all
<code>jar</code> files in the lib directory to the
classpath. The lib directory is either the <code>lib</code>
subdirectory of the base directory, or, if that does not
exist, the base directory itself.</p>

<p>If the system property <code>fop.optional.lib</code>
contains the name of a directory, then all <code>jar</code>
files in that directory are also added to the classpath. See
the methods <code>getJARList</code> and
<code>checkDependencies</code> in
<code>org.apache.fop.cli.Main</code>.</p>
contains the name of a directory, then all <code>jar</code>
files in that directory are also added to the classpath. See
the methods <code>getJARList</code> and
<code>checkDependencies</code> in
<code>org.apache.fop.cli.Main</code>.</p>

</section>
</section>
@@ -299,7 +305,7 @@ Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl
<ul>
<li>
Increase memory available to the JVM. See
<a href="http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/java.html">the -Xmx option</a>
<a href="http://java.sun.com/j2se/1.4/docs/tooldocs/solaris/java.html">the -Xmx option</a>
for more information.
<warning>
It is usually unwise to increase the memory allocated to the JVM beyond the amount of
@@ -335,11 +341,6 @@ Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl
This can be substantial if the page sequence contains lots of FO elements.
</li>
</ul>
<p>
One of FOP's stated design goals is to be able to process input of arbitrary size.
Addressing this goal is one of the prime motivations behind the
<a href="../dev/index.html">FOP Redesign</a>.
</p>
</section>
<section id="problems">
<title>Problems</title>

src/documentation/content/xdocs/0.93/servlets.xml → src/documentation/content/xdocs/0.95/servlets.xml View File

@@ -161,7 +161,7 @@ public void init() throws ServletException {
<ul>
<li>
Instead of java.io.ByteArrayOutputStream consider using the ByteArrayOutputStream
implementation from the <a href="ext:jakarta/commons/io">Jakarta Commons IO project</a> which allocates less memory.
implementation from the <a href="ext:commons-io">Jakarta Commons IO project</a> which allocates less memory.
The full class name is: <code>org.apache.commons.io.output.ByteArrayOutputStream</code>
</li>
<li>
@@ -177,6 +177,71 @@ public void init() throws ServletException {
apply here, too.
</p>
</section>
<section id="uriresolver">
<title>Accessing resources in your web application</title>
<p>
Often, you will want to use resources (stylesheets, images etc.) which are bundled with
your web application. FOP provides a URIResolver implementation that lets you access
files via the Servlet's ServletContext. The class is called
<code>org.apache.fop.servlet.ServletContextURIResolver</code>.
</p>
<p>
Here's how to set it up in your servlet. Instantiate a new instance in the servlet's
init() method:
</p>
<source><![CDATA[
/** URIResolver for use by this servlet */
protected URIResolver uriResolver;

public void init() throws ServletException {
this.uriResolver = new ServletContextURIResolver(getServletContext());
[..]
}]]></source>
<p>
The ServletContextURIResolver reacts on URIs beginning with "servlet-context:". If you
want to access an image in a subdirectory of your web application, you could, for
example, use: "servlet-context:/images/myimage.png". Don't forget the leading slash
after the colon!
</p>
<p>
Further down, you can use the URIResolver for various things:
</p>
<ul>
<li>
With the Transformer (JAXP/XSLT) so things like document() functions can resolver
"servlet-context:" URIs.
</li>
<li>
With the FopFactory so every resource FOP loads can be loaded using a "servlet-context:"
URI.
</li>
<li>
You can the ServletContextURIResolver yourself in your servlet code to access
stylesheets or XML files bundled with your web application.
</li>
</ul>
<p>
Here are some example snippets:
</p>
<source><![CDATA[
//Setting up the JAXP TransformerFactory
this.transFactory = TransformerFactory.newInstance();
this.transFactory.setURIResolver(this.uriResolver);

[..]

//Setting up the FOP factory
this.fopFactory = FopFactory.newInstance();
this.fopFactory.setURIResolver(this.uriResolver);

[..]

//The stylesheet for the JAXP Transfomer
Source xsltSrc = this.uriResolver.resolve(
"servlet-context:/xslt/mystylesheet.xsl", null);
Transformer transformer = this.transFactory.newTransformer(xsltSrc);
transformer.setURIResolver(this.uriResolver);]]></source>
</section>
</section>
<section id="ie">
<title>Notes on Microsoft Internet Explorer</title>

src/documentation/content/xdocs/0.93/upgrading.xml → src/documentation/content/xdocs/0.95/upgrading.xml View File

@@ -31,7 +31,10 @@
</p>
<ul>
<li>
More than half of the codebase has been rewritten over the last three years. With version 0.93 the code has reached <strong>production level</strong>.
More than half of the codebase has been rewritten over the
last four years. With version 0.93 the code has reached
<strong>production level</strong>, and continues to improve with
version 0.94 and 0.95.
</li>
<li>
The API of FOP has changed considerably and is not
@@ -52,13 +55,12 @@
src/foschema/fop-configuration.xsd.
</li>
<li>
If you are using font metrics files for version 0.20.5 or
0.92 or earlier, you have to regenerate them in the new
format. The new format is characterized by a version
attribute on the top-level font-metrics element, whose value
is 2.0. The absence of a version attribute will be
interpreted as version 1.0, and such metrics files will no
longer be parsed.
Beginning with version 0.94 you can skip the generation of
font metric files and remove the "font-metrics" attribute
in the font configuration. The font metrics files are, for
the moment, still required if you use a TrueType Collection (*.ttc)
and in that case you need to regenerate the font metrics file
if yours are from a FOP version before 0.93.
</li>
<li>
<p>
@@ -76,18 +78,13 @@
</li>
<li>
Extensions and Renderers written for version 0.20.5 will not work with the new code! The new FOP
extension for <a href="http://barcode4j.krysalis.org">Barcode4J</a> will be available in
extension for <a href="http://barcode4j.krysalis.org">Barcode4J</a> is available since
January 2007.
</li>
<li>
The PCL Renderer and the MIF Handler have not been resurrected, yet! They are currently non-functional
The SVG Renderer and the MIF Handler have not been resurrected, yet! They are currently non-functional
and hope for someone to step up and reimplement them.
</li>
<li>
By looking at the <a href="../compliance.html">Compliance page</a> you might get the impression
that the new code is much more advanced than version 0.20.5. That's true but there may still
be a few things that may not be handled as gracefully by the new code as by version 0.20.5.
</li>
</ul>
</section>
<section id="issues">
@@ -95,17 +92,14 @@
<p>
When you use your existing FO files or XML/XSL files which work fine with FOP version
0.20.5 against this FOP version some things may not work as expected. The following
list will hopefully help you to identify and correct those problems.
list will hopefully help you to identify and correct those problems. This does not mean
that the new FOP is at fault. Quite the opposite actually! See below:
</p>
<ul>
<li>
Check the <a href="../compliance.html">Compliance page</a> for the feature causing
trouble. It may contain the necessary information to understand and resolve the problem.
</li>
<li>
Not all 0.20.5 output formats are supported. PDF and Postscript should be fully supported.
See <a href="output.html">Output Targets</a> for a more complete description.
</li>
<li>
As stated above empty table cells <code>&lt;fo:table-cell&gt;&lt;/fo:table-cell&gt;</code>
are not allowed by the specification. The same applies to empty <code>static-content</code>
@@ -123,12 +117,8 @@
</li>
<li>
The <code>fox:outline</code> extension is not implemented in this version anymore.
It has been superseded by the new bookmark elements from XSL-FO 1.1.
</li>
<li>
The <code>fox:destination</code> extension is also not implemented in this version
although it may be added in the future. See also
<a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=37157">Bug 37157</a>.
It has been superseded by the new bookmark elements from XSL-FO 1.1. So please
update your stylesheets accordingly.
</li>
</ul>
</section>

+ 7161
- 5609
src/documentation/content/xdocs/compliance.ihtml
File diff suppressed because it is too large
View File


+ 2
- 2
src/documentation/content/xdocs/dev/doc.xml View File

@@ -97,9 +97,9 @@ Maintenance branch releases either copy the trunk content to the maintenance bra
Step-by-step instructions for the deployment process again:
</p>
<note>
Please make sure you use Forrest from the 0.7 branch for the time being. You will need
Please make sure you use Forrest from the Trunk (revision 632959 or later) for the time being. You will need
to download it directly from SVN:
<link href="http://svn.apache.org/repos/asf/forrest/branches/forrest_07_branch">http://svn.apache.org/repos/asf/forrest/branches/forrest_07_branch</link>
<link href="http://svn.apache.org/repos/asf/forrest/trunk">http://svn.apache.org/repos/asf/forrest/trunk</link>
</note>
<ul>
<li>Modify the sources of the website and check locally with Forrest (run "forrest run" or just "forrest").</li>

+ 1
- 1
src/documentation/content/xdocs/dev/release.xml View File

@@ -73,7 +73,7 @@ The purpose of documenting it here is to facilitate consistency, ensure that the
<code>fop-hyph.jar</code> to lib/ (e.g. from
<code>http://sourceforge.net/projects/offo</code></li>
<li>Alternatively, create a build-local.properties file that points to the above libs.</li>
<li>Run build[.sh] dist. Do this once using Sun JDK 1.3.1_15 or later and once with Sun JDK 1.4.2_08 or later. A Forrest installation is needed.</li>
<li>Run build[.sh] dist. Do this using Sun JDK 1.4.2_08 or later. A Forrest installation is needed.</li>
<li>Create signatures. Don't forget to upload your KEY:
<code>gpg -a -b --force-v3-sigs fop-0.94-src.tar.gz</code> etc.</li>
<li>Upload the dist and signature files to your web directory

+ 20
- 1
src/documentation/content/xdocs/download.xml View File

@@ -84,7 +84,7 @@
<p/>
<table>
<tr>
<th colspan="2">Latest Release</th>
<th colspan="2">Latest Stable Release</th>
</tr>
<tr>
<td>Repository URL</td>
@@ -102,6 +102,25 @@
</link>
</td>
</tr>
<tr>
<th colspan="2">Latest Release</th>
</tr>
<tr>
<td>Repository URL</td>
<td>
<link href="http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-0_95beta/">
<code>http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-0_95beta/</code>
</link>
</td>
</tr>
<tr>
<td>Web view</td>
<td>
<link href="http://svn.apache.org/viewvc/xmlgraphics/fop/tags/fop-0_95beta/">
<code>http://svn.apache.org/viewvc/xmlgraphics/fop/tags/fop-0_95beta/</code>
</link>
</td>
</tr>
<tr>
<th colspan="2">Trunk</th>
</tr>

+ 15
- 0
src/documentation/content/xdocs/faq.xml View File

@@ -645,6 +645,21 @@ Check the following:</p>
</p>
</answer>
</faq>
<faq id="pdf-ps-java2d-differences">
<question>Why is the output of Java2D/AWT-based renderers different than, for example, PDF or PS?</question>
<answer>
<p>
If you render the same document once to a PNG or TIFF and once into a PDF, the output
may not be the same, i.e. line breaks are different or lines may have different heights.
The reason for this: The Java2D-based renderers use the font subsystem of Java2D/AWT. The
PDF and PS renderers use FOP's own font subsystem which provides much better font metrics
than Java2D. These can lead to different layout decisions when the same document is
rendered with different renderers. An alternative approach to fix this problem might be
available but it hasn't been tested, yet. See also the
<link href="0.95/output.html#general-fonts">notes on fonts in the various output formats</link>.
</p>
</answer>
</faq>
</part>
<part id="part-embedding">
<title>Embedding FOP. Using FOP in a servlet.</title>

+ 4
- 3
src/documentation/content/xdocs/index.xml View File

@@ -29,14 +29,15 @@
<p>Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL
formatting objects (XSL-FO) and an output independent formatter. It is a Java
application that reads a formatting object (FO) tree and renders the resulting
pages to a specified output. <link href="0.94/output.html">Output formats</link>
pages to a specified output. <link href="0.95/output.html">Output formats</link>
currently supported include PDF, PS, PCL, AFP, XML (area tree representation),
Print, AWT and PNG, and to a lesser extent, RTF and TXT. The primary output target is PDF.
</p>
<figure width="480" height="260" src="images/document.jpg" alt="Render Diagram" />
<p>
The latest stable version of FOP (<link href="0.94/">0.94</link>) is the second
stable release after a large redesign effort and implements a large subset of the
A beta release of the latest version of FOP (<link href="0.95/">0.95</link>) is now
available. After a short testing period it will become the third
stable release after the large redesign effort and will implement a large subset of the
<link href="http://www.w3.org/TR/xsl11/">XSL-FO Version 1.1 W3C
Recommendation</link>.
</p>

+ 124
- 0
src/documentation/content/xdocs/quickstartguide.xml View File

@@ -0,0 +1,124 @@
<?xml version="1.0" standalone="no"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id: gethelp.xml 627324 2008-02-13 09:35:01Z maxberger $ -->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.3//EN" "http://forrest.apache.org/dtd/document-v13.dtd">
<document>
<header>
<title>FOP: Quick Start Guide</title>
<subtitle>Everything you need to start using and appreciating Apache FOP quickly.</subtitle>
<version>$Revision: 627324 $</version>
</header>
<body>
<section id="essentials">
<title>FOP Essentials</title>
<p>The goal of this <strong>Quick Start Guide</strong> is to help novice users get Apache FOP up and running quickly. Typically, you'll need to:</p>
<ol>
<li><link href="download.html">Download FOP</link></li>
<li><link href="0.95/compiling.html">Build FOP</link> (you can skip this step if you download the binary distribution!)</li>
<li><link href="0.95/configuration.html">Configure FOP</link></li>
<li><link href="0.95/running.html">Run FOP</link></li>
</ol>
<p>Here are some links to help you find out what FOP can do, as well as how and where to get help:</p>
<ul>
<li><link href="0.95/embedding.html">Calling FOP from a Java Application</link></li>
<li><link href="0.95/servlets.html">Using FOP in Servlets</link></li>
<li><link href="0.95/anttask.html">Using FOP in an 'Ant' Build Script</link></li>
<li><link href="compliance.html" title="FOP Compliance">XSL-FO Compliance</link> (what FOP supports and what it doesn't)</li>
<li><link href="faq.html">FAQs</link></li>
<li><link href="gethelp.html">Getting Help</link></li>
<li><link href="maillist.html">Mailing Lists</link></li>
</ul>
<p>
Once you've familiarized yourself with the basics, you can get more detailed information,
in the detailed FOP <link href="0.95/index.html">product documentation</link>.
</p>
</section>
<section id="hello-world">
<title>Hello World with FOP</title>
<p>
This section walks you through a "Hello World!" page with Apache FOP. We're assuming you
download the binary distribution and that you have a Java Runtime Environment (version 1.4
or later) installed.
</p>
<ol>
<li>
Unpack the downloaded binary distribution to a directory of your choice (for example,
<code>C:\FOP</code> if you're on Windows). Let's call that
directory &lt;fop-home&gt;.
</li>
<li>
Get a command prompt in the &lt;fop-home&gt; directory and write:<br/>
Windows: <code>fop -fo examples/fo/basic/readme.fo -awt</code><br/>
Unix: <code>./fop.sh -fo examples/fo/basic/readme.fo -awt</code><br/>
</li>
<li>
If all went well, this should open a window showing you a "readme"-style document.
This is just to verify that FOP runs correctly.
</li>
<li>
Now, take your favorite XML editor and create a small XML file like the following. Replace
"Frank" with your own first name to make it a bit more personal and save it as
<code>name.xml</code>:<br/>
<source><![CDATA[<name>Frank</name>]]></source>
</li>
<li>
To produce a PDF file from this XML file, we need an XSLT stylesheet that converts the
XML to XSL-FO. This is the first step in the processing chain. The second step will be
done by FOP when it reads the generated XSL-FO document and formats it to a PDF document.
You can copy the following minimal XSLT stylesheet, which takes your first name and
produces a "Hello World!"-style document (save it as <code>name2fo.xsl</code>):<br/>
<source><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="A4-portrait"
page-height="29.7cm" page-width="21.0cm" margin="2cm">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="A4-portrait">
<fo:flow flow-name="xsl-region-body">
<fo:block>
Hello, <xsl:value-of select="name"/>!
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>]]></source>
</li>
<li>
Finally, let's put the previous two steps together: Go back to the command prompt and
enter the following command:<br/>
Windows: <code>fop -xml name.xml -xsl name2fo.xsl -pdf name.pdf</code><br/>
Unix: <code>./fop.sh -xml name.xml -xsl name2fo.xsl -pdf name.pdf</code><br/>
</li>
<li>
You've produced your first PDF with Apache FOP! Please open <code>name.pdf</code>
in your favorite PDF viewer.
</li>
</ol>
</section>
</body>
</document>

+ 13
- 12
src/documentation/content/xdocs/site.xml View File

@@ -15,6 +15,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<site label="FOP" href="" xmlns="http://apache.org/forrest/linkmap/1.0" tab="home">
<!--
BEGIN Home tab
@@ -22,6 +23,7 @@
<about label="About">
<index label="Introduction" href="index.html"/>
<download label="Download" href="download.html"/>
<quickstartguide label="Quick Start Guide" href="quickstartguide.html"/>
<compliance label="Compliance" href="compliance.html" description="FOP Compliance"/>
<help label="Getting Help" href="gethelp.html"/>
<faqs label="FAQs" href="faq.html"/>
@@ -34,7 +36,6 @@
<all_sitePDF label="Full PDF" href="wholesite.pdf"/>
-->
</about>

<resources label="Resources">
<xsl-fo label="XSL-FO" href="fo.html"/>
@@ -57,12 +58,12 @@
-->

<!--
BEGIN Version 0.93 documentation tab
BEGIN Version 0.94 documentation tab
-->
<trunk label="FOP 0.93" href="0.93/" tab="oldstableversion">
<trunk label="FOP 0.94" href="0.94/" tab="previousversion">
<about label="About" href="index.html"/>
<release label="Release Notes" href="releaseNotes_0.93.html"/>
<changes label="Changes" href="changes_0.93.html"/>
<release label="Release Notes" href="releaseNotes_0.94.html"/>
<changes label="Changes" href="changes_0.94.html"/>
<knownissues label="Known Issues" href="knownissues_overview.html"/>
<upgrading label="Upgrading" href="upgrading.html"/>
@@ -89,16 +90,16 @@
</trunk>
<!--
END Version 0.93 documentation tab
END Version 0.94 documentation tab
-->
<!--
BEGIN Version 0.94 documentation tab
BEGIN Version 0.95 documentation tab
-->
<trunk label="FOP 0.94" href="0.94/" tab="stableversion">
<trunk label="FOP 0.95beta" href="0.95/" tab="stableversion">
<about label="About" href="index.html"/>
<release label="Release Notes" href="releaseNotes_0.94.html"/>
<changes label="Changes" href="changes_0.94.html"/>
<release label="Release Notes" href="releaseNotes_0.95beta.html"/>
<changes label="Changes" href="changes_0.95beta.html"/>
<knownissues label="Known Issues" href="knownissues_overview.html"/>
<upgrading label="Upgrading" href="upgrading.html"/>
@@ -125,9 +126,9 @@
</trunk>
<!--
END Version 0.94 documentation tab
END Version 0.95 documentation tab
-->
<!--
BEGIN Trunk documentation tab
-->

+ 4
- 4
src/documentation/content/xdocs/status.xml View File

@@ -27,13 +27,13 @@
<body>
<section>
<title>Status</title>
<p>[last updated 9 January 2007]</p>
<p>[last updated 4 March 2008]</p>
<figure width="585" height="175" src="images/track.png" alt="Planning and branches of FOP development"/>
<p>
This is the development status of Apache FOP. Development on
the maintenance branch where FOP 0.20.5 came from has been
halted. The code base has been largely redesigned. The new
code base has reached release 0.94.
code base has reached release 0.95.
</p>
</section>
<section>
@@ -44,7 +44,7 @@
handle large documents.</p>
<p>The redesign of the code base has largely been completed. The
new code reached production quality with release 0.93. In the
course of 2007 we plan to release version 1.0.</p>
course of 2008 or 2009 we hope to release version 1.0.</p>
<p>
If you're looking for a long-term road-map we have to disappoint you. This is Open
Source and we're mostly volunteers working in their free time. What we have
@@ -122,7 +122,7 @@
</tr>
<tr>
<td>Image Support</td>
<td>stable, but in need of a redesign</td>
<td>beta (recently rewritten)</td>
</tr>
<tr>
<td>Hyphenation Subsystem</td>

+ 1
- 7
src/documentation/content/xdocs/tabs.xml View File

@@ -21,14 +21,8 @@
<tabs software="FOP" title="FOP" copyright="@year@ The Apache Software Foundation" xmlns:xlink="http://www.w3.org/1999/xlink">
<tab label="Home" dir=""/>
<tab label="Version 0.93" dir="0.93/"/>
<tab label="Version 0.94" dir="0.94/"/>
<tab label="Version 0.95beta" dir="0.95/"/>
<tab label="FOP Trunk" dir="trunk/"/>
<tab label="Development" dir="dev/"/>
<!--
<tab label="Design" dir="design/"/>
-->
<!--
<tab label="Alt Design" dir="design/alt.design/"/>
-->
</tabs>

+ 25
- 7
src/documentation/content/xdocs/team.xml View File

@@ -31,7 +31,6 @@
<title>Active Committers</title>
<note label="Important">Please don't write to any developer directly if you need help on using FOP. Only if you submit questions to the <link href="maillist.html#fop-user">FOP User Mailing List</link> will other FOP users be able to profit from answers given to your question. Another point is that a developer may have gone inactive or is on holidays in which case you may not get an answer in time.</note>
<ul>
<li id="fb"><link href="mailto:bckfnn@worldonline.dk">Finn Bock</link> (FB)</li>
<li id="cb"><link href="mailto:bowditch_chris@hotmail.com">Chris Bowditch</link> (CB)
is a Java/VB Programmer from England.</li>
<li id="jb"><link href="mailto:jay@bryantcs.com">Jay Bryant</link> (JB) is a
@@ -51,10 +50,6 @@
<li id="vh"><link href="mailto:vhennebert@apache.org">Vincent Hennebert</link>
(VH), a Java developer from France; with an interest in typography, and in using
Fop as a pdf renderer for book-like documents.</li>
<li id="ph"><link href="mailto:pherweg@web.de">Peter Herweg</link> (PH) is helping to
integrate the jfor project's RTF support into the upcoming FOP 1.0 version.
Born in 1978, he has been serving as an application developer for a small
industrial company in Germany since 1999.</li>
<li id="cl"><link href="mailto:clay@apache.org">Clay Leeds</link> (CL)
is a web/WAP/Palm developer from Laguna Beach, California, USA. A
recent XML/XSL-FO convert, he has been nit-picking FAQs &amp; assorted web
@@ -78,7 +73,11 @@
from the TeX/LaTeX world. See his <fork href="http://www.leverkruid.eu">home
page</fork> for some of his private projects.</li>
<li id="jp"><link href="mailto:pietsch@apache.org">J&#x00F6;rg Pietschmann</link> (JP)</li>
<li id="ot"><link href="mailto:olegt@apache.org">Oleg Tkachenko</link> (OT)</li>
<li id="mb"><link href="mailto:max AT berger DOT name">Max Berger</link> (MB) is currently a
PostDoc pursuing an academic career in computer science. His main interest in FOP is to
improve the DocBook to PDF tool-chain to produce high quality output, while still
conforming to given style-guides. See his <link href="http://max.berger.name">home
page</link> for more information.</li>
<li id="mb"><link href="mailto:max AT berger DOT name">Max Berger</link> (MB) is currently a
PostDoc pursuing an academic career in computer science. His main interest in FOP is to
improve the DocBook to PDF tool-chain to produce high quality output, while still
@@ -109,11 +108,16 @@
<section id="commit-inactive">
<title>Inactive Committers</title>
<ul>
<li id="fb"><link href="mailto:bckfnn@worldonline.dk">Finn Bock</link> (FB)</li>
<li id="kc"><link href="mailto:kellyc@apache.org">Kelly Campbell</link></li>
<li id="sc"><link href="mailto:gears@apache.org">Steven Coffman</link></li>
<li id="bd"><link href="mailto:bdelacretaz@apache.org">Bertrand Delacretaz</link></li>
<li id="te"><link href="mailto:tore@apache.org">Tore Engvig</link></li>
<li id="sg"><link href="mailto:stanislav@apache.org">Stanislav Gorkhover</link></li>
<li id="ph"><link href="mailto:pherweg@web.de">Peter Herweg</link> (PH)<!-- is helping to
integrate the jfor project's RTF support into the upcoming FOP 1.0 version.
Born in 1978, he has been serving as an application developer for a small
industrial company in Germany since 1999.--></li>
<li id="fj"><link href="mailto:fotis@apache.org">Fotis Jannidis</link></li>
<li id="kl"><link href="mailto:klease@apache.org">Karen Lease</link></li>
<li id="kll"><link href="mailto:keiron@apache.org">Keiron Liddle</link></li>
@@ -122,6 +126,7 @@
<li id="jn"><link href="mailto:jordan@apache.org">Jordan Naftolin</link></li>
<li id="as"><link href="mailto:arved@apache.org">Arved Sandstrom</link></li>
<li id="es"><link href="mailto:eschaeffer@apache.org">Eric Schaeffer</link></li>
<li id="ot"><link href="mailto:olegt@apache.org">Oleg Tkachenko</link> (OT)</li>
<li id="aw"><link href="mailto:artw@apache.org">Art Welch</link></li>
<li id="pbw"><link href="mailto:pbwest@apache.org">Peter B. West</link></li>
</ul>
@@ -264,7 +269,7 @@
<td/>
<td/>
<td/>
<td/>
<td>X</td>
<td/>
<td/>
<td/>
@@ -298,6 +303,19 @@
<td/>
<td/>
</tr>
<tr>
<td>AFP</td>
<td/>
<td/>
<td/>
<td/>
<td/>
<td/>
<td/>
<td/>
<td/>
<td/>
</tr>
<tr>
<td>Forrest</td>
<td/>

+ 2
- 2
src/documentation/content/xdocs/trunk/compiling.xml View File

@@ -41,7 +41,7 @@
<section id="env-jdk">
<title>JDK</title>
<p>
Building FOP requires a minimum Java Development Kit (JDK/SDK) of 1.3
Building FOP requires a minimum Java Development Kit (JDK/SDK) of 1.4
(A Java Runtime Environment is not sufficient).
</p>
</section>
@@ -59,7 +59,7 @@
<p>
The build script uses <a href="ext:ant">Apache Ant</a>, a popular
Java-based build tool, which usually requires that the environment variable JAVA_HOME point to
your local JDK root directory. This is true even if you use JDK 1.3 or above, which normally
your local JDK root directory. This is true even if you use JDK 1.4 or above, which normally
does not need this setting.
</p>
</section>

+ 136
- 74
src/documentation/content/xdocs/trunk/fonts.xml View File

@@ -31,11 +31,6 @@
<body>
<section id="intro">
<title>Summary</title>
<note>The FOP Font subsystem is currently undergoing a significant change.
The details provided here especially related to the generation of FOP Font
Metrics files and the FOP Font configuration are likely to change substantially
in the future.
</note>
<p>The following table summarizes the font capabilities of the various FOP renderers:</p>
<table>
<tr>
@@ -59,22 +54,22 @@
<td>yes</td>
<td>yes</td>
</tr>
<!--tr> NOT AVAILABLE YET!!!
<tr>
<td>PCL</td>
<td>yes (modified)</td>
<td>yes (painted as bitmaps)</td>
<td>yes (painted as bitmaps)</td>
<td>no</td>
<td>no</td>
<td>no</td>
</tr-->
</tr>
<tr>
<td>TXT</td>
<td>yes (used for layout but not for output)</td>
<td>AFP</td>
<td>no</td>
<td>yes (used for layout but not for output)</td>
<td>no</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>AWT</td>
<td>Java2D/AWT/Bitmap</td>
<td>if available from OS</td>
<td>yes</td>
<td>yes</td>
@@ -95,19 +90,26 @@
<td>n/a</td>
</tr>
<tr>
<td>TXT</td>
<td>yes (used for layout but not for output)</td>
<td>no</td>
<td>yes (used for layout but not for output)</td>
<td>no</td>
</tr>
<!--tr> NOT AVAILABLE
<td>MIF</td>
<td>n/a (font metrics not needed)</td>
<td>n/a</td>
<td>n/a</td>
<td>n/a</td>
</tr>
<tr>
</tr-->
<!--tr> NOT AVAILABLE
<td>SVG</td>
<td>if available from OS</td>
<td>yes</td>
<td>no</td>
<td>no</td>
</tr>
</tr-->
<tr>
<td>XML</td>
<td>yes</td>
@@ -120,8 +122,8 @@
<section>
<title>Base-14 Fonts</title>
<p>
The Adobe PDF Specification specifies a set of 14 fonts that must be
available to every PDF reader:
The Adobe PostScript and PDF Specification specify a set of 14 fonts that must be
available to every PostScript interpreter and PDF reader:
Helvetica (normal, bold, italic, bold italic),
Times (normal, bold, italic, bold italic),
Courier (normal, bold, italic, bold italic),
@@ -147,73 +149,132 @@
</p>
</section>
<section id="awt">
<title>AWT/Operating System Fonts</title>
<p>The AWT family of renderers (AWT, Print, SVG), use the Java AWT libraries for font metric information. Through operating system registration, the AWT libraries know what fonts are available on the system, and the font metrics for each one.</p>
<title>Java2D/AWT/Operating System Fonts</title>
<p>
The Java2D family of renderers (Java2D, AWT, Print, TIFF, PNG), use the
Java AWT subsystem for font metric information. Through operating system
registration, the AWT subsystem knows what fonts are available on the system,
and the font metrics for each one.
</p>
<p>
When working with one of these output formats and you're missing a font, just
install it in your operating system and they should be available for these
renderers. Please note that this is not true for other output formats such as
PDF or PostScript.
</p>
</section>
<section id="custom">
<title>Custom Fonts</title>
<p>Support for custom fonts is added by creating font metric files (written in XML) from the actual font files, and registering them with FOP. Currently only Type 1 and TrueType fonts can be added.
More information about fonts can be found at:</p>
<p>
Support for custom fonts is highly output format dependent (see above table).
This section shows how to add Type 1 and TrueType fonts to the PDF, PostScript and
Java2D-based renderers. Other renderers (like AFP) support other font formats. Details
in this case can be found on the page about <a href="output.html">output formats</a>.
</p>
<p>
Prior to FOP version 0.94, it was always necessary to create an XML font metrics file
if you wanted to add a custom font. This unconvenient step has been removed and in
addition to that, FOP supports auto-registration of fonts, i.e. FOP can find fonts
installed in your operating system or can scan user-specified directories for fonts.
Font registration via XML font metrics file is still supported and is still necessary
if you want to use a TrueType Collection (*.ttc). Direct support for TrueType
collections may be added later. Furthermore, the XML font metrics files are still
required if you don't want to embed, but only reference a font.
</p>
<p>
Basic information about fonts can be found at:
</p>
<ul>
<li><a href="http://partners.adobe.com/asn/developer/type/ftypes.html">Adobe font types</a></li>
<li><a href="http://partners.adobe.com/asn/developer/technotes/fonts.html">Adobe Font Technote</a></li>
</ul>
</section>
<section id="basics">
<title>Basic font configuration</title>
<p>
If you want FOP to use custom fonts, you need to tell it where to find them. This
is done in the configuration file and once per renderer (because each output format
is a little different). In the basic form, you can either tell FOP to find your
operating system fonts or you can specify directories that it will search for
support fonts. These fonts will then automatically be registered.
</p>
<source><![CDATA[
<fonts>
<!-- register all the fonts found in a directory -->
<directory>C:\MyFonts1</directory>
<!-- register all the fonts found in a directory
and all of its sub directories (use with care) -->
<directory recursive="true">C:\MyFonts2</directory>

<!-- automatically detect operating system installed fonts -->
<auto-detect/>
</fonts>]]></source>
<note>
Review the documentation for <a href="configuration.html">FOP Configuration</a>
for instructions on making the FOP configuration available to FOP when it runs.
Otherwise, FOP has no way of finding your custom font information. It is currently
not possible to easily configure fonts from Java code.
</note>
</section>
<section id="advanced">
<title>Advanced font configuration</title>
<p>
The instructions found above should be sufficient for most users. Below are some
additional instructions in case the basic font configuration doesn't lead to
the desired results.
</p>
<section id="type1-metrics">
<title>Type 1 Font Metrics</title>
<p>FOP includes PFMReader, which reads the PFM file that normally comes with a Type 1 font, and generates an appropriate font metrics file for it.
To use it, run the class org.apache.fop.fonts.apps.PFMReader:</p>
<p>Windows (on JDK 1.4 and later):</p>
To use it, run the class org.apache.fop.fonts.apps.PFMReader:</p>
<p>Windows:</p>
<source>java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file</source>
<p>Windows (on JDK 1.3.x):</p>
<source>java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar;lib\xml-apis.jar;
lib\xercesImpl.jar;lib\xalan.jar;lib\serializer.jar
org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file</source>
<p>Unix (on JDK 1.4 and later):</p>
org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file</source>
<p>Unix:</p>
<source>java -cp build/fop.jar:lib/avalon-framework.jar:lib/commons-logging.jar:lib/commons-io.jar
org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file</source>
<p>Unix (on JDK 1.3.1):</p>
<source>java -cp build/fop.jar:lib/avalon-framework.jar:lib/commons-logging.jar:lib/commons-io.jar:lib/xml-apis.jar:
lib/xercesImpl.jar:lib/xalan.jar:lib/serializer.jar
org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file</source>
org.apache.fop.fonts.apps.PFMReader [options] pfm-file xml-file</source>
<p>PFMReader [options]:</p>
<ul>
<li><strong>-fn &lt;fontname&gt;</strong> By default, FOP uses the fontname from the
.pfm file when embedding the font. Use the "-fn" option to override this name with one you have
chosen. This may be useful in some cases to ensure that applications using the output document
(Acrobat Reader for example) use the embedded font instead of a local font with the same
name.</li>
.pfm file when embedding the font. Use the "-fn" option to override this name with one you have
chosen. This may be useful in some cases to ensure that applications using the output document
(Acrobat Reader for example) use the embedded font instead of a local font with the same
name.</li>
</ul>
<note>The classpath in the above example has been simplified for readability.
You will have to adjust the classpath to the names of the actual JAR files in the lib directory.
xml-apis.jar, xercesImpl.jar, xalan.jar and serializer.jar are not necessary for JDK version 1.4 or later.</note>
You will have to adjust the classpath to the names of the actual JAR files in the lib directory.
xml-apis.jar, xercesImpl.jar, xalan.jar and serializer.jar are not necessary for JDK version 1.4 or later.</note>
<note>The tool will construct some values (FontBBox, StemV and ItalicAngle) based on assumptions and calculations which are only an approximation to the real values.
FontBBox and Italic Angle can be found in the human-readable part of the PFB file or in the AFM file.
The PFMReader tool does not yet interpret PFB or AFM files, so if you want to be correct, you may have to adjust the values in the XML file manually.
The constructed values however appear to have no visible influence.</note>
FontBBox and Italic Angle can be found in the human-readable part of the PFB file or in the AFM file.
The PFMReader tool does not yet interpret PFB or AFM files, so if you want to be correct, you may have to adjust the values in the XML file manually.
The constructed values however appear to have no visible influence.</note>
</section>
<section id="truetype-metrics">
<title>TrueType Font Metrics</title>
<p>FOP includes TTFReader, which reads the TTF file and generates an appropriate font metrics file for it.
Use it in a similar manner to PFMReader.
For example, to create such a metrics file in Windows from the TrueType font at c:\myfonts\cmr10.ttf:</p>
Use it in a similar manner to PFMReader.
For example, to create such a metrics file in Windows from the TrueType font at c:\myfonts\cmr10.ttf:</p>
<source>java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
org.apache.fop.fonts.apps.TTFReader [options]
C:\myfonts\cmr10.ttf ttfcm.xml</source>
org.apache.fop.fonts.apps.TTFReader [options]
C:\myfonts\cmr10.ttf ttfcm.xml</source>
<p>TTFReader [options]:</p>
<ul>
<li><strong>-d &lt;DEBUG | INFO &gt;</strong> Sets the debug level (default is
INFO).</li>
INFO).</li>
<li><strong>-fn &lt;fontname&gt;</strong> Same as for PFMReader.</li>
<li><strong>-ttcname &lt;fontname&gt;</strong> If you're reading data from a
TrueType Collection (.ttc file) you must specify which font from the collection you will read
metrics from.
If you read from a .ttc file without this option, the fontnames will be listed for you.</li>
TrueType Collection (.ttc file) you must specify which font from the collection you will read
metrics from.
If you read from a .ttc file without this option, the fontnames will be listed for you.</li>
<li><strong>-enc ansi</strong> Creates a WinAnsi-encoded font metrics file.
Without this option, a CID-keyed font metrics file is created.
The table below summarizes the differences between these two encoding options as currently
used within FOP.
Please note that this information only applies to TrueType fonts and TrueType collections:</li>
Without this option, a CID-keyed font metrics file is created.
The table below summarizes the differences between these two encoding options as currently
used within FOP.
Please note that this information only applies to TrueType fonts and TrueType collections:</li>
</ul>
<table id="ttf-encoding">
<tr>
@@ -240,13 +301,13 @@ Please note that this information only applies to TrueType fonts and TrueType co
<section id="truetype-collections-metrics">
<title>TrueType Collections Font Metrics</title>
<p>TrueType collections (.ttc files) contain more than one font.
To create metrics files for these fonts, you must specify which font in the collection should be generated, by using the "-ttcname" option with the TTFReader.</p>
To create metrics files for these fonts, you must specify which font in the collection should be generated, by using the "-ttcname" option with the TTFReader.</p>
<p>To get a list of the fonts in a collection, just start the TTFReader as if it were a normal TrueType file (without the -ttcname option).
It will display all of the font names and exit with an Exception.</p>
It will display all of the font names and exit with an Exception.</p>
<p>Here is an example of generating a metrics file for a .ttc file:</p>
<source>java -cp build\fop.jar;lib\avalon-framework.jar;lib\commons-logging.jar;lib\commons-io.jar
org.apache.fop.fonts.apps.TTFReader -ttcname "MS Mincho"
msmincho.ttc msminch.xml</source>
org.apache.fop.fonts.apps.TTFReader -ttcname "MS Mincho"
msmincho.ttc msminch.xml</source>
</section>
<section id="register">
<title>Register Fonts with FOP</title>
@@ -269,16 +330,16 @@ It will display all of the font names and exit with an Exception.</p>
<!-- automatically detect operating system installed fonts -->
<auto-detect/>
</fonts>]]></source>
<note>Review the documentation for <a href="configuration.html">FOP Configuration</a> for instructions on making the FOP configuration available to FOP when it runs. Otherwise, FOP has no way of finding your custom font information.</note>
<ul>
<li>
URLs are used to access the font metric and font files.
Relative URLs are resolved relative to the font-base property (or base) if available.
See <a href="configuration.html">FOP: Configuration</a> for more information.
</li>
<li>The "metrics-url" attribute is generally not necessary except if you run into problems with certain fonts.</li>
<li>Either an "embed-url" or a "metrics-url" must be specified for font tag configurations.</li>
<li>The font "kerning" attribute is optional.</li>
<li>If embedding is off, the output will position the text correctly (from the metrics file), but it will not be displayed or printed correctly unless the viewer has the applicable font available to their local system.</li>
<li>The font "kerning" attribute is optional. Default is "true".</li>
<li>If embedding is off (i.e. embed-url is not set), the output will position the text correctly (from the metrics file), but it will not be displayed or printed correctly unless the viewer has the applicable font available to their local system.</li>
<li>When setting the "embed-url" attribute for Type 1 fonts, be sure to specify the PFB (actual font data), not PFM (font metrics) file that you used to generate the XML font metrics file.</li>
<li>The fonts "directory" tag can be used to register fonts contained within a single or list of directory paths. The "recursive" attribute can be specified to recursively add fonts from all sub directories.</li>
<li>The fonts "auto-detect" tag can be used to automatically register fonts that are found to be installed on the native operating system.</li>
@@ -294,37 +355,38 @@ It will display all of the font names and exit with an Exception.</p>
</section>
<section id="autodetect">
<title>Auto-Detect and auto-embedd feature</title>
<p>When the "auto-detect" flag is set in the configuration, FOP will automatically search for fonts in the default paths for your operating system.</p>
<p>FOP will also auto-detect fonts which are available in the classpath, if they are described as "application/x-font" in the MANIFEST.MF file. For example, if your .jar file contains font/myfont.ttf:</p>
<source>Manifest-Version: 1.0
Name: font/myfont.ttf
Content-Type: application/x-font</source>
<p>This feature allows you to create JAR files containing fonts. The JAR files can be added to fop by providem them in the classpath, e.g. copying them into the lib/ directory.</p>
<p>When the "auto-detect" flag is set in the configuration, FOP will automatically search for fonts in the default paths for your operating system.</p>
<p>FOP will also auto-detect fonts which are available in the classpath, if they are described as "application/x-font" in the MANIFEST.MF file. For example, if your .jar file contains font/myfont.ttf:</p>
<source>Manifest-Version: 1.0
Name: font/myfont.ttf
Content-Type: application/x-font</source>
<p>This feature allows you to create JAR files containing fonts. The JAR files can be added to fop by providem them in the classpath, e.g. copying them into the lib/ directory.</p>
</section>
<section id="embedding">
<title>Embedding</title>
<note>The PostScript renderer does not yet support TrueType fonts, but can embed Type 1 fonts.</note>
<note>The font is simply embedded into the PDF file, it is not converted.</note>
<p>Font embedding is enabled in the userconfig.xml file and controlled by the embed-url attribute.
If you don't specify the embed-url attribute the font will not be embedded, but will only be referenced.</p>
If you don't specify the embed-url attribute the font will not be embedded, but will only be referenced.</p>
<warning>
Omitting the embed-url attribute for CID-encoded TrueType fonts will currently produce invalid
PDF files! If you create the XML font metric file using the "-enc ansi" option, you can omit
the embed-url attribute for TrueType fonts but you're restricted to the WinAnsi character set.
</warning>
<p>When FOP embeds a font, it adds a prefix to the fontname to ensure that the name will not match the fontname of an installed font.
This is helpful with older versions of Acrobat Reader that preferred installed fonts over embedded fonts.</p>
This is helpful with older versions of Acrobat Reader that preferred installed fonts over embedded fonts.</p>
<p>When embedding PostScript fonts, the entire font is always embedded.</p>
<p>When embedding TrueType fonts (ttf) or TrueType Collections (ttc), a subset of the
original font, containing only the glyphs used, is embedded in the output document.</p>
</section>
<!-- The following section should no longer be required
<section id="embedding-base14">
<title>Explicitly embedding the base 14 fonts</title>
<p>
There are cases where you might want to force the embedding of one or more of the base 14 fonts that
can normally be considered available on the target platform (viewer, printer). One of these cases is
PDF/A which mandates the embedding of even the base 14 fonts. Embedding a font such as Helvetica or
<a href="pdfa.html">PDF/A</a> which mandates the embedding of even the base 14 fonts. Embedding a font such as Helvetica or
Courier is straight-forward. The "Symbol" and "ZapfDingbats" fonts, however, currently present a
problem because FOP cannot correctly determine the encoding of these two single-byte fonts through
the PFM file. FOP now correctly interprets the "encoding" value in the XML font metrics file, but the
@@ -342,7 +404,7 @@ This is helpful with older versions of Acrobat Reader that preferred installed f
<cap-height>673</cap-height>
<x-height>766</x-height>
[..]]]></source>
</section>
</section-->
</section>
</body>
</document>

+ 29
- 0
src/documentation/content/xdocs/trunk/output.xml View File

@@ -48,6 +48,35 @@
The net effect is that the layout of a given FO document can be quite different between
renderers that do not use the same font information.
</p>
<p>
Theoretically, there's some potential to make the output of the PDF/PS renderers match
the output of the Java2D-based renderers. If FOP used the font metrics from its own
font subsystem but still used Java2D for text painting in the Java2D-based renderers,
this could probably be achieved. However, this approach hasn't been implemented, yet.
</p>
<p>
With a work-around, it is possible to match the PDF/PS output in a Java2D-based
renderer pretty closely. The clue is to use the
<a href="intermediate.html">intermediate format</a>. The trick is to layout the
document using FOP's own font subsystem but then render the document using Java2D.
Here are the necessary steps (using the command-line):
</p>
<ol>
<li>
Produce an IF file: <code>fop -fo myfile.fo -at application/pdf myfile.at.xml</code><br/>
Specifying "application/pdf" for the "-at" parameter causes FOP to use FOP's own
font subsystem (which is used by the PDF renderer). Note that no PDF file is created
in this step.
</li>
<li>Render to a PDF file: <code>fop -atin myfile.at.xml -pdf myfile.pdf</code></li>
<li>Render to a Java2D-based renderer:
<ul>
<li><code>fop -atin myfile.at.xml -print</code></li>
<li><code>fop -atin myfile.at.xml -awt</code></li>
<li><code>fop -atin myfile.at.xml -tiff myfile.tiff</code></li>
</ul>
</li>
</ol>
</section>
<section id="general-direct-output">
<title>Output to a Printer or Other Device</title>

+ 2
- 4
src/documentation/content/xdocs/trunk/pdfencryption.xml View File

@@ -204,15 +204,13 @@ Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent);
</p>
<ol>
<li>
Download the binary distribution for your JDK version. If you have JDK
1.3 or earlier you must also download a JCE from the same page.
Download the binary distribution for your JDK version.
</li>
<li>
Unpack the distribution. Add the jar file to your classpath. A
convenient way to use the jar on Linux is to simply drop it into the
FOP lib directory, it will be automatically picked up by
<code>fop.sh</code>. If you have JDK 1.3 or earlier don't forget to
install the JCE as well.
<code>fop.sh</code>.
</li>
<li>
Open the <code>java.security</code> file and add<br/>

+ 1
- 1
src/documentation/content/xdocs/trunk/running.xml View File

@@ -305,7 +305,7 @@ Fop [options] [-fo|-xml] infile [-xsl file] [-awt|-pdf|-mif|-rtf|-tiff|-png|-pcl
<ul>
<li>
Increase memory available to the JVM. See
<a href="http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/java.html">the -Xmx option</a>
<a href="http://java.sun.com/j2se/1.4/docs/tooldocs/solaris/java.html">the -Xmx option</a>
for more information.
<warning>
It is usually unwise to increase the memory allocated to the JVM beyond the amount of

+ 3
- 2
src/documentation/poster/README.txt View File

@@ -5,7 +5,8 @@ created for OpenExpo '06 (http://www.openexpo.ch).

To create the PDF just call go.bat.

The fully reconstruct the PDF you need to copy some fonts into
the cfg directory. Please see the README.txt there for details.
The fully reconstruct the PDF you need some fonts installed in
your operating system: Verdana and Lucida Console which are
available in every Windows installation.

You will also need English hyphenation patterns.

+ 0
- 7
src/documentation/poster/cfg/README.txt View File

@@ -1,7 +0,0 @@
The following files are missing here for license reasons:

lucon.ttf - Lucida Console Font
verdana.ttf - Verdana Font
verdanab.ttf - Verdana Bold Font

They can be found in every MS Windows installation.

+ 0
- 1817
src/documentation/poster/cfg/VERDANA.ttf.xml
File diff suppressed because it is too large
View File


+ 0
- 1167
src/documentation/poster/cfg/VERDANAB.ttf.xml
File diff suppressed because it is too large
View File


+ 1
- 11
src/documentation/poster/cfg/fop.xconf View File

@@ -17,23 +17,13 @@
-->
<!-- $Id$ -->
<fop>
<base>.</base>
<source-resolution>72</source-resolution>
<target-resolution>300</target-resolution>
<default-page-settings height="11in" width="8.26in"/>
<renderers>
<renderer mime="application/pdf">
<!--output-profile>cfg/ISOuncoated.icc</output-profile-->
<fonts>
<font metrics-url="cfg\VERDANA.ttf.xml" kerning="yes" embed-url="cfg\VERDANA.ttf">
<font-triplet name="Verdana" style="normal" weight="normal"/>
</font>
<font metrics-url="cfg\VERDANAB.ttf.xml" kerning="yes" embed-url="cfg\VERDANAB.ttf">
<font-triplet name="Verdana" style="normal" weight="bold"/>
</font>
<font metrics-url="cfg\LUCON.ttf.xml" kerning="yes" embed-url="cfg\LUCON.ttf">
<font-triplet name="Lucida Console" style="normal" weight="normal"/>
</font>
<auto-detect/>
</fonts>
</renderer>
</renderers>

+ 0
- 925
src/documentation/poster/cfg/lucon.ttf.xml View File

@@ -1,925 +0,0 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- $Id$ -->
<font-metrics type="TYPE0">
<font-name>LucidaConsole</font-name>
<embed/>
<cap-height>626</cap-height>
<x-height>530</x-height>
<ascender>783</ascender>
<descender>-205</descender>
<bbox>
<left>0</left>
<bottom>-210</bottom>
<right>602</right>
<top>789</top>
</bbox>
<flags>35</flags>
<stemv>0</stemv>
<italicangle>0</italicangle>
<subtype>TYPE0</subtype>
<multibyte-extras>
<cid-type>CIDFontType2</cid-type>
<default-width>0</default-width>
<bfranges>
<bf us="32" ue="126" gi="3"/>
<bf us="160" ue="160" gi="172"/>
<bf us="161" ue="161" gi="163"/>
<bf us="162" ue="163" gi="132"/>
<bf us="164" ue="164" gi="188"/>
<bf us="165" ue="165" gi="150"/>
<bf us="166" ue="166" gi="230"/>
<bf us="167" ue="167" gi="134"/>
<bf us="168" ue="168" gi="142"/>
<bf us="169" ue="169" gi="139"/>
<bf us="170" ue="170" gi="157"/>
<bf us="171" ue="171" gi="169"/>
<bf us="172" ue="172" gi="164"/>
<bf us="173" ue="173" gi="256"/>
<bf us="174" ue="174" gi="138"/>
<bf us="175" ue="175" gi="257"/>
<bf us="176" ue="176" gi="131"/>
<bf us="177" ue="177" gi="147"/>
<bf us="178" ue="179" gi="240"/>
<bf us="180" ue="180" gi="141"/>
<bf us="181" ue="181" gi="151"/>
<bf us="182" ue="182" gi="136"/>
<bf us="183" ue="183" gi="258"/>
<bf us="184" ue="184" gi="220"/>
<bf us="185" ue="185" gi="239"/>
<bf us="186" ue="186" gi="158"/>
<bf us="187" ue="187" gi="170"/>
<bf us="188" ue="188" gi="243"/>
<bf us="189" ue="189" gi="242"/>
<bf us="190" ue="190" gi="244"/>
<bf us="191" ue="191" gi="162"/>
<bf us="192" ue="192" gi="173"/>
<bf us="193" ue="193" gi="200"/>
<bf us="194" ue="194" gi="198"/>
<bf us="195" ue="195" gi="174"/>
<bf us="196" ue="197" gi="98"/>
<bf us="198" ue="198" gi="144"/>
<bf us="199" ue="199" gi="100"/>
<bf us="200" ue="200" gi="202"/>
<bf us="201" ue="201" gi="101"/>
<bf us="202" ue="202" gi="199"/>
<bf us="203" ue="203" gi="201"/>
<bf us="204" ue="204" gi="206"/>
<bf us="205" ue="207" gi="203"/>
<bf us="208" ue="208" gi="231"/>
<bf us="209" ue="209" gi="102"/>
<bf us="210" ue="210" gi="209"/>
<bf us="211" ue="212" gi="207"/>
<bf us="213" ue="213" gi="175"/>
<bf us="214" ue="214" gi="103"/>
<bf us="215" ue="215" gi="238"/>
<bf us="216" ue="216" gi="145"/>
<bf us="217" ue="217" gi="212"/>
<bf us="218" ue="219" gi="210"/>
<bf us="220" ue="220" gi="104"/>
<bf us="221" ue="221" gi="233"/>
<bf us="222" ue="222" gi="235"/>
<bf us="223" ue="223" gi="137"/>
<bf us="224" ue="224" gi="106"/>
<bf us="225" ue="225" gi="105"/>
<bf us="226" ue="226" gi="107"/>
<bf us="227" ue="227" gi="109"/>
<bf us="228" ue="228" gi="108"/>
<bf us="229" ue="229" gi="110"/>
<bf us="230" ue="230" gi="160"/>
<bf us="231" ue="231" gi="111"/>
<bf us="232" ue="232" gi="113"/>
<bf us="233" ue="233" gi="112"/>
<bf us="234" ue="235" gi="114"/>
<bf us="236" ue="236" gi="117"/>
<bf us="237" ue="237" gi="116"/>
<bf us="238" ue="239" gi="118"/>
<bf us="240" ue="240" gi="232"/>
<bf us="241" ue="241" gi="120"/>
<bf us="242" ue="242" gi="122"/>
<bf us="243" ue="243" gi="121"/>
<bf us="244" ue="244" gi="123"/>
<bf us="245" ue="245" gi="125"/>
<bf us="246" ue="246" gi="124"/>
<bf us="247" ue="247" gi="184"/>
<bf us="248" ue="248" gi="161"/>
<bf us="249" ue="249" gi="127"/>
<bf us="250" ue="250" gi="126"/>
<bf us="251" ue="252" gi="128"/>
<bf us="253" ue="253" gi="234"/>
<bf us="254" ue="254" gi="236"/>
<bf us="255" ue="255" gi="186"/>
<bf us="256" ue="261" gi="259"/>
<bf us="262" ue="263" gi="251"/>
<bf us="264" ue="267" gi="265"/>
<bf us="268" ue="269" gi="253"/>
<bf us="270" ue="272" gi="269"/>
<bf us="273" ue="273" gi="255"/>
<bf us="274" ue="285" gi="272"/>
<bf us="286" ue="287" gi="246"/>
<bf us="288" ue="303" gi="284"/>
<bf us="304" ue="304" gi="248"/>
<bf us="305" ue="305" gi="213"/>
<bf us="306" ue="320" gi="300"/>
<bf us="321" ue="322" gi="224"/>
<bf us="323" ue="337" gi="315"/>
<bf us="338" ue="339" gi="176"/>
<bf us="340" ue="349" gi="330"/>
<bf us="350" ue="351" gi="249"/>
<bf us="352" ue="353" gi="226"/>
<bf us="354" ue="375" gi="340"/>
<bf us="376" ue="376" gi="187"/>
<bf us="377" ue="380" gi="362"/>
<bf us="381" ue="382" gi="228"/>
<bf us="383" ue="383" gi="366"/>
<bf us="402" ue="402" gi="166"/>
<bf us="506" ue="511" gi="367"/>
<bf us="710" ue="710" gi="214"/>
<bf us="711" ue="711" gi="223"/>
<bf us="713" ue="713" gi="216"/>
<bf us="728" ue="730" gi="217"/>
<bf us="731" ue="731" gi="222"/>
<bf us="732" ue="732" gi="215"/>
<bf us="733" ue="733" gi="221"/>
<bf us="894" ue="894" gi="373"/>
<bf us="900" ue="906" gi="374"/>
<bf us="908" ue="908" gi="381"/>
<bf us="910" ue="929" gi="382"/>
<bf us="931" ue="959" gi="402"/>
<bf us="960" ue="960" gi="155"/>
<bf us="961" ue="974" gi="431"/>
<bf us="1025" ue="1036" gi="445"/>
<bf us="1038" ue="1103" gi="457"/>
<bf us="1105" ue="1116" gi="523"/>
<bf us="1118" ue="1119" gi="535"/>
<bf us="1168" ue="1169" gi="537"/>
<bf us="7808" ue="7813" gi="539"/>
<bf us="7922" ue="7923" gi="545"/>
<bf us="8211" ue="8212" gi="178"/>
<bf us="8213" ue="8213" gi="547"/>
<bf us="8215" ue="8215" gi="548"/>
<bf us="8216" ue="8217" gi="182"/>
<bf us="8218" ue="8218" gi="195"/>
<bf us="8220" ue="8221" gi="180"/>
<bf us="8222" ue="8222" gi="196"/>
<bf us="8224" ue="8224" gi="130"/>
<bf us="8225" ue="8225" gi="193"/>
<bf us="8226" ue="8226" gi="135"/>
<bf us="8230" ue="8230" gi="171"/>
<bf us="8240" ue="8240" gi="197"/>
<bf us="8249" ue="8250" gi="189"/>
<bf us="8252" ue="8252" gi="549"/>
<bf us="8254" ue="8254" gi="550"/>
<bf us="8260" ue="8260" gi="551"/>
<bf us="8319" ue="8319" gi="552"/>
<bf us="8355" ue="8355" gi="245"/>
<bf us="8356" ue="8356" gi="553"/>
<bf us="8359" ue="8359" gi="554"/>
<bf us="8364" ue="8364" gi="665"/>
<bf us="8470" ue="8470" gi="555"/>
<bf us="8482" ue="8482" gi="140"/>
<bf us="8486" ue="8486" gi="159"/>
<bf us="8539" ue="8542" gi="556"/>
<bf us="8592" ue="8597" gi="560"/>
<bf us="8616" ue="8616" gi="566"/>
<bf us="8706" ue="8706" gi="152"/>
<bf us="8710" ue="8710" gi="168"/>
<bf us="8719" ue="8719" gi="154"/>
<bf us="8721" ue="8721" gi="153"/>
<bf us="8722" ue="8722" gi="237"/>
<bf us="8729" ue="8729" gi="194"/>
<bf us="8730" ue="8730" gi="165"/>
<bf us="8734" ue="8734" gi="146"/>
<bf us="8735" ue="8735" gi="567"/>
<bf us="8745" ue="8745" gi="568"/>
<bf us="8747" ue="8747" gi="156"/>
<bf us="8776" ue="8776" gi="167"/>
<bf us="8800" ue="8800" gi="143"/>
<bf us="8801" ue="8801" gi="569"/>
<bf us="8804" ue="8805" gi="148"/>
<bf us="8962" ue="8962" gi="570"/>
<bf us="8976" ue="8976" gi="571"/>
<bf us="8992" ue="8993" gi="572"/>
<bf us="9472" ue="9472" gi="574"/>
<bf us="9474" ue="9474" gi="575"/>
<bf us="9484" ue="9484" gi="576"/>
<bf us="9488" ue="9488" gi="577"/>
<bf us="9492" ue="9492" gi="578"/>
<bf us="9496" ue="9496" gi="579"/>
<bf us="9500" ue="9500" gi="580"/>
<bf us="9508" ue="9508" gi="581"/>
<bf us="9516" ue="9516" gi="582"/>
<bf us="9524" ue="9524" gi="583"/>
<bf us="9532" ue="9532" gi="584"/>
<bf us="9552" ue="9580" gi="585"/>
<bf us="9600" ue="9600" gi="614"/>
<bf us="9604" ue="9604" gi="615"/>
<bf us="9608" ue="9608" gi="616"/>
<bf us="9612" ue="9612" gi="617"/>
<bf us="9616" ue="9619" gi="618"/>
<bf us="9632" ue="9632" gi="622"/>
<bf us="9644" ue="9644" gi="623"/>
<bf us="9650" ue="9650" gi="624"/>
<bf us="9658" ue="9658" gi="625"/>
<bf us="9660" ue="9660" gi="626"/>
<bf us="9668" ue="9668" gi="627"/>
<bf us="9674" ue="9674" gi="185"/>
<bf us="9675" ue="9675" gi="628"/>
<bf us="9688" ue="9689" gi="629"/>
<bf us="9786" ue="9788" gi="631"/>
<bf us="9792" ue="9792" gi="634"/>
<bf us="9794" ue="9794" gi="635"/>
<bf us="9824" ue="9824" gi="636"/>
<bf us="9827" ue="9827" gi="637"/>
<bf us="9829" ue="9830" gi="638"/>
<bf us="9834" ue="9835" gi="640"/>
<bf us="61443" ue="61453" gi="642"/>
<bf us="63512" ue="63523" gi="653"/>
<bf us="64257" ue="64258" gi="191"/>
<bf us="65535" ue="65535" gi="0"/>
</bfranges>
<cid-widths start-index="0">
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="602"/>
<wx w="603"/>
</cid-widths>
</multibyte-extras>
</font-metrics>

+ 2
- 1
src/documentation/poster/svg/pepe-business-card.svg View File

@@ -16,7 +16,8 @@
limitations under the License.
-->
<!-- $Id$ -->
<svg xml:space="preserve" x="-3.05102in" y="-2.2459in" width="3.31009in" height="2.08961in"
<svg xmlns="http://www.w3.org/2000/svg"
xml:space="preserve" x="-3.05102in" y="-2.2459in" width="3.31009in" height="2.08961in"
style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality" viewBox="-30510 0 33101 20896">
<g>
<g>

+ 10
- 9
src/documentation/poster/xml/business-card-demo.xml View File

@@ -37,13 +37,13 @@
<fo:instream-foreign-object xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg:svg width="150mm" height="70mm" viewBox="0 0 150 70">
<svg:g transform="rotate(-7)">
<svg:image x="0" y="12" width="84" height="53" xlink:href="svg/pepe-business-card.svg"/>
<svg:image x="0" y="12" width="84" height="53" xlink:href="../svg/pepe-business-card.svg"/>
</svg:g>
</svg:svg>
</fo:instream-foreign-object>
</p>
<fo:block-container absolute-position="absolute" left="80mm" top="20mm" width="2cm" height="10cm">
<fo:block>
<fo:block-container absolute-position="absolute" left="80mm" top="20mm" width="3cm" height="10cm">
<fo:block font-size="0" line-height="0">
<fo:instream-foreign-object xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="1.8cm" height="10cm" viewBox="0 0 20 100">
<defs>
@@ -65,11 +65,11 @@
</fo:instream-foreign-object>
</fo:block>
</fo:block-container>
<fo:block-container absolute-position="absolute" width="100%" height="100%">
<fo:block start-indent="112mm">
<p>The XSLT stylesheet which contains the rules to convert the business card XML to XSL-FO:</p>
<fo:block text-align="start" font-family="'Lucida Console'" font-size="10pt" white-space="pre"
><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<fo:block-container absolute-position="absolute" width="100%">
<fo:block start-indent="112mm">
<p>The XSLT stylesheet which contains the rules to convert the business card XML to XSL-FO:</p>
<fo:block text-align="start" font-family="'Lucida Console'" font-size="10pt" white-space="pre"
><![CDATA[<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
@@ -77,7 +77,8 @@
<xsl:template match="/">
<fo:root font-family="Helvetica" font-size="10pt">
<fo:layout-master-set>
<fo:simple-page-master master-name="bc" page-height="53mm" page-width="84mm" margin="3mm">
<fo:simple-page-master master-name="bc"
page-height="53mm" page-width="84mm" margin="3mm">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>

+ 5
- 6
src/documentation/poster/xml/fop-history.xml View File

@@ -39,13 +39,12 @@
</p>
<p>
In 2005, the redesign finally took a leap forward, which resulted in the first release from
the new codebase (FOP&#160;0.90alpha). Shortly thereafter, FOP&#160;0.91beta was released in December
2005 and FOP&#160;0.92beta in April&#160;2006. Although 0.92beta still carries the beta tag,
it has many advantages over the old version 0.20.5.
the new codebase (FOP&#160;0.90alpha). The project team has published a number of releases
since then. FOP made big steps forward.
</p>
<p>
The next version, to be released shortly, will be 0.93. This version should be the last release
before the long-awaited version 1.0, for which the team only has to implement a handful of
additional features.
The next version, to be released in March&#160;2008, will be 0.95. Although FOP still carries
pre&#160;1.0 version numbers it is production-ready. Some features are still missing before
version&#160;1.0 can be released.
</p>
</section>

+ 5
- 5
src/documentation/poster/xml/fop-poster.xml View File

@@ -21,11 +21,11 @@
<section href="fop-overview.xml" width="165" height="118"/>
<section href="fop-output-formats.xml" width="165" height="103"/>
<section href="fop-foreign-xml-support.xml" width="165" height="55"/>
<section href="fop-image-support.xml" width="165" height="65"/>
<section href="fop-use-cases.xml" width="165" height="96"/>
<section href="fop-history.xml" width="165" height="181"/>
<section href="fop-image-support.xml" width="165" height="66"/>
<section href="fop-use-cases.xml" width="165" height="98"/>
<section href="fop-history.xml" width="165" height="180"/>
<section href="fop-getting-help.xml" width="165" height="67"/>
<section href="fop-transformation-chain.xml" width="335" height="167"/>
<section href="fop-transformation-chain.xml" width="335" height="166"/>
<!-- section href="hello-world-in-fo.xml" width="165" height="115"/-->
<section href="business-card-demo.xml" width="335" height="181"/>
<section href="business-card-demo.xml" width="335" height="185"/>
</poster>

+ 1
- 1
src/documentation/poster/xml/fop-transformation-chain.xml View File

@@ -19,7 +19,7 @@
<section xmlns:fo="http://www.w3.org/1999/XSL/Format">
<title tab-width="80">Transformation Chain</title>
<fo:block space-before="10pt" space-before.conditionality="retain" space-after="10pt" text-align="center">
<fo:external-graphic src="svg/fop-transformation-chain.svg" width="70%" content-width="scale-to-fit"/>
<fo:external-graphic src="../svg/fop-transformation-chain.svg" width="70%" content-width="scale-to-fit"/>
</fo:block>
<p>
This diagram shows a complete transformation chain (exemplary). It begins with your data source,

+ 1
- 2
src/documentation/poster/xml/fop-use-cases.xml View File

@@ -19,8 +19,7 @@
<section xmlns:fo="http://www.w3.org/1999/XSL/Format">
<title tab-width="50">Use Cases</title>
<fo:table table-layout="fixed" width="100%" border-collapse="separate">
<fo:table-column/>
<fo:table-column/>
<fo:table-column column-width="proportional-column-width(1)" number-columns-repeated="2"/>
<fo:table-header>
<fo:table-row font-weight="bold">
<fo:table-cell border-bottom="solid 0.5mm black">

+ 3
- 3
src/documentation/poster/xslt/common.xsl View File

@@ -37,14 +37,14 @@
<xsl:choose>
<xsl:when test="ancestor::li and not(preceding-sibling::*)">
<fo:block
space-after="4pt">
space-after.optimum="0.3em" space-after.maximum="1em">
<xsl:apply-templates/>
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block
space-before="4pt"
space-after="4pt">
space-before.optimum="0.3em" space-before.maximum="1em"
space-after.optimum="0.3em" space-after.maximum="1em">
<xsl:apply-templates/>
</fo:block>
</xsl:otherwise>

+ 6
- 7
src/documentation/poster/xslt/fop-poster.xsl View File

@@ -60,9 +60,6 @@
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates select="section"/>
<fo:block-container width="1cm" height="5cm">
<fo:block/>
</fo:block-container>
</fo:flow>
</fo:page-sequence>
</fo:root>
@@ -84,14 +81,14 @@
<path
d="M 840,575 L 280,575 c -40,0 -60,-50 -100,-50 L 0,525"
style="fill:none; stroke:blue; stroke-width:5;" />
<image x="680" y="7" width="140" height="60" xlink:href="svg/fop-logo-reconstructed.svg"/>
<image x="680" y="7" width="140" height="60" xlink:href="../svg/fop-logo-reconstructed.svg"/>
<text x="15" y="35" style="fill:black; font-weight:bold; font-size:17">
Apache FOP - The leading open source XSL-FO formatter
</text>
<text x="685" y="74" style="fill:black; font-size:5.5">
A product of the Apache XML Graphics Project
</text>
<image x="15" y="530" width="160" height="60" xlink:href="svg/asf-logo.svg"/>
<image x="15" y="530" width="160" height="60" xlink:href="../svg/asf-logo.svg"/>
<text x="360" y="560" style="fill:blue; font-size:12">
For more details, please visit: <a xlink:href="http://xmlgraphics.apache.org/fop/">http://xmlgraphics.apache.org/fop/</a>
</text>
@@ -111,7 +108,7 @@
</xsl:template>
<xsl:template match="section">
<xsl:variable name="section-content" select="exslt:node-set(document(@href))"/>
<xsl:variable name="section-content" select="exslt:node-set(document(@href, .))"/>
<fo:block
space-before.minimum="2mm" space-before.optimum="5mm" space-before.maximum="30mm"
space-before.conditionality="discard" space-after.conditionality="discard"
@@ -129,7 +126,9 @@
</fo:instream-foreign-object>
</fo:block>
</fo:block-container>
<fo:block-container width="{@width}mm - 8mm" height="{@height}mm - 20mm" padding="4mm" padding-top="16mm" margin="0pt">
<fo:block-container width="{@width}mm - 8mm" height="{@height}mm - 24mm"
padding="4mm" padding-top="16mm" padding-bottom="8mm" margin="0pt"
display-align="distribute" id="section{position()}">
<fo:block>
<xsl:apply-templates select="$section-content/section/*[local-name() != 'title']"/>
</fo:block>

+ 6
- 37
src/documentation/sitemap.xmap View File

@@ -20,44 +20,13 @@
</map:components>

<map:pipelines>
<map:pipeline>
<map:match type="regexp" pattern="^(.*?)([^/]*)changes.xml$">
<map:generate type="file" src="{project:status}" />
<map:transform src="resources/stylesheets/changes2document.xsl" >
<map:parameter name="bugtracking-url" value="{defaults:bugtracking-url}"/>
<map:parameter name="path" value="{1}{2}"/>
</map:transform>
<map:serialize type="xml-document"/>
</map:match>
<map:match type="regexp" pattern="^(.*?)([^/]*)changes_(.*).xml$">
<map:generate type="file" src="{project:status}" />
<map:transform src="resources/stylesheets/changes2document.xsl" >
<map:parameter name="bugtracking-url" value="{defaults:bugtracking-url}"/>
<map:parameter name="path" value="{1}{2}"/>
<map:parameter name="versionNumber" value="{3}"/>
</map:transform>
<map:serialize type="xml-document"/>
</map:match>

<map:match type="regexp" pattern="^(.*?)([^/]*)releaseNotes_(.*).xml$">
<map:generate type="file" src="{project:status}" />
<map:transform src="resources/stylesheets/releaseNotes2document.xsl">
<map:parameter name="versionNumber" value="{3}"/>
<map:parameter name="path" value="{1}{2}"/>
</map:transform>
<map:serialize type="xml-document"/>
</map:match>

</map:pipeline>
<!-- This is used by xinclude statements in knownissues.xml -->
<map:pipeline internal-only="true">
<map:match type="regexp" pattern="^(.*?)([^/]*)knownissues-raw-layoutengine.xml$">
<map:generate type="file" src="../../test/layoutengine/disabled-testcases.xml"/>
<map:transform src="resources/stylesheets/disabled-testcases2document.xsl" >
<map:parameter name="bugtracking-url" value="{defaults:bugtracking-url}"/>
<map:parameter name="bugtracking-url" value="{properties:bugtracking-url}"/>
<map:parameter name="path" value="{1}{2}"/>
</map:transform>
<map:serialize type="xml-document"/>
@@ -65,13 +34,13 @@
<map:match type="regexp" pattern="^(.*?)([^/]*)knownissues-raw-fotree.xml$">
<map:generate type="file" src="../../test/fotree/disabled-testcases.xml"/>
<map:transform src="resources/stylesheets/disabled-testcases2document.xsl" >
<map:parameter name="bugtracking-url" value="{defaults:bugtracking-url}"/>
<map:parameter name="bugtracking-url" value="{properties:bugtracking-url}"/>
<map:parameter name="path" value="{1}{2}"/>
</map:transform>
<map:serialize type="xml-document"/>
</map:match>
<map:match type="regexp" pattern="^(.*?)([^/]*)knownissues-raw-static.xml$">
<!--<map:generate type="file" src="{project:knownissues}"/>-->
<!--<map:generate type="file" src="{properties:knownissues}"/>-->
<map:generate type="file" src="../../known-issues.xml"/>
<map:transform src="resources/stylesheets/known-issues2document.xsl"/>
<map:serialize type="xml-document"/>
@@ -80,7 +49,7 @@
<map:match type="regexp" pattern="^(.*?)([^/]*)knownissues-raw-layoutengine_(.*).xml$">
<map:generate type="file" src="content/xdocs/{3}/layoutengine/disabled-testcases.xml"/>
<map:transform src="resources/stylesheets/disabled-testcases2document.xsl" >
<map:parameter name="bugtracking-url" value="{defaults:bugtracking-url}"/>
<map:parameter name="bugtracking-url" value="{properties:bugtracking-url}"/>
<map:parameter name="path" value="{1}{2}"/>
</map:transform>
<map:serialize type="xml-document"/>
@@ -88,13 +57,13 @@
<map:match type="regexp" pattern="^(.*?)([^/]*)knownissues-raw-fotree_(.*).xml$">
<map:generate type="file" src="content/xdocs/{3}/fotree/disabled-testcases.xml"/>
<map:transform src="resources/stylesheets/disabled-testcases2document.xsl" >
<map:parameter name="bugtracking-url" value="{defaults:bugtracking-url}"/>
<map:parameter name="bugtracking-url" value="{properties:bugtracking-url}"/>
<map:parameter name="path" value="{1}{2}"/>
</map:transform>
<map:serialize type="xml-document"/>
</map:match>
<map:match type="regexp" pattern="^(.*?)([^/]*)knownissues-raw-static_(.*).xml$">
<!--<map:generate type="file" src="{project:knownissues}"/>-->
<!--<map:generate type="file" src="{properties:knownissues}"/>-->
<map:generate type="file" src="content/xdocs/{3}/known-issues.xml"/>
<map:transform src="resources/stylesheets/known-issues2document.xsl"/>
<map:serialize type="xml-document"/>

+ 14
- 6
src/documentation/skinconf.xml View File

@@ -91,7 +91,7 @@ which will be used to configure the chosen Forrest skin.
<favicon-url></favicon-url>

<!-- The following used to construct a copyright statement -->
<year>1999-2007</year>
<year>1999-2008</year>
<vendor>The Apache Software Foundation.</vendor>
<copyright-link>http://www.apache.org/licenses/</copyright-link>
@@ -164,6 +164,7 @@ which will be used to configure the chosen Forrest skin.
.ForrestTable td.partial { background-color: #FFFFCC; text-align: center; }
.ForrestTable td.category { /*background-color: #CFDCED;*/
font-size: 1.2em }
.menuitemgroup{ display: block;}

</extra-css>

@@ -311,8 +312,8 @@ which will be used to configure the chosen Forrest skin.
portrait).
Supported text alignments are left, right, justify (default left).
-->
<page size="letter" orientation="portrait" text-align="left"/>
<page size="letter" orientation="portrait" text-align="justify"/>
<page-numbering-format>1</page-numbering-format>
<!--
Margins can be specified for top, bottom, inner, and outer
edges. If double-sided="false", the inner edge is always left
@@ -322,10 +323,10 @@ which will be used to configure the chosen Forrest skin.
Specified below are the default settings.
-->
<margins double-sided="false">
<top>1in</top>
<bottom>1in</bottom>
<top>0.5in</top>
<bottom>0.5in</bottom>
<inner>1in</inner>
<outer>1in</outer>
<outer>0.5in</outer>
</margins>

<!--
@@ -375,6 +376,13 @@ which will be used to configure the chosen Forrest skin.
<width>125</width>
<height>125</height>
</credit>
<credit box-location="alt2">
<name>ApacheCon US 2008</name>
<url>http://us.apachecon.com/</url>
<image>http://apache.org/ads/ApacheCon/2008-usa-125x125.png</image>
<width>125</width>
<height>125</height>
</credit>
<credit role="pdf">
<name>PDF created by Apache FOP</name>

+ 0
- 237
src/java-1.4/org/apache/fop/image/ImageIOImage.java View File

@@ -1,237 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/* $Id$ */

package org.apache.fop.image;

// AWT
import java.awt.Color;
import java.awt.color.ColorSpace;
import java.awt.image.ColorModel;
import java.awt.image.IndexColorModel;
import java.awt.image.BufferedImage;
import java.util.Iterator;

// ImageIO
import javax.imageio.ImageIO;
import javax.imageio.ImageReadParam;
import javax.imageio.ImageReader;
import javax.imageio.metadata.IIOMetadata;
import javax.imageio.stream.ImageInputStream;

import org.apache.commons.io.IOUtils;
import org.apache.fop.util.UnitConv;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

/**
* FopImage object using ImageIO.
* @see AbstractFopImage
* @see FopImage
*/
public class ImageIOImage extends AbstractFopImage {

private byte[] softMask = null;

/**
* Creates a new ImageIOImage.
* @param info the image info from the ImageReader
*/
public ImageIOImage(FopImage.ImageInfo info) {
super(info);
if ("image/png".equals(info.mimeType)
|| "image/tiff".equals(info.mimeType)) {
this.loaded = 0; //TODO The PNG and TIFF Readers cannot read the resolution, yet.
}
}

/**
* @see org.apache.fop.image.AbstractFopImage#loadDimensions()
*/
protected boolean loadDimensions() {
if (this.bitmaps == null) {
return loadBitmap();
}
return true;
}
private Element getChild(Element el, String name) {
NodeList nodes = el.getElementsByTagName(name);
if (nodes.getLength() > 0) {
return (Element)nodes.item(0);
} else {
return null;
}
}
/** @see org.apache.fop.image.AbstractFopImage#loadBitmap() */
protected boolean loadBitmap() {
if (this.bitmaps != null) {
return true;
}
try {
inputStream.reset();
ImageInputStream imgStream = ImageIO.createImageInputStream(inputStream);
Iterator iter = ImageIO.getImageReaders(imgStream);
if (!iter.hasNext()) {
log.error("No ImageReader found.");
return false;
}
ImageReader reader = (ImageReader)iter.next();
ImageReadParam param = reader.getDefaultReadParam();
reader.setInput(imgStream, true, false);
BufferedImage imageData = reader.read(0, param);
//Read image resolution
IIOMetadata iiometa = reader.getImageMetadata(0);
if (iiometa != null && iiometa.isStandardMetadataFormatSupported()) {
Element metanode = (Element)iiometa.getAsTree("javax_imageio_1.0");
Element dim = getChild(metanode, "Dimension");
if (dim != null) {
Element child;
child = getChild(dim, "HorizontalPixelSize");
if (child != null) {
this.dpiHorizontal = UnitConv.IN2MM
/ Float.parseFloat(child.getAttribute("value"));
}
child = getChild(dim, "VerticalPixelSize");
if (child != null) {
this.dpiVertical = UnitConv.IN2MM
/ Float.parseFloat(child.getAttribute("value"));
}
}
}
imgStream.close();
reader.dispose();
this.height = imageData.getHeight();
this.width = imageData.getWidth();

ColorModel cm = imageData.getColorModel();
this.bitsPerPixel = cm.getComponentSize(0); //only use first, we assume all are equal
//this.colorSpace = cm.getColorSpace();
//We currently force the image to sRGB
this.colorSpace = ColorSpace.getInstance(ColorSpace.CS_sRGB);

int[] tmpMap = imageData.getRGB(0, 0, this.width,
this.height, null, 0, this.width);

if (cm.hasAlpha()) {
// java.awt.Transparency. BITMASK or OPAQUE or TRANSLUCENT
int transparencyType = cm.getTransparency();
if (transparencyType == java.awt.Transparency.OPAQUE) {
this.isTransparent = false;
} else if (transparencyType == java.awt.Transparency.BITMASK) {
if (cm instanceof IndexColorModel) {
this.isTransparent = false;
byte[] alphas = new byte[
((IndexColorModel) cm).getMapSize()];
byte[] reds = new byte[
((IndexColorModel) cm).getMapSize()];
byte[] greens = new byte[
((IndexColorModel) cm).getMapSize()];
byte[] blues = new byte[
((IndexColorModel) cm).getMapSize()];
((IndexColorModel) cm).getAlphas(alphas);
((IndexColorModel) cm).getReds(reds);
((IndexColorModel) cm).getGreens(greens);
((IndexColorModel) cm).getBlues(blues);
for (int i = 0;
i < ((IndexColorModel) cm).getMapSize();
i++) {
if ((alphas[i] & 0xFF) == 0) {
this.isTransparent = true;
this.transparentColor = new Color(
(int)(reds[i] & 0xFF),
(int)(greens[i] & 0xFF),
(int)(blues[i] & 0xFF));
break;
}
}
} else {
//TODO Is there another case?
this.isTransparent = false;
}
} else {
// TRANSLUCENT
this.softMask = new byte[width * height];
imageData.getAlphaRaster().getDataElements(
0, 0, width, height, this.softMask);
this.isTransparent = false;
}
} else {
this.isTransparent = false;
}

// Should take care of the ColorSpace and bitsPerPixel
this.bitmaps = new byte[this.width * this.height * 3];
for (int i = 0; i < this.height; i++) {
for (int j = 0; j < this.width; j++) {
int p = tmpMap[i * this.width + j];
int r = (p >> 16) & 0xFF;
int g = (p >> 8) & 0xFF;
int b = (p) & 0xFF;
this.bitmaps[3 * (i * this.width + j)]
= (byte)(r & 0xFF);
this.bitmaps[3 * (i * this.width + j) + 1]
= (byte)(g & 0xFF);
this.bitmaps[3 * (i * this.width + j) + 2]
= (byte)(b & 0xFF);
}
}

} catch (Exception ex) {
log.error("Error while loading image: " + ex.getMessage(), ex);
return false;
} finally {
IOUtils.closeQuietly(inputStream);
inputStream = null;
}
return true;
}

/** @see org.apache.fop.image.AbstractFopImage#loadOriginalData() */
protected boolean loadOriginalData() {
if (inputStream == null && getBitmaps() != null) {
return false;
} else {
return loadDefaultOriginalData();
}
}
/** @see org.apache.fop.image.FopImage#hasSoftMask() */
public boolean hasSoftMask() {
if (this.bitmaps == null && this.raw == null) {
loadBitmap();
}

return (this.softMask != null);
}

/** @see org.apache.fop.image.FopImage#getSoftMask() */
public byte[] getSoftMask() {
if (this.bitmaps == null) {
loadBitmap();
}

return this.softMask;
}

}


+ 0
- 161
src/java-1.4/org/apache/fop/image/JpegImageIOImage.java View File

@@ -1,161 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/* $Id$ */

package org.apache.fop.image;

// AWT
import java.awt.Color;
import java.awt.image.ColorModel;
import java.awt.image.IndexColorModel;
import java.awt.image.BufferedImage;

// ImageIO
import javax.imageio.ImageIO;

import org.apache.commons.io.IOUtils;

/**
* FopImage object using ImageIO.
* Special class to allow the use of JpegImage for those
* renderers which can embed Jpeg directly but for renderers
* which require the decoded data this class delivers it.
* @see AbstractFopImage
* @see JpegImage
*/
public class JpegImageIOImage extends JpegImage {

/**
* Creates a new JpegImageIOImage.
* @param info the image info from the ImageReader
*/
public JpegImageIOImage(FopImage.ImageInfo info) {
super(info);
}

/**
* @see org.apache.fop.image.AbstractFopImage#loadDimensions()
*/
protected boolean loadDimensions() {
if (this.bitmaps == null) {
return loadBitmap();
}
return true;
}
/** @see org.apache.fop.image.AbstractFopImage#loadBitmap() */
protected boolean loadBitmap() {
try {
inputStream.reset();
BufferedImage imageData = ImageIO.read(inputStream);

this.height = imageData.getHeight();
this.width = imageData.getWidth();

ColorModel cm = imageData.getColorModel();
this.bitsPerPixel = cm.getComponentSize(0); //only use first, we assume all are equal
this.colorSpace = cm.getColorSpace();

int[] tmpMap = imageData.getRGB(0, 0, this.width,
this.height, null, 0, this.width);

if (cm.hasAlpha()) {
// java.awt.Transparency. BITMASK or OPAQUE or TRANSLUCENT
int transparencyType = cm.getTransparency();
if (transparencyType == java.awt.Transparency.OPAQUE) {
this.isTransparent = false;
} else if (transparencyType == java.awt.Transparency.BITMASK) {
if (cm instanceof IndexColorModel) {
this.isTransparent = false;
byte[] alphas = new byte[
((IndexColorModel) cm).getMapSize()];
byte[] reds = new byte[
((IndexColorModel) cm).getMapSize()];
byte[] greens = new byte[
((IndexColorModel) cm).getMapSize()];
byte[] blues = new byte[
((IndexColorModel) cm).getMapSize()];
((IndexColorModel) cm).getAlphas(alphas);
((IndexColorModel) cm).getReds(reds);
((IndexColorModel) cm).getGreens(greens);
((IndexColorModel) cm).getBlues(blues);
for (int i = 0;
i < ((IndexColorModel) cm).getMapSize();
i++) {
if ((alphas[i] & 0xFF) == 0) {
this.isTransparent = true;
this.transparentColor = new Color(
(int)(reds[i] & 0xFF),
(int)(greens[i] & 0xFF),
(int)(blues[i] & 0xFF));
break;
}
}
} else {
// TRANSLUCENT
/*
* this.isTransparent = false;
* for (int i = 0; i < this.width * this.height; i++) {
* if (cm.getAlpha(tmpMap[i]) == 0) {
* this.isTransparent = true;
* this.transparentColor = new PDFColor(cm.getRed(tmpMap[i]),
* cm.getGreen(tmpMap[i]), cm.getBlue(tmpMap[i]));
* break;
* }
* }
* // or use special API...
*/
this.isTransparent = false;
}
} else {
this.isTransparent = false;
}
} else {
this.isTransparent = false;
}

// Should take care of the ColorSpace and bitsPerPixel
this.bitmaps = new byte[this.width * this.height * 3];
for (int i = 0; i < this.height; i++) {
for (int j = 0; j < this.width; j++) {
int p = tmpMap[i * this.width + j];
int r = (p >> 16) & 0xFF;
int g = (p >> 8) & 0xFF;
int b = (p) & 0xFF;
this.bitmaps[3 * (i * this.width + j)]
= (byte)(r & 0xFF);
this.bitmaps[3 * (i * this.width + j) + 1]
= (byte)(g & 0xFF);
this.bitmaps[3 * (i * this.width + j) + 2]
= (byte)(b & 0xFF);
}
}

} catch (Exception ex) {
log.error("Error while loading image: " + ex.getMessage(), ex);
return false;
} finally {
IOUtils.closeQuietly(inputStream);
inputStream = null;
}
return true;
}

}


+ 0
- 10
src/java/org/apache/fop/apps/FopFactory.java View File

@@ -46,7 +46,6 @@ import org.apache.fop.fo.ElementMapping;
import org.apache.fop.fo.ElementMappingRegistry;
import org.apache.fop.fonts.FontCache;
import org.apache.fop.hyphenation.HyphenationTreeResolver;
import org.apache.fop.image.ImageFactory;
import org.apache.fop.layoutmgr.LayoutManagerMaker;
import org.apache.fop.render.RendererFactory;
import org.apache.fop.render.XMLHandlerRegistry;
@@ -82,9 +81,6 @@ public class FopFactory implements ImageContext {

private ColorSpaceCache colorSpaceCache = null;
/** Image factory for creating fop image objects */
private ImageFactory imageFactory;

/** Image manager for loading and caching image objects */
private ImageManager imageManager;

@@ -155,7 +151,6 @@ public class FopFactory implements ImageContext {
this.elementMappingRegistry = new ElementMappingRegistry(this);
this.foURIResolver = new FOURIResolver(validateUserConfigStrictly());
this.colorSpaceCache = new ColorSpaceCache(foURIResolver);
this.imageFactory = new ImageFactory();
this.imageManager = new ImageManager(this);
this.rendererFactory = new RendererFactory();
this.xmlHandlers = new XMLHandlerRegistry();
@@ -290,11 +285,6 @@ public class FopFactory implements ImageContext {
return this.contentHandlerFactoryRegistry;
}

/** @return the image factory */
public ImageFactory getImageFactory() {
return this.imageFactory;
}

/**
* Returns the image manager.
* @return the image manager

+ 7
- 1
src/java/org/apache/fop/cli/InputHandler.java View File

@@ -39,8 +39,13 @@ import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;

import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.Fop;
@@ -150,6 +155,7 @@ public class InputHandler implements ErrorListener, Renderable {
try {
InputSource is = new InputSource(new FileInputStream(
this.sourcefile));
is.setSystemId(this.sourcefile.toURI().toASCIIString());
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setFeature("http://xml.org/sax/features/namespaces", true);
spf.setFeature("http://apache.org/xml/features/xinclude", true);
@@ -221,7 +227,7 @@ public class InputHandler implements ErrorListener, Renderable {
* {@inheritDoc}
*/
public void warning(TransformerException exc) {
log.warn(exc.toString());
log.warn(exc.getLocalizedMessage());
}

/**

+ 3
- 3
src/java/org/apache/fop/fo/ElementMapping.java View File

@@ -19,7 +19,7 @@

package org.apache.fop.fo;

import java.util.HashMap;
import java.util.Map;

import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@@ -37,7 +37,7 @@ public abstract class ElementMapping {
public static final String DEFAULT = "<default>";

/** The HashMap table of formatting objects defined by the ElementMapping */
protected HashMap foObjs = null;
protected Map foObjs = null;

/** The namespace for the ElementMapping */
protected String namespaceURI = null;
@@ -47,7 +47,7 @@ public abstract class ElementMapping {
*
* @return Table of Maker objects for this ElementMapping
*/
public HashMap getTable() {
public Map getTable() {
if (foObjs == null) {
initialize();
}

+ 6
- 0
src/java/org/apache/fop/fo/FOPropertyMapping.java View File

@@ -412,6 +412,7 @@ public final class FOPropertyMapping implements Constants {
l.setInherited(false);
l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
l.setDefault("auto");
l.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);
addPropertyMaker("top", l);

// right
@@ -419,6 +420,7 @@ public final class FOPropertyMapping implements Constants {
l.setInherited(false);
l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
l.setDefault("auto");
l.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
addPropertyMaker("right", l);

// bottom
@@ -426,6 +428,7 @@ public final class FOPropertyMapping implements Constants {
l.setInherited(false);
l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
l.setDefault("auto");
l.setPercentBase(LengthBase.CONTAINING_BLOCK_HEIGHT);
addPropertyMaker("bottom", l);

// left
@@ -433,6 +436,7 @@ public final class FOPropertyMapping implements Constants {
l.setInherited(false);
l.addEnum("auto", getEnumProperty(EN_AUTO, "AUTO"));
l.setDefault("auto");
l.setPercentBase(LengthBase.CONTAINING_BLOCK_WIDTH);
addPropertyMaker("left", l);
}

@@ -1161,6 +1165,7 @@ public final class FOPropertyMapping implements Constants {
m = new LengthProperty.Maker(PR_START_INDENT);
m.setInherited(true);
m.setDefault("0pt");
m.setPercentBase(LengthBase.CONTAINING_REFAREA_WIDTH);
IndentPropertyMaker sCorr = new IndentPropertyMaker(m);
sCorr.setCorresponding(PR_MARGIN_LEFT, PR_MARGIN_RIGHT, PR_MARGIN_TOP);
sCorr.setUseParent(false);
@@ -1177,6 +1182,7 @@ public final class FOPropertyMapping implements Constants {
m = new LengthProperty.Maker(PR_END_INDENT);
m.setInherited(true);
m.setDefault("0pt");
m.setPercentBase(LengthBase.CONTAINING_REFAREA_WIDTH);
IndentPropertyMaker eCorr = new IndentPropertyMaker(m);
eCorr.setCorresponding(PR_MARGIN_RIGHT, PR_MARGIN_LEFT, PR_MARGIN_BOTTOM);
eCorr.setUseParent(false);

+ 35
- 69
src/java/org/apache/fop/fo/FOTreeBuilder.java View File

@@ -38,7 +38,6 @@ import org.apache.fop.area.AreaTreeHandler;
import org.apache.fop.fo.ElementMapping.Maker;
import org.apache.fop.fo.extensions.ExtensionElementMapping;
import org.apache.fop.fo.pagination.Root;
import org.apache.fop.image.ImageFactory;
import org.apache.fop.util.ContentHandlerFactory;
import org.apache.fop.util.ContentHandlerFactory.ObjectBuiltListener;
import org.apache.fop.util.ContentHandlerFactory.ObjectSource;
@@ -57,9 +56,7 @@ public class FOTreeBuilder extends DefaultHandler {
/** The registry for ElementMapping instances */
protected ElementMappingRegistry elementMappingRegistry;

/**
* The root of the formatting object tree
*/
/** The root of the formatting object tree */
protected Root rootFObj = null;

/** Main DefaultHandler that handles the FO namespace. */
@@ -68,10 +65,7 @@ public class FOTreeBuilder extends DefaultHandler {
/** Current delegate ContentHandler to receive the SAX events */
protected ContentHandler delegate;
/**
* The class that handles formatting and rendering to a stream
* (mark-fop@inomial.com)
*/
/** The object that handles formatting and rendering to a stream */
private FOEventHandler foEventHandler;

/** The SAX locator object managing the line and column counters */
@@ -86,14 +80,18 @@ public class FOTreeBuilder extends DefaultHandler {
private int depth;
/**
* FOTreeBuilder constructor
* <code>FOTreeBuilder</code> constructor
*
* @param outputFormat the MIME type of the output format to use (ex. "application/pdf").
* @param foUserAgent in effect for this process
* @param stream OutputStream to direct results
* @throws FOPException if the FOTreeBuilder cannot be properly created
* @param foUserAgent the {@link FOUserAgent} in effect for this process
* @param stream the <code>OutputStream</code> to direct the results to
* @throws FOPException if the <code>FOTreeBuilder</code> cannot be properly created
*/
public FOTreeBuilder(String outputFormat, FOUserAgent foUserAgent,
OutputStream stream) throws FOPException {
public FOTreeBuilder(
String outputFormat,
FOUserAgent foUserAgent,
OutputStream stream)
throws FOPException {

this.userAgent = foUserAgent;
this.elementMappingRegistry = userAgent.getFactory().getElementMappingRegistry();
@@ -108,40 +106,25 @@ public class FOTreeBuilder extends DefaultHandler {
});
}

/**
* This method enables to reduce memory consumption of the FO tree slightly. When it returns
* true no Locator is passed to the FO tree nodes which would copy the information into
* a SAX LocatorImpl instance.
* @return true if no context information should be stored on each node in the FO tree.
* @deprecated Use FOUserAgent.isLocatorEnabled() instead.
*/
protected boolean isLocatorDisabled() {
return !userAgent.isLocatorEnabled();
}
/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public void setDocumentLocator(Locator locator) {
this.locator = locator;
}
/** @return a Locator instance if it is available and not disabled */
/**
* @return a {@link Locator} instance if it is available and not disabled
*/
protected Locator getEffectiveLocator() {
return (userAgent.isLocatorEnabled() ? this.locator : null);
}
/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public void characters(char[] data, int start, int length)
throws SAXException {
delegate.characters(data, start, length);
}

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public void startDocument() throws SAXException {
if (used) {
throw new IllegalStateException("FOTreeBuilder (and the Fop class) cannot be reused."
@@ -159,9 +142,7 @@ public class FOTreeBuilder extends DefaultHandler {
this.delegate = this.mainFOHandler;
}

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public void endDocument() throws SAXException {
this.delegate.endDocument();
if (this.rootFObj == null && empty) {
@@ -173,24 +154,16 @@ public class FOTreeBuilder extends DefaultHandler {
log.debug("Parsing of document complete");
}
foEventHandler.endDocument();
//Notify the image factory that this user agent has expired.
ImageFactory imageFactory = userAgent.getFactory().getImageFactory();
imageFactory.removeContext(this.userAgent);
}

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public void startElement(String namespaceURI, String localName, String rawName,
Attributes attlist) throws SAXException {
this.depth++;
delegate.startElement(namespaceURI, localName, rawName, attlist);
}

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public void endElement(String uri, String localName, String rawName)
throws SAXException {
this.delegate.endElement(uri, localName, rawName);
@@ -206,7 +179,8 @@ public class FOTreeBuilder extends DefaultHandler {
}

/**
* Finds the Maker used to create node objects of a particular type
* Finds the {@link Maker} used to create {@link FONode} objects of a particular type
*
* @param namespaceURI URI for the namespace of the element
* @param localName name of the Element
* @return the ElementMapping.Maker that can create an FO object for this element
@@ -218,7 +192,7 @@ public class FOTreeBuilder extends DefaultHandler {

/** {@inheritDoc} */
public void warning(SAXParseException e) {
log.warn(e.toString());
log.warn(e.getLocalizedMessage());
}

/** {@inheritDoc} */
@@ -233,7 +207,8 @@ public class FOTreeBuilder extends DefaultHandler {
}

/**
* Provides access to the underlying FOEventHandler object.
* Provides access to the underlying {@link FOEventHandler} object.
*
* @return the FOEventHandler object
*/
public FOEventHandler getEventHandler() {
@@ -244,6 +219,7 @@ public class FOTreeBuilder extends DefaultHandler {
* Returns the results of the rendering process. Information includes
* the total number of pages generated and the number of pages per
* page-sequence.
*
* @return the results of the rendering process.
*/
public FormattingResults getResults() {
@@ -257,23 +233,17 @@ public class FOTreeBuilder extends DefaultHandler {
}
/**
* Main DefaultHandler implementation which builds the FO tree.
* Main <code>DefaultHandler</code> implementation which builds the FO tree.
*/
private class MainFOHandler extends DefaultHandler {
/**
* Current formatting object being handled
*/
/** Current formatting object being handled */
protected FONode currentFObj = null;

/**
* Current propertyList for the node being handled.
*/
/** Current propertyList for the node being handled */
protected PropertyList currentPropertyList;
/**
* Current marker nesting-depth
*/
/** Current marker nesting-depth */
private int nestedMarkerDepth = 0;

/** {@inheritDoc} */
@@ -298,11 +268,7 @@ public class FOTreeBuilder extends DefaultHandler {
} else { // check that incoming node is valid for currentFObj
if (namespaceURI.equals(FOElementMapping.URI)
|| namespaceURI.equals(ExtensionElementMapping.URI)) {
try {
currentFObj.validateChildNode(locator, namespaceURI, localName);
} catch (ValidationException e) {
throw e;
}
currentFObj.validateChildNode(locator, namespaceURI, localName);
}
}
@@ -391,12 +357,11 @@ public class FOTreeBuilder extends DefaultHandler {
if (currentFObj.getParent() == null) {
log.debug("endElement for top-level " + currentFObj.getName());
}
currentFObj = currentFObj.getParent();
}

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public void characters(char[] data, int start, int length)
throws FOPException {
if (currentFObj != null) {
@@ -405,6 +370,7 @@ public class FOTreeBuilder extends DefaultHandler {
}
}

/** {@inheritDoc} */
public void endDocument() throws SAXException {
currentFObj = null;
}

+ 0
- 7
src/java/org/apache/fop/fo/flow/table/EmptyGridUnit.java View File

@@ -25,8 +25,6 @@ package org.apache.fop.fo.flow.table;
*/
public class EmptyGridUnit extends GridUnit {

private TableBody body;

/**
* @param table the containing table
* @param row the table-row element this grid unit belongs to (if any)
@@ -56,11 +54,6 @@ public class EmptyGridUnit extends GridUnit {
return false;
}

/** {@inheritDoc} */
public TableBody getBody() {
return this.body;
}

/** {@inheritDoc} */
public boolean isLastGridUnitColSpan() {
return true;

+ 0
- 9
src/java/org/apache/fop/fo/flow/table/GridUnit.java View File

@@ -19,7 +19,6 @@

package org.apache.fop.fo.flow.table;

import org.apache.fop.fo.FONode;
import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
import org.apache.fop.fo.properties.CommonBorderPaddingBackground.BorderInfo;
import org.apache.fop.layoutmgr.table.CollapsingBorderModel;
@@ -165,14 +164,6 @@ public class GridUnit {
this.row = row;
}

public TableBody getBody() {
FONode node = getCell();
while (node != null && !(node instanceof TableBody)) {
node = node.getParent();
}
return (TableBody) node;
}

/**
* Returns the before-start grid unit of the cell containing this grid unit.
*

+ 14
- 12
src/java/org/apache/fop/fo/flow/table/PrimaryGridUnit.java View File

@@ -23,6 +23,7 @@ import java.util.LinkedList;
import java.util.List;

import org.apache.fop.fo.Constants;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
import org.apache.fop.layoutmgr.ElementListUtils;
import org.apache.fop.layoutmgr.table.TableCellLayoutManager;
@@ -71,6 +72,19 @@ public class PrimaryGridUnit extends GridUnit {
.getValue() / 2; // TODO
}

/**
* Returns the fo:table-header/footer/body element containing this cell.
*
* @return the enclosing table part
*/
public TableBody getTableBody() {
FONode node = cell.getParent();
if (node instanceof TableRow) {
node = node.getParent();
}
return (TableBody) node;
}

public TableCellLayoutManager getCellLM() {
assert cellLM != null;
return cellLM;
@@ -224,18 +238,6 @@ public class PrimaryGridUnit extends GridUnit {
return contentLength;
}

/** @return true if cell/row has an explicit BPD/height */
public boolean hasBPD() {
if (!getCell().getBlockProgressionDimension().getOptimum(null).isAuto()) {
return true;
}
if (getRow() != null
&& !getRow().getBlockProgressionDimension().getOptimum(null).isAuto()) {
return true;
}
return false;
}

/**
* Returns the grid units belonging to the same span as this one.
*

+ 3
- 2
src/java/org/apache/fop/fo/properties/CommonHyphenation.java View File

@@ -21,6 +21,7 @@ package org.apache.fop.fo.properties;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.apache.fop.fo.Constants;
import org.apache.fop.fo.PropertyList;
import org.apache.fop.fo.expr.PropertyException;
@@ -142,7 +143,7 @@ public final class CommonHyphenation {
FontMetrics metrics = font.getFontMetrics();
if (metrics instanceof Typeface) {
Typeface typeface = (Typeface)metrics;
if ("SymbolEncoding".equals(typeface.getEncoding())) {
if ("SymbolEncoding".equals(typeface.getEncodingName())) {
//SymbolEncoding doesn't have HYPHEN_MINUS, so replace by MINUS_SIGN
} else {
//only warn if the encoding is not SymbolEncoding
@@ -154,7 +155,7 @@ public final class CommonHyphenation {
FontMetrics metrics = font.getFontMetrics();
if (metrics instanceof Typeface) {
Typeface typeface = (Typeface)metrics;
if ("ZapfDingbatsEncoding".equals(typeface.getEncoding())) {
if ("ZapfDingbatsEncoding".equals(typeface.getEncodingName())) {
//ZapfDingbatsEncoding doesn't have HYPHEN_MINUS, so replace by ' '
} else {
//only warn if the encoding is not ZapfDingbatsEncoding

+ 1
- 1
src/java/org/apache/fop/fo/properties/XMLLangShorthandParser.java View File

@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*
/* $Id:$ */
/* $Id$ */

package org.apache.fop.fo.properties;


+ 6
- 17
src/java/org/apache/fop/fonts/AbstractCodePointMapping.java View File

@@ -29,7 +29,7 @@ import org.apache.fop.util.CharUtilities;
/**
* Abstract base class for code point mapping classes (1-byte character encodings).
*/
public class AbstractCodePointMapping {
public class AbstractCodePointMapping implements SingleByteEncoding {

private String name;
private char[] latin1Map;
@@ -114,19 +114,12 @@ public class AbstractCodePointMapping {
}
}

/**
* Returns the encoding's name.
* @return the name of the encoding
*/
/** {@inheritDoc} */
public String getName() {
return this.name;
}

/**
* Maps a Unicode character to a code point in the encoding.
* @param c the Unicode character to map
* @return the coid point in the encoding or 0 (=.notdef) if not found
*/
/** {@inheritDoc} */
public final char mapChar(char c) {
if (c < 256) {
char latin1 = latin1Map[c];
@@ -172,8 +165,8 @@ public class AbstractCodePointMapping {
}
}
putFallbackCharacter(c, '\0');
return 0;
putFallbackCharacter(c, NOT_FOUND_CODE_POINT);
return NOT_FOUND_CODE_POINT;
}

private void putFallbackCharacter(char c, char mapTo) {
@@ -227,11 +220,7 @@ public class AbstractCodePointMapping {
return -1;
}
/**
* Returns the array of character names for this encoding.
* @return the array of character names
* (unmapped code points are represented by a ".notdef" value)
*/
/** {@inheritDoc} */
public String[] getCharNameMap() {
if (this.charNameMap != null) {
String[] copy = new String[this.charNameMap.length];

src/java-1.3/org/apache/fop/svg/GraphicsConfiguration.java → src/java/org/apache/fop/fonts/Base14Font.java View File

@@ -17,15 +17,11 @@

/* $Id$ */
package org.apache.fop.fonts;

package org.apache.fop.svg;
/**
* Adapter to allow subclassing java.awt.GraphicsConfiguration without
* compilation errors.
* The version for JDK 1.3 is just empty.
*
* Base class for all Base 14 fonts.
*/
abstract public class GraphicsConfiguration extends java.awt.GraphicsConfiguration {

public abstract class Base14Font extends Typeface {

}

+ 8
- 25
src/java/org/apache/fop/fonts/CIDFont.java View File

@@ -20,31 +20,14 @@
package org.apache.fop.fonts;

//Java
import java.util.Map;

/**
* Abstract base class for CID fonts.
*/
public abstract class CIDFont extends CustomFont {

/**
* usedGlyphs contains orginal, new glyph index
*/
public Map usedGlyphs = new java.util.HashMap();

/**
* usedGlyphsIndex contains new glyph, original index
*/
public Map usedGlyphsIndex = new java.util.HashMap();
public int usedGlyphsCount = 0;

/**
* usedCharsIndex contains new glyph, original char
*/
public Map usedCharsIndex = new java.util.HashMap();

//private PDFWArray warray = new PDFWArray();
public int width[] = null;
/** Contains the character widths for all characters in the font */
protected int[] width = null;

// ---- Required ----
/**
@@ -73,6 +56,11 @@ public abstract class CIDFont extends CustomFont {
*/
public abstract int getSupplement();

/**
* Returns the subset information for this font.
* @return the subset information
*/
public abstract CIDSubset getCIDSubset();

// ---- Optional ----
/**
@@ -88,9 +76,4 @@ public abstract class CIDFont extends CustomFont {
return true;
}

/**
* Returns a char array containing all Unicode characters that have been accessed.
* @return a char array with all used Unicode characters
*/
public abstract char[] getCharsUsed();
}
}

+ 177
- 0
src/java/org/apache/fop/fonts/CIDSubset.java View File

@@ -0,0 +1,177 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/* $Id$ */

package org.apache.fop.fonts;

import java.util.BitSet;
import java.util.Collections;
import java.util.Iterator;
import java.util.Map;

import org.apache.fop.util.CharUtilities;

//Naming:
//glyph index: original index of the glyph in the non-subset font (!= unicode index)
//character selector: index into a set of glyphs. For subset CID fonts, this starts at 0. For
// non-subset fonts, this is the same as the glyph index.
//Unicode index: The Unicode codepoint of a character.
//Glyph name: the Adobe glyph name (as found in Glyphs.java)

/**
* Keeps track of the glyphs used in a document. This information is later used to build
* a subset of a font.
*/
public class CIDSubset {

/**
* usedGlyphs contains orginal, new glyph index (glyph index -> char selector)
*/
private Map/*<Integer, Integer>*/ usedGlyphs = new java.util.HashMap();

/**
* usedGlyphsIndex contains new glyph, original index (char selector -> glyph index)
*/
private Map/*<Integer, Integer>*/ usedGlyphsIndex = new java.util.HashMap();
private int usedGlyphsCount = 0;

/**
* usedCharsIndex contains new glyph, original char (char selector -> Unicode)
*/
private Map/*<Integer, Character>*/ usedCharsIndex = new java.util.HashMap();
public CIDSubset() {
}
/**
* Adds the initial 3 glyphs which are the same for all CID subsets.
*/
public void setupFirstThreeGlyphs() {
// Make sure that the 3 first glyphs are included
usedGlyphs.put(new Integer(0), new Integer(0));
usedGlyphsIndex.put(new Integer(0), new Integer(0));
usedGlyphsCount++;
usedGlyphs.put(new Integer(1), new Integer(1));
usedGlyphsIndex.put(new Integer(1), new Integer(1));
usedGlyphsCount++;
usedGlyphs.put(new Integer(2), new Integer(2));
usedGlyphsIndex.put(new Integer(2), new Integer(2));
usedGlyphsCount++;
}
/**
* Returns the original index of the glyph inside the (non-subset) font's glyph list. This
* index can be used to access the character width information, for example.
* @param subsetIndex the subset index (character selector) to access the glyph
* @return the original index (or -1 if no glyph index is available for the subset index)
*/
public int getGlyphIndexForSubsetIndex(int subsetIndex) {
Integer glyphIndex = (Integer)usedGlyphsIndex.get(new Integer(subsetIndex));
if (glyphIndex != null) {
return glyphIndex.intValue();
} else {
return -1;
}
}
/**
* Returns the Unicode value for a subset index (character selector). If there's no such
* Unicode value, the "NOT A CHARACTER" (0xFFFF) is returned.
* @param subsetIndex the subset index (character selector)
* @return the Unicode value or "NOT A CHARACTER" (0xFFFF)
*/
public char getUnicodeForSubsetIndex(int subsetIndex) {
Character mapValue = (Character)usedCharsIndex.get(new Integer(subsetIndex));
if (mapValue != null) {
return mapValue.charValue();
} else {
return CharUtilities.NOT_A_CHARACTER;
}
}
/**
* Maps a character to a character selector for a font subset. If the character isn't in the
* subset, yet, it is added and a new character selector returned. Otherwise, the already
* allocated character selector is returned from the existing map/subset.
* @param glyphIndex the glyph index of the character
* @param unicode the Unicode index of the character
* @return the subset index
*/
public int mapSubsetChar(int glyphIndex, char unicode) {
// Reencode to a new subset font or get the reencoded value
// IOW, accumulate the accessed characters and build a character map for them
Integer subsetCharSelector = (Integer)usedGlyphs.get(new Integer(glyphIndex));
if (subsetCharSelector == null) {
int selector = usedGlyphsCount;
usedGlyphs.put(new Integer(glyphIndex),
new Integer(selector));
usedGlyphsIndex.put(new Integer(selector),
new Integer(glyphIndex));
usedCharsIndex.put(new Integer(selector),
new Character(unicode));
usedGlyphsCount++;
return selector;
} else {
return subsetCharSelector.intValue();
}
}

/**
* Returns an unmodifiable Map of the font subset. It maps from glyph index to
* character selector (i.e. the subset index in this case).
* @return Map Map&lt;Integer, Integer&gt; of the font subset
*/
public Map/*<Integer, Integer>*/ getSubsetGlyphs() {
return Collections.unmodifiableMap(this.usedGlyphs);
}
/**
* Returns a char array containing all Unicode characters that are in the subset.
* @return a char array with all used Unicode characters
*/
public char[] getSubsetChars() {
char[] charArray = new char[usedGlyphsCount];
for (int i = 0; i < usedGlyphsCount; i++) {
charArray[i] = getUnicodeForSubsetIndex(i);
}
return charArray;
}

/**
* Returns the number of glyphs in the subset.
* @return the number of glyphs in the subset
*/
public int getSubsetSize() {
return this.usedGlyphsCount;
}
/**
* Returns a BitSet with bits set for each available glyph index.
* @return a BitSet indicating available glyph indices
*/
public BitSet getGlyphIndexBitSet() {
BitSet bitset = new BitSet();
Iterator iter = usedGlyphs.keySet().iterator();
while (iter.hasNext()) {
Integer cid = (Integer)iter.next();
bitset.set(cid.intValue());
}
return bitset;
}
}

+ 1
- 1
src/java/org/apache/fop/fonts/Font.java View File

@@ -199,7 +199,7 @@ public class Font {

// Use default CodePointMapping
char d = CodePointMapping.getMapping("WinAnsiEncoding").mapChar(c);
if (d != 0) {
if (d != SingleByteEncoding.NOT_FOUND_CODE_POINT) {
c = d;
} else {
log.warn("Glyph " + (int) c + " not available in font " + fontName);

+ 11
- 13
src/java/org/apache/fop/fonts/LazyFont.java View File

@@ -64,11 +64,10 @@ public class LazyFont extends Typeface implements FontDescriptor {
this.resolver = resolver;
}

/**
* String representation of LazyFont
*/
/** {@inheritDoc} */
public String toString() {
return ( "metrics-url=" + metricsFileName + ", embed-url=" + fontEmbedPath + ", kerning=" + useKerning );
return ( "metrics-url=" + metricsFileName + ", embed-url=" + fontEmbedPath
+ ", kerning=" + useKerning );
}
private void load(boolean fail) {
@@ -80,8 +79,9 @@ public class LazyFont extends Typeface implements FontDescriptor {
if (resolver != null) {
Source source = resolver.resolve(metricsFileName);
if (source == null) {
String err = "Cannot load font: failed to create Source from metrics file "
+ metricsFileName;
String err
= "Cannot load font: failed to create Source from metrics file "
+ metricsFileName;
if (fail) {
throw new RuntimeException(err);
} else {
@@ -112,8 +112,8 @@ public class LazyFont extends Typeface implements FontDescriptor {
src.setSystemId(source.getSystemId());
reader = new FontReader(src);
} else {
reader
= new FontReader(new InputSource(new URL(metricsFileName).openStream()));
reader = new FontReader(new InputSource(
new URL(metricsFileName).openStream()));
}
reader.setKerningEnabled(useKerning);
reader.setFontEmbedPath(fontEmbedPath);
@@ -153,12 +153,10 @@ public class LazyFont extends Typeface implements FontDescriptor {
}

// ---- Font ----
/**
* {@inheritDoc}
*/
public String getEncoding() {
/** {@inheritDoc} */
public String getEncodingName() {
load(true);
return realFont.getEncoding();
return realFont.getEncodingName();
}

/**

+ 38
- 118
src/java/org/apache/fop/fonts/MultiByteFont.java View File

@@ -39,6 +39,9 @@ public class MultiByteFont extends CIDFont {

private String namePrefix = null; // Quasi unique prefix

private CIDSubset subset = new CIDSubset();
/** A map from Unicode indices to glyph indices */
private BFEntry[] bfentries = null;

/**
@@ -46,15 +49,7 @@ public class MultiByteFont extends CIDFont {
*/
public MultiByteFont() {
// Make sure that the 3 first glyphs are included
usedGlyphs.put(new Integer(0), new Integer(0));
usedGlyphsIndex.put(new Integer(0), new Integer(0));
usedGlyphsCount++;
usedGlyphs.put(new Integer(1), new Integer(1));
usedGlyphsIndex.put(new Integer(1), new Integer(1));
usedGlyphsCount++;
usedGlyphs.put(new Integer(2), new Integer(2));
usedGlyphsIndex.put(new Integer(2), new Integer(2));
usedGlyphsCount++;
subset.setupFirstThreeGlyphs();
// Create a quasiunique prefix for fontname
synchronized (this.getClass()) {
@@ -77,37 +72,27 @@ public class MultiByteFont extends CIDFont {
setFontType(FontType.TYPE0);
}

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public int getDefaultWidth() {
return defaultWidth;
}

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public String getRegistry() {
return "Adobe";
}

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public String getOrdering() {
return "UCS";
}

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public int getSupplement() {
return 0;
}

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public CIDFontType getCIDType() {
return cidType;
}
@@ -133,68 +118,47 @@ public class MultiByteFont extends CIDFont {
}
}

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public boolean isEmbeddable() {
return !(getEmbedFileName() == null && getEmbedResourceName() == null);
}

/**
* {@inheritDoc}
*/
public String getEncoding() {
/** {@inheritDoc} */
public CIDSubset getCIDSubset() {
return this.subset;
}
/** {@inheritDoc} */
public String getEncodingName() {
return encoding;
}

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public int getWidth(int i, int size) {
if (isEmbeddable()) {
Integer idx = (Integer)usedGlyphsIndex.get(new Integer(i));
return size * width[idx.intValue()];
int glyphIndex = subset.getGlyphIndexForSubsetIndex(i);
return size * width[glyphIndex];
} else {
return size * width[i];
}
}

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public int[] getWidths() {
int[] arr = new int[width.length];
System.arraycopy(width, 0, arr, 0, width.length - 1);
/*
for (int i = 0; i < arr.length; i++)
arr[i] *= size;
*/
return arr;
}

/**
* Remaps a codepoint based.
* @param i codepoint to remap
* @return new codepoint
* Returns the glyph index for a Unicode character. The method returns 0 if there's no
* such glyph in the character map.
* @param c the Unicode character index
* @return the glyph index (or 0 if the glyph is not available)
*/
/* unused
public Integer reMap(Integer i) {
if (isEmbeddable()) {
Integer ret = (Integer)usedGlyphsIndex.get(i);
if (ret == null) {
ret = i;
}
return ret;
} else {
return i;
}

}
*/

private int findGlyphIndex(char c) {
int idx = (int)c;
int retIdx = 0;
int retIdx = 0; //.notdef

for (int i = 0; (i < bfentries.length) && retIdx == 0; i++) {
if (bfentries[i].getUnicodeStart() <= idx
@@ -208,48 +172,30 @@ public class MultiByteFont extends CIDFont {
return retIdx;
}

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public char mapChar(char c) {
notifyMapOperation();
int retIdx = findGlyphIndex(c);
int glyphIndex = findGlyphIndex(c);

if (isEmbeddable()) {
// Reencode to a new subset font or get
// the reencoded value
Integer newIdx = (Integer)usedGlyphs.get(new Integer(retIdx));
if (newIdx == null) {
usedGlyphs.put(new Integer(retIdx),
new Integer(usedGlyphsCount));
usedGlyphsIndex.put(new Integer(usedGlyphsCount),
new Integer(retIdx));
usedCharsIndex.put(new Integer(usedGlyphsCount),
new Integer((int) c));
retIdx = usedGlyphsCount;
usedGlyphsCount++;
} else {
retIdx = newIdx.intValue();
}
glyphIndex = subset.mapSubsetChar(glyphIndex, c);
}

return (char)retIdx;
return (char)glyphIndex;
}

/**
* {@inheritDoc}
*/
/** {@inheritDoc} */
public boolean hasChar(char c) {
return (findGlyphIndex(c) > 0);
}


/**
* Sets the bfentries.
* @param bfentries The bfentries to set
* Sets the array of BFEntry instances which constitutes the Unicode to glyph index map for
* a font. ("BF" means "base font")
* @param entries the Unicode to glyph index map
*/
public void setBFEntries(BFEntry[] bfentries) {
this.bfentries = bfentries;
public void setBFEntries(BFEntry[] entries) {
this.bfentries = entries;
}

/**
@@ -276,17 +222,6 @@ public class MultiByteFont extends CIDFont {
this.ttcName = ttcName;
}

/**
* Adds a new CID width entry to the font.
* @param cidWidthIndex index
* @param wds array of widths
*/
/*
public void addCIDWidthEntry(int cidWidthIndex, int[] wds) {
this.warray.addEntry(cidWidthIndex, wds);
}*/


/**
* Sets the width array.
* @param wds array of widths.
@@ -300,30 +235,15 @@ public class MultiByteFont extends CIDFont {
* @return Map Map of used Glyphs
*/
public Map getUsedGlyphs() {
return usedGlyphs;
return subset.getSubsetGlyphs();
}

/** The invalid Unicode character, suitable as a return value in methods
* that need to return an invalid character. */
public static final char INVALID_UNICODE_CHAR = 0xFFFF;

/** {@inheritDoc} */
public char[] getCharsUsed() {
if (!isEmbeddable()) {
return null;
}
char[] charArray = new char[usedGlyphsCount];
for (int i = 0; i < usedGlyphsCount; i++) {
Integer mapValue = (Integer)usedCharsIndex.get(new Integer(i));
if (mapValue != null) {
char arrayItem = (char) mapValue.intValue();
charArray[i] = arrayItem;
}
else {
charArray[i] = INVALID_UNICODE_CHAR;
}
}
return charArray;
return subset.getSubsetChars();
}
}


+ 142
- 0
src/java/org/apache/fop/fonts/NamedCharacter.java View File

@@ -0,0 +1,142 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/* $Id$ */

package org.apache.fop.fonts;

import org.apache.xmlgraphics.fonts.Glyphs;

import org.apache.fop.util.CharUtilities;

/**
* Represents an named character with character name (from the Adobe glyph list) and a Unicode
* sequence that this character represents.
*/
public class NamedCharacter {
private String charName;
private String unicodeSequence;
/**
* Main constructor.
* @param charName the character name
* @param unicodeSequence the Unicode sequence associated with this character
*/
public NamedCharacter(String charName, String unicodeSequence) {
if (charName == null) {
throw new NullPointerException("charName must not be null");
}
this.charName = charName;
if (unicodeSequence != null) {
this.unicodeSequence = unicodeSequence;
} else {
this.unicodeSequence = Glyphs.getUnicodeSequenceForGlyphName(charName);
}
}
/**
* Simple constructor.
* @param charName the character name
*/
public NamedCharacter(String charName) {
this(charName, null);
}
/** {@inheritDoc} */
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((charName == null) ? 0 : charName.hashCode());
return result;
}

/** {@inheritDoc} */
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final NamedCharacter other = (NamedCharacter)obj;
return charName.equals(other.charName);
}

/**
* Returns the character name (as defined by the Adobe glyph list).
* @return the character name
*/
public String getName() {
return this.charName;
}
/**
* Returns the Unicode sequence associated with this character.
* @return the Unicode sequence (or null if no Unicode sequence is associated)
*/
public String getUnicodeSequence() {
return this.unicodeSequence;
}
/**
* Indicates whether a single Unicode value is associated with this character.
* @return true if exactly one Unicode value is associated with this character, false otherwise
*/
public boolean hasSingleUnicodeValue() {
return (this.unicodeSequence != null && this.unicodeSequence.length() == 1);
}
/**
* Returns the single Unicode value associated with this named character. Check
* {@link #hasSingleUnicodeValue()} before you call this method because an
* IllegalStateException is thrown is a Unicode sequence with more than one character is
* associated with this character.
* @return the single Unicode value (or FFFF ("NOT A CHARACTER") if no Unicode value is
* available)
* @throws IllegalStateException if a Unicode sequence with more than one value is associated
* with the named character
*/
public char getSingleUnicodeValue() throws IllegalStateException {
if (this.unicodeSequence == null) {
return CharUtilities.NOT_A_CHARACTER;
}
if (this.unicodeSequence.length() > 1) {
throw new IllegalStateException("getSingleUnicodeValue() may not be called for a"
+ " named character that has more than one Unicode value (a sequence)"
+ " associated with the named character!");
}
return this.unicodeSequence.charAt(0);
}
/** {@inheritDoc} */
public String toString() {
StringBuffer sb = new StringBuffer(this.unicodeSequence);
sb.append(" (");
if (this.unicodeSequence != null) {
for (int i = 0, c = this.unicodeSequence.length(); i < c; i++) {
sb.append("0x").append(Integer.toHexString(this.unicodeSequence.charAt(0)));
}
sb.append(", ");
}
sb.append(getName()).append(')');
return sb.toString();
}
}

+ 145
- 0
src/java/org/apache/fop/fonts/SimpleSingleByteEncoding.java View File

@@ -0,0 +1,145 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/* $Id$ */

package org.apache.fop.fonts;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

import org.apache.xmlgraphics.fonts.Glyphs;

/**
* A simple implementation of the OneByteEncoding mostly used for encodings that are constructed
* on-the-fly.
*/
public class SimpleSingleByteEncoding implements SingleByteEncoding {

private String name;
private List mapping = new java.util.ArrayList();
//List<NamedCharacter>
private Map charMap = new java.util.HashMap();
//Map<Character(Unicode), Character(code point)>
/**
* Main constructor.
* @param name the encoding's name
*/
public SimpleSingleByteEncoding(String name) {
this.name = name;
}
/** {@inheritDoc} */
public String getName() {
return this.name;
}

/** {@inheritDoc} */
public char mapChar(char c) {
Character nc = (Character)charMap.get(new Character(c));
if (nc != null) {
return nc.charValue();
}
return NOT_FOUND_CODE_POINT;
}

/** {@inheritDoc} */
public String[] getCharNameMap() {
String[] map = new String[getSize()];
Arrays.fill(map, Glyphs.NOTDEF);
for (int i = getFirstChar(); i <= getLastChar(); i++) {
NamedCharacter ch = (NamedCharacter)this.mapping.get(i - 1);
map[i] = ch.getName();
}
return map;
}
/**
* Returns the index of the first defined character.
* @return the index of the first defined character (always 1 for this class)
*/
public int getFirstChar() {
return 1;
}
/**
* Returns the index of the last defined character.
* @return the index of the last defined character
*/
public int getLastChar() {
return this.mapping.size();
}
/**
* Returns the number of characters defined by this encoding.
* @return the number of characters
*/
public int getSize() {
return this.mapping.size() + 1;
}
/**
* Indicates whether the encoding is full (with 256 code points).
* @return true if the encoding is full
*/
public boolean isFull() {
return (getSize() == 256);
}
/**
* Adds a new character to the encoding.
* @param ch the named character
* @return the code point assigned to the character
*/
public char addCharacter(NamedCharacter ch) {
if (!ch.hasSingleUnicodeValue()) {
throw new IllegalArgumentException("Only NamedCharacters with a single Unicode value"
+ " are currently supported!");
}
if (isFull()) {
throw new IllegalStateException("Encoding is full!");
}
char newSlot = (char)(getLastChar() + 1);
this.mapping.add(ch);
this.charMap.put(new Character(ch.getSingleUnicodeValue()), new Character(newSlot));
return newSlot;
}

/**
* Returns the named character at a given code point in the encoding.
* @param codePoint the code point of the character
* @return the NamedCharacter (or null if no character is at this position)
*/
public NamedCharacter getCharacterForIndex(int codePoint) {
if (codePoint < 0 || codePoint > 255) {
throw new IllegalArgumentException("codePoint must be between 0 and 255");
}
if (codePoint <= getLastChar()) {
return (NamedCharacter)this.mapping.get(codePoint - 1);
} else {
return null;
}
}
/** {@inheritDoc} */
public String toString() {
return getName() + " (" + getSize() + " chars)";
}
}

src/java/org/apache/fop/image/RegisterableImageProvider.java → src/java/org/apache/fop/fonts/SingleByteEncoding.java View File

@@ -16,34 +16,35 @@
*/

/* $Id$ */
package org.apache.fop.image;
package org.apache.fop.fonts;

/**
* This interface is used to dynamically register FopImage implementations.
* <p>
* NOTE: Please don't rely on this interface too much. It is a temporary measure
* until the whole image package can be redesigned. The redesign will likely
* provide a different mechanism to dynamically register new implementations.
* The interface defines a 1-byte character encoding (with 256 characters).
*/
public interface RegisterableImageProvider {
public interface SingleByteEncoding {

/** Code point that is used if no code point for a specific character has been found. */
char NOT_FOUND_CODE_POINT = '\0';

/**
* Returns the MIME type the implementation supports.
* @return the MIME type
*/
String getSupportedMimeType();
/**
* Returns the name of the implementation.
* @return the name
* Returns the encoding's name.
* @return the name of the encoding
*/
String getName();

/**
* Returns the fully qualified class name for the implementing class.
* @return the class name
* Maps a Unicode character to a code point in the encoding.
* @param c the Unicode character to map
* @return the code point in the encoding or 0 (=.notdef) if not found
*/
String getClassName();
char mapChar(char c);

/**
* Returns the array of character names for this encoding.
* @return the array of character names
* (unmapped code points are represented by a ".notdef" value)
*/
String[] getCharNameMap();
}

+ 188
- 26
src/java/org/apache/fop/fonts/SingleByteFont.java View File

@@ -19,6 +19,8 @@

package org.apache.fop.fonts;

import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.commons.logging.Log;
@@ -31,14 +33,21 @@ import org.apache.xmlgraphics.fonts.Glyphs;
*/
public class SingleByteFont extends CustomFont {

/** Code point that is used if no code point for a specific character has been found. */
public static final char NOT_FOUND = '#';

/** logger */
private static Log log = LogFactory.getLog(SingleByteFont.class);

private CodePointMapping mapping;
private SingleByteEncoding mapping;

private int[] width = null;

private Set warnedChars;

private Map unencodedCharacters;
//Map<Character, UnencodedCharacter>
private List additionalEncodings;
/**
* Main constructor.
@@ -54,7 +63,7 @@ public class SingleByteFont extends CustomFont {
}

/** {@inheritDoc} */
public String getEncoding() {
public String getEncodingName() {
return this.mapping.getName();
}

@@ -62,18 +71,28 @@ public class SingleByteFont extends CustomFont {
* Returns the code point mapping (encoding) of this font.
* @return the code point mapping
*/
public CodePointMapping getCodePointMapping() {
public SingleByteEncoding getEncoding() {
return this.mapping;
}
/** {@inheritDoc} */
public int getWidth(int i, int size) {
int idx = i - getFirstChar();
if (idx >= 0 && idx < width.length) {
return size * width[i - getFirstChar()];
} else {
return 0;
if (i < 256) {
int idx = i - getFirstChar();
if (idx >= 0 && idx < width.length) {
return size * width[i - getFirstChar()];
}
} else if (this.additionalEncodings != null) {
int encodingIndex = (i / 256) - 1;
SimpleSingleByteEncoding encoding = getAdditionalEncoding(encodingIndex);
int codePoint = i % 256;
NamedCharacter nc = encoding.getCharacterForIndex(codePoint);
UnencodedCharacter uc
= (UnencodedCharacter)this.unencodedCharacters.get(
new Character(nc.getSingleUnicodeValue()));
return size * uc.getWidth();
}
return 0;
}

/** {@inheritDoc} */
@@ -87,30 +106,80 @@ public class SingleByteFont extends CustomFont {
public char mapChar(char c) {
notifyMapOperation();
char d = mapping.mapChar(c);
if (d != 0) {
if (d != SingleByteEncoding.NOT_FOUND_CODE_POINT) {
return d;
} else {
Character ch = new Character(c);
if (warnedChars == null) {
warnedChars = new java.util.HashSet();
}
//Check unencoded characters which are available in the font by character name
d = mapUnencodedChar(c);
if (d != SingleByteEncoding.NOT_FOUND_CODE_POINT) {
return d;
}
//Give up, character is not available
Character ch = new Character(c);
if (warnedChars == null) {
warnedChars = new java.util.HashSet();
}
if (warnedChars.size() < 8 && !warnedChars.contains(ch)) {
warnedChars.add(ch);
if (warnedChars.size() == 8) {
log.warn("Many requested glyphs are not available in font " + getFontName());
} else {
log.warn("Glyph " + (int)c + " (0x" + Integer.toHexString(c)
+ ", " + Glyphs.charToGlyphName(c)
+ ") not available in font " + getFontName());
}
if (warnedChars.size() < 8 && !warnedChars.contains(ch)) {
warnedChars.add(ch);
if (warnedChars.size() == 8) {
log.warn("Many requested glyphs are not available in font " + getFontName());
} else {
log.warn("Glyph " + (int)c + " (0x" + Integer.toHexString(c)
+ ", " + Glyphs.charToGlyphName(c)
+ ") not available in font " + getFontName());
}
return NOT_FOUND;
}

private char mapUnencodedChar(char ch) {
if (this.unencodedCharacters != null) {
UnencodedCharacter unencoded
= (UnencodedCharacter)this.unencodedCharacters.get(new Character(ch));
if (unencoded != null) {
if (this.additionalEncodings == null) {
this.additionalEncodings = new java.util.ArrayList();
}
SimpleSingleByteEncoding encoding = null;
char mappedStart = 0;
int additionalsCount = this.additionalEncodings.size();
for (int i = 0; i < additionalsCount; i++) {
mappedStart += 256;
encoding = getAdditionalEncoding(i);
char alt = encoding.mapChar(ch);
if (alt != 0) {
return (char)(mappedStart + alt);
}
}
if (encoding != null && encoding.isFull()) {
encoding = null;
}
if (encoding == null) {
encoding = new SimpleSingleByteEncoding(
getFontName() + "EncodingSupp" + (additionalsCount + 1));
this.additionalEncodings.add(encoding);
mappedStart += 256;
}
return (char)(mappedStart + encoding.addCharacter(unencoded.getCharacter()));
}
return '#';
}
return 0;
}

/** {@inheritDoc} */
public boolean hasChar(char c) {
return (mapping.mapChar(c) > 0);
char d = mapping.mapChar(c);
if (d != SingleByteEncoding.NOT_FOUND_CODE_POINT) {
return true;
}
//Check unencoded characters which are available in the font by character name
d = mapUnencodedChar(c);
if (d != SingleByteEncoding.NOT_FOUND_CODE_POINT) {
return true;
}
return false;
}

/* ---- single byte font specific setters --- */
@@ -146,13 +215,106 @@ public class SingleByteFont extends CustomFont {
/**
* Sets a width for a character.
* @param index index of the character
* @param width the width of the character
* @param w the width of the character
*/
public void setWidth(int index, int width) {
public void setWidth(int index, int w) {
if (this.width == null) {
this.width = new int[getLastChar() - getFirstChar() + 1];
}
this.width[index - getFirstChar()] = width;
this.width[index - getFirstChar()] = w;
}

/**
* Adds an unencoded character (one that is not supported by the primary encoding).
* @param ch the named character
* @param width the width of the character
*/
public void addUnencodedCharacter(NamedCharacter ch, int width) {
if (this.unencodedCharacters == null) {
this.unencodedCharacters = new java.util.HashMap();
}
if (ch.hasSingleUnicodeValue()) {
UnencodedCharacter uc = new UnencodedCharacter(ch, width);
this.unencodedCharacters.put(new Character(ch.getSingleUnicodeValue()), uc);
} else {
//Cannot deal with unicode sequences, so ignore this character
}
}

/**
* Indicates whether the encoding has additional encodings besides the primary encoding.
* @return true if there are additional encodings.
*/
public boolean hasAdditionalEncodings() {
return (this.additionalEncodings != null) && (this.additionalEncodings.size() > 0);
}
/**
* Returns the number of additional encodings this single-byte font maintains.
* @return the number of additional encodings
*/
public int getAdditionalEncodingCount() {
if (hasAdditionalEncodings()) {
return this.additionalEncodings.size();
} else {
return 0;
}
}
/**
* Returns an additional encoding.
* @param index the index of the additional encoding
* @return the additional encoding
* @throws IndexOutOfBoundsException if the index is out of bounds
*/
public SimpleSingleByteEncoding getAdditionalEncoding(int index)
throws IndexOutOfBoundsException {
if (hasAdditionalEncodings()) {
return (SimpleSingleByteEncoding)this.additionalEncodings.get(index);
} else {
throw new IndexOutOfBoundsException("No additional encodings available");
}
}
/**
* Returns an array with the widths for an additional encoding.
* @param index the index of the additional encoding
* @return the width array
*/
public int[] getAdditionalWidths(int index) {
SimpleSingleByteEncoding enc = getAdditionalEncoding(index);
int[] arr = new int[enc.getLastChar() - enc.getFirstChar() + 1];
for (int i = 0, c = arr.length; i < c; i++) {
NamedCharacter nc = enc.getCharacterForIndex(enc.getFirstChar() + i);
UnencodedCharacter uc = (UnencodedCharacter)this.unencodedCharacters.get(
new Character(nc.getSingleUnicodeValue()));
arr[i] = uc.getWidth();
}
return arr;
}
private static final class UnencodedCharacter {
private NamedCharacter character;
private int width;
public UnencodedCharacter(NamedCharacter character, int width) {
this.character = character;
this.width = width;
}
public NamedCharacter getCharacter() {
return this.character;
}
public int getWidth() {
return this.width;
}
/** {@inheritDoc} */
public String toString() {
return getCharacter().toString();
}
}

}

+ 2
- 5
src/java/org/apache/fop/fonts/Typeface.java View File

@@ -19,11 +19,8 @@
package org.apache.fop.fonts;

// FOP


/**
* Base class for PDF font classes
* Base class for font classes
*/
public abstract class Typeface implements FontMetrics {

@@ -37,7 +34,7 @@ public abstract class Typeface implements FontMetrics {
* Get the encoding of the font.
* @return the encoding
*/
public abstract String getEncoding();
public abstract String getEncodingName();

/**
* Map a Unicode character to a code point in the font.

+ 11
- 8
src/java/org/apache/fop/fonts/truetype/TTFSubSetFile.java View File

@@ -592,8 +592,8 @@ public class TTFSubSetFile extends TTFFile {
+ mtxTab[origIndex.intValue()].getOffset()) < 0) {
// origIndex is a composite glyph
allComposites.put(origIndex, glyphs.get(origIndex));
List composites =
getIncludedGlyphs(in, (int)entry.getOffset(),
List composites
= getIncludedGlyphs(in, (int)entry.getOffset(),
origIndex);

// Iterate through all composites pointed to
@@ -651,6 +651,9 @@ public class TTFSubSetFile extends TTFFile {
if (!checkTTC(in, name)) {
throw new IOException("Failed to read font");
}
//Copy the Map as we're going to modify it
Map subsetGlyphs = new java.util.HashMap(glyphs);

output = new byte[in.getFileSize()];

@@ -661,14 +664,14 @@ public class TTFSubSetFile extends TTFFile {
readHorizontalMetrics(in);
readIndexToLocation(in);

scanGlyphs(in, glyphs);
scanGlyphs(in, subsetGlyphs);

createDirectory(); // Create the TrueType header and directory

createHead(in);
createHhea(in, glyphs.size()); // Create the hhea table
createHmtx(in, glyphs); // Create hmtx table
createMaxp(in, glyphs.size()); // copy the maxp table
createHhea(in, subsetGlyphs.size()); // Create the hhea table
createHmtx(in, subsetGlyphs); // Create hmtx table
createMaxp(in, subsetGlyphs.size()); // copy the maxp table

boolean optionalTableFound;
optionalTableFound = createCvt(in); // copy the cvt table
@@ -689,8 +692,8 @@ public class TTFSubSetFile extends TTFFile {
log.debug("TrueType: prep table not present. Skipped.");
}

createLoca(glyphs.size()); // create empty loca table
createGlyf(in, glyphs); //create glyf table and update loca table
createLoca(subsetGlyphs.size()); // create empty loca table
createGlyf(in, subsetGlyphs); //create glyf table and update loca table

pad4();
createCheckSumAdjustment();

+ 28
- 18
src/java/org/apache/fop/fonts/type1/AFMCharMetrics.java View File

@@ -21,6 +21,8 @@ package org.apache.fop.fonts.type1;

import java.awt.geom.RectangularShape;

import org.apache.fop.fonts.NamedCharacter;


/**
* Holds the metrics of a single character from an AFM file.
@@ -28,8 +30,7 @@ import java.awt.geom.RectangularShape;
public class AFMCharMetrics {

private int charCode = -1;
private String unicodeSequence;
private String charName;
private NamedCharacter character;
private double widthX;
private double widthY;
private RectangularShape bBox;
@@ -59,36 +60,45 @@ public class AFMCharMetrics {
}
/**
* Returns the Unicode sequence for this character.
* @return the Unicode characters
* (or null if no such Unicode sequence exists for this character)
* Returns the named character represented by this instance.
* @return the named character (or null if no named character is associated)
*/
public String getUnicodeSequence() {
return this.unicodeSequence;
public NamedCharacter getCharacter() {
return this.character;
}
/**
* Sets the named character represented by this instance.
* @param ch the named character
*/
public void setCharacter(NamedCharacter ch) {
this.character = ch;
}
/**
* Sets the Unicode sequence for this character.
* Sets the named character represented by this instance.
* @param charName the character name (as defined in the Adobe glyph list)
* @param unicodeSequence the Unicode sequence
*/
public void setUnicodeSequence(String unicodeSequence) {
this.unicodeSequence = unicodeSequence;
public void setCharacter(String charName, String unicodeSequence) {
setCharacter(new NamedCharacter(charName, unicodeSequence));
}
/**
* Returns the PostScript character name.
* @return the charName
* Returns the Unicode sequence for this character.
* @return the Unicode characters
* (or null if no such Unicode sequence exists for this character)
*/
public String getCharName() {
return charName;
public String getUnicodeSequence() {
return (getCharacter() != null ? getCharacter().getUnicodeSequence() : null);
}
/**
* Sets the PostScript character name.
* @param charName the charName to set
* Returns the PostScript character name.
* @return the charName (or null if no character name is associated)
*/
public void setCharName(String charName) {
this.charName = charName;
public String getCharName() {
return (getCharacter() != null ? getCharacter().getName() : null);
}
/**

+ 2
- 10
src/java/org/apache/fop/fonts/type1/AFMFile.java View File

@@ -26,7 +26,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;

import org.apache.xmlgraphics.fonts.Glyphs;
import org.apache.xmlgraphics.java2d.Dimension2DDouble;

/**
@@ -315,15 +314,8 @@ public class AFMFile {
public void addCharMetrics(AFMCharMetrics metrics) {
String name = metrics.getCharName();
if (metrics.getUnicodeSequence() == null) {
if (name != null) {
String u = Glyphs.getUnicodeSequenceForGlyphName(metrics.getCharName());
if (u != null) {
metrics.setUnicodeSequence(u);
}
} else {
//Ignore as no Unicode assignment is possible
return;
}
//Ignore as no Unicode assignment is possible
return;
}
this.charMetrics.add(metrics);
if (name != null) {

+ 16
- 1
src/java/org/apache/fop/fonts/type1/AFMParser.java View File

@@ -31,6 +31,8 @@ import java.util.Stack;

import org.apache.commons.io.IOUtils;

import org.apache.fop.fonts.NamedCharacter;

/**
* Parses the contents of a Type 1 AFM font metrics file into an object structure ({@link AFMFile}).
*/
@@ -126,7 +128,7 @@ public class AFMParser {
VALUE_PARSERS.put(W, new NotImplementedYet(W));
VALUE_PARSERS.put(W0, new NotImplementedYet(W0));
VALUE_PARSERS.put(W1, new NotImplementedYet(W1));
VALUE_PARSERS.put(N, new StringSetter("CharName"));
VALUE_PARSERS.put(N, new NamedCharacterSetter("Character"));
VALUE_PARSERS.put(B, new CharBBox());
VALUE_PARSERS.put(START_TRACK_KERN, new NotImplementedYet(START_TRACK_KERN));
VALUE_PARSERS.put(END_TRACK_KERN, new NotImplementedYet(END_TRACK_KERN));
@@ -379,6 +381,19 @@ public class AFMParser {
}
}
private static class NamedCharacterSetter extends BeanSetter {
public NamedCharacterSetter(String variable) {
super(variable);
}
public void parse(String line, int startpos, Stack stack) throws IOException {
NamedCharacter ch = new NamedCharacter(getStringValue(line, startpos));
Object obj = stack.peek();
setValue(obj, ch);
}
}
private static class NumberSetter extends BeanSetter {
public NumberSetter(String variable) {
super(variable);

+ 28
- 5
src/java/org/apache/fop/fonts/type1/Type1FontLoader.java View File

@@ -108,6 +108,11 @@ public class Type1FontLoader extends FontLoader {
throw new java.io.FileNotFoundException(
"Neither an AFM nor a PFM file was found for " + this.fontFileURI);
}
if (pfm == null) {
//Cannot do without the PFM for now
throw new java.io.FileNotFoundException(
"No PFM file was found for " + this.fontFileURI);
}
buildFont(afm, pfm);
this.loaded = true;
}
@@ -122,12 +127,17 @@ public class Type1FontLoader extends FontLoader {
singleFont.setEmbedFileName(this.fontFileURI);
returnFont = singleFont;
handleEncoding(afm, pfm);
handleFontName(afm, pfm);
handleMetrics(afm, pfm);
}

private void handleEncoding(AFMFile afm, PFMFile pfm) {
//Encoding
if (afm != null) {
String encoding = afm.getEncodingScheme();
if ("AdobeStandardEncoding".equals(encoding)) {
//Use WinAnsi in this case as it better fits the usual character set people need
singleFont.setEncoding(CodePointMapping.WIN_ANSI_ENCODING);
singleFont.setEncoding(CodePointMapping.STANDARD_ENCODING);
} else {
String effEncodingName;
if ("FontSpecific".equals(encoding)) {
@@ -142,6 +152,14 @@ public class Type1FontLoader extends FontLoader {
CodePointMapping mapping = buildCustomEncoding(effEncodingName, afm);
singleFont.setEncoding(mapping);
}
List charMetrics = afm.getCharMetrics();
for (int i = 0, c = afm.getCharCount(); i < c; i++) {
AFMCharMetrics metrics = (AFMCharMetrics)charMetrics.get(i);
if (!metrics.hasCharCode() && metrics.getCharacter() != null) {
singleFont.addUnencodedCharacter(metrics.getCharacter(),
(int)Math.round(metrics.getWidthX()));
}
}
} else {
if (pfm.getCharSet() >= 0 && pfm.getCharSet() <= 2) {
singleFont.setEncoding(pfm.getCharSetName() + "Encoding");
@@ -151,7 +169,9 @@ public class Type1FontLoader extends FontLoader {
singleFont.setEncoding("WinAnsiEncoding"); //Try fallback, no guarantees!
}
}
}

private void handleFontName(AFMFile afm, PFMFile pfm) {
//Font name
if (afm != null) {
returnFont.setFontName(afm.getFontName()); //PostScript font name
@@ -168,7 +188,9 @@ public class Type1FontLoader extends FontLoader {
names.add(pfm.getWindowsName()); //emulate afm.getFamilyName()
returnFont.setFamilyNames(names);
}
}

private void handleMetrics(AFMFile afm, PFMFile pfm) {
//Basic metrics
if (afm != null) {
if (afm.getCapHeight() != null) {
@@ -268,6 +290,7 @@ public class Type1FontLoader extends FontLoader {
if (afm != null) {
//TODO returnFont.setFlags(flags);
returnFont.setFirstChar(afm.getFirstChar());
returnFont.setLastChar(afm.getLastChar());
Iterator iter = afm.getCharMetrics().iterator();
@@ -279,7 +302,6 @@ public class Type1FontLoader extends FontLoader {
}
returnFont.replaceKerningMap(afm.createXKerningMapEncoded());
} else {
returnFont.setFlags(pfm.getFlags());
returnFont.setFirstChar(pfm.getFirstChar());
returnFont.setLastChar(pfm.getLastChar());
for (short i = pfm.getFirstChar(); i <= pfm.getLastChar(); i++) {
@@ -287,6 +309,7 @@ public class Type1FontLoader extends FontLoader {
}
returnFont.replaceKerningMap(pfm.getKerning());
}
returnFont.setFlags(pfm.getFlags());
}

private CodePointMapping buildCustomEncoding(String encodingName, AFMFile afm) {

+ 0
- 376
src/java/org/apache/fop/image/AbstractFopImage.java View File

@@ -1,376 +0,0 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

/* $Id$ */

package org.apache.fop.image;

// Java
import java.awt.color.ColorSpace;
import java.awt.color.ICC_ColorSpace;
import java.awt.color.ICC_Profile;
import java.io.InputStream;
import java.awt.Color;

import org.apache.commons.io.IOUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.fop.datatypes.Length;

/**
* Base class to implement the FopImage interface.
*
* @see FopImage
*/
public abstract class AbstractFopImage implements FopImage {

/**
* logging instance
*/
protected static Log log = LogFactory.getLog(AbstractFopImage.class);

/**
* Keeps track of what has been loaded.
*/
protected int loaded = 0;

/**
* Image width (in pixel).
*/
protected int width = 0;

/**
* Image height (in pixel).
*/
protected int height = 0;
/** Horizontal bitmap resolution (in dpi) */
protected double dpiHorizontal = 72.0f;

/** Vertical bitmap resolution (in dpi) */
protected double dpiVertical = 72.0f;

/**
* Image input stream.
*/
protected InputStream inputStream = null;

/**
* ImageReader object (to obtain image header informations).
*/
protected FopImage.ImageInfo imageInfo = null;

/**
* Image color space (java.awt.color.ColorSpace).
*/
protected ColorSpace colorSpace = null;

/**
* Bits per pixel.
*/
protected int bitsPerPixel = 0;

/**
* Image data (pixels, uncompressed).
*/
protected byte[] bitmaps = null;

/**
* Image data (undecoded, compressed, for image formats that can be embedded without decoding.
*/
protected byte[] raw = null;

/**
* Image transparency.
*/
protected boolean isTransparent = false;

/**
* Transparent color (java.awt.Color).
*/
protected Color transparentColor = null;

/**
* Photoshop generated CMYK JPEGs are inverted.
*/
protected boolean invertImage = false;
/**
* Constructor.
* Construct a new FopImage object and initialize its default properties:
* <UL>
* <LI>image width
* <LI>image height
* </UL>
* The image data isn't kept in memory.
* @param info image information
*/
public AbstractFopImage(FopImage.ImageInfo info) {
this.inputStream = info.inputStream;
this.imageInfo = info;
if (this.imageInfo.width != -1) {
width = imageInfo.width;
height = imageInfo.height;
dpiHorizontal = imageInfo.dpiHorizontal;
dpiVertical = imageInfo.dpiVertical;
loaded = loaded | DIMENSIONS;
}
}

/**
* Get the mime type for this image.
*
* @return the mime type for the image
*/
public String getMimeType() {
return imageInfo.mimeType;
}

/** {@inheritDoc} */
public String getOriginalURI() {
return this.imageInfo.originalURI;
}
/**
* Load image data and initialize its properties.
*
* @param type the type of loading to do
* @return true if the loading was successful
*/
public synchronized boolean load(int type) {
if ((loaded & type) != 0) {
return true;
}
boolean success = true;
if (((type & DIMENSIONS) != 0) && ((loaded & DIMENSIONS) == 0)) {
success = success && loadDimensions();

if (!success) {
return false;
}
loaded = loaded | DIMENSIONS;
}
if (((type & BITMAP) != 0) && ((loaded & BITMAP) == 0)) {
success = success && loadBitmap();
if (success) {
loaded = loaded | BITMAP;
}
}
if (((type & ORIGINAL_DATA) != 0) && ((loaded & ORIGINAL_DATA) == 0)) {
success = success && loadOriginalData();
if (success) {
loaded = loaded | ORIGINAL_DATA;
}
}
return success;
}

/**
* Load the dimensions of the image.
* All implementations should override this to get and
* return the dimensions.
*
* @return true if the loading was successful
*/
protected boolean loadDimensions() {
return false;
}

/**
* Load a bitmap array of the image.
* If the renderer requires a bitmap image then the
* implementations should override this to load the bitmap.
*
* @return true if the loading was successful
*/
protected boolean loadBitmap() {
return false;
}

/**
* Load the original image data.
* In some cases the original data can be used by the renderer.
* This should load the data and any other associated information.
*
* @return true if the loading was successful
*/
protected boolean loadOriginalData() {
return false;
}

/**
* Load the original image data. This is generic code for use by any
* subclass that wants to use this from a loadOriginalData() implementation.
*
* @return true if the loading was successful
*/
protected boolean loadDefaultOriginalData() {
if (inputStream == null) {
throw new IllegalStateException("inputStream is already null or was never set");
}
try {
this.raw = IOUtils.toByteArray(inputStream);
} catch (java.io.IOException ex) {
log.error("Error while reading raw image: " + ex.getMessage(), ex);
return false;
} finally {
IOUtils.closeQuietly(inputStream);
inputStream = null;
}
return true;
}
/**
* @return the image width (in pixels)
*/
public int getWidth() {
return this.width;
}
/**
* @return the image height (in pixels)
*/
public int getHeight() {
return this.height;
}

/** {@inheritDoc} */
public int getIntrinsicWidth() {
return (int)(getWidth() * 72000 / getHorizontalResolution());
}

/** {@inheritDoc} */
public int getIntrinsicHeight() {
return (int)(getHeight() * 72000 / getVerticalResolution());
}
/** {@inheritDoc} */
public Length getIntrinsicAlignmentAdjust() {
return this.imageInfo.alignmentAdjust;
}

/** {@inheritDoc} */
public double getHorizontalResolution() {
return this.dpiHorizontal;
}
/** {@inheritDoc} */
public double getVerticalResolution() {
return this.dpiVertical;
}
/**
* Return the image color space.
* @return the image color space (java.awt.color.ColorSpace)
*/
public ColorSpace getColorSpace() {
return this.colorSpace;
}

/**
* Get ICC profile for this image.
* @return the icc profile or null if not applicable
*/
public ICC_Profile getICCProfile() {
if (this.colorSpace != null && this.colorSpace instanceof ICC_ColorSpace) {
return ((ICC_ColorSpace)this.colorSpace).getProfile();
}
return null;
}

/**
* Return the number of bits per pixel.
* @return number of bits per pixel
*/
public int getBitsPerPixel() {
return this.bitsPerPixel;
}

/**
* Return the image transparency.
* @return true if the image is transparent
*/
public boolean isTransparent() {
return this.isTransparent;
}

/**
* Check if this image has a soft mask.
*
* @return true if the image also has a soft transparency mask
*/
public boolean hasSoftMask() {
return false;
}

/**
* Get the soft mask.
* The soft mask should have the same bitdepth as the image data.
*
* @return the data array of soft mask values
*/
public byte[] getSoftMask() {
return null;
}

/**
* Return the transparent color.
* @return the transparent color (java.awt.Color)
*/
public Color getTransparentColor() {
return this.transparentColor;
}

/** @return true for CMYK images generated by Adobe Photoshop */
public boolean isInverted() {
return this.invertImage;
}
/**
* Return the image data (pixels, uncompressed).
* @return the image data
*/
public byte[] getBitmaps() {
return this.bitmaps;
}

/**
* Return the image data size (number of bytes taken up by the uncompressed pixels).
* @return the image data size
*/
public int getBitmapsSize() {
return (bitmaps != null ? bitmaps.length : 0);
}

/**
* Return the original image data (compressed).
* @return the original image data
*/
public byte[] getResourceBytes() {
return raw;
}

/**
* Return the original image data size (compressed).
* @return the original image data size
*/
public int getResourceBytesSize() {
return (raw != null ? raw.length : 0);
}

}


+ 0
- 0
src/java/org/apache/fop/image/BmpImage.java View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save