Jeremias Maerki [Mon, 16 Aug 2010 09:39:34 +0000 (09:39 +0000)]
Improvements/Bugfixes for PDF attachments (embedded files):
- Acrobat doesn't like indirect objects for the /Length entry of embedded files (make on-the-fly generation more easily configurable).
- Added the /Size entry for embedded files to keep Acrobat happy.
- Moved the embedded files' Names tree to the end of the PDF to be on the safe side.
- Made hyperlinks to embedded files work by using a JavaScript Action (thanks to Matthias Reischenbacher for that idea).
- Added sorting to the names tree node because Acrobat relies on it.
- Added some filename manipulation code to work around possible encoding problems with special characters in the filenames.
Adrian Cumiskey [Sun, 15 Aug 2010 16:15:55 +0000 (16:15 +0000)]
Reinstated support for being able to specify a font cache filepath in the fop user configuration.
Added convenience support for the deletion of the Fop font cache file from the command line.
Jeremias Maerki [Sat, 14 Aug 2010 19:28:26 +0000 (19:28 +0000)]
Removed many "// CSOK: ConstantName" instances for constants, by converting them to uppercase as they should really be.
Fixed some other non-Checkstyle issues on the way, imports mainly.
Removed some "log" instances that were not used.
Jeremias Maerki [Sat, 14 Aug 2010 17:17:00 +0000 (17:17 +0000)]
Bugzilla #49733:
Resolved compilation (safe one), Checkstyle and many Javadoc warnings.
Submitted by: Glenn Adams <glenn.at.skynav.com>
Changes to patch:
- Restored the deprecated Graphics2DAdapter method (to be removed after Barcode4J 2.1 is released).
- Restored Renderer.startPageSequence(LineArea) pending discussion about removal.
- build.xml: set max VM to 1024MB instead of 2048MB to allow for 32-bit JVMs.
- build.xml: restored longer taskdef names.
- Restored Checkstyle 4 file for people running older IDEs.
Jeremias Maerki [Tue, 3 Aug 2010 13:44:54 +0000 (13:44 +0000)]
Bugzilla #44460:
Added support for PDF file attachments (embedded files) including basic-link support to reference them.
Based on work submitted by: Andrejus Chaliapinas <a.chaliapinas.at.infosana.com>
I've changed and improved his patch extensively and added some documentation.
Added ImageElementBridge to ImageConverterSVG2G2D so output formats like Java2D (PNG, TIFF) and PCL can load image formats other than just PNG and JPEG from SVG.
This also represents a work-around for certain JPEG images that cannot be loaded properly with the Sun JPEG codec embedded in the JDK. With this, JPEGs are loaded via ImageIO.
Restored ColorExt after removing it from XML Graphics Commons again.
Moved GrayScaleColorConverter as a package-local class from XGC to the AFP package (doesn't require deprecation when we can put the functionality in XGC later with the new color infrastructure).
Minor refactoring and style fixups:
- private lineLayoutsList can be a primitive array
- eliminate some stray hungarians (inconsistent btw: iFirstIndex, but nEliminableLines...)
- inverted principal loop in createLineBreaks(), to make debugging less confusing (and preparation for partial fix of Bug 38264)
- compacted some boolean expressions ( (x ? true : false) -> plain x )
- removed some commented code
- extracted some code into processUpdates; findHyphenationPoints was getting too long
- minor javadoc fixups
Jeremias Maerki [Sat, 12 Jun 2010 08:19:48 +0000 (08:19 +0000)]
AFP Output Changes:
- Fixed positioning of Java2D-based images (when GOCA is enabled). GraphicsDataDescriptor had a bit order bug. The Graphics2D image handler didn't save state and reposition the image origin.
- Switched bitmap image handling in AFPGraphics2D to (re-)use AFPImageHandlerRenderedImage so it can profit from it's advanced image conversion functionality. This also avoids some bugs with certain image formats.
- Added enhanced dithering functionality for images that need to be converted to bi-level images.
Jeremias Maerki [Tue, 8 Jun 2010 19:01:56 +0000 (19:01 +0000)]
Bugzilla #42306:
Fix for AWT viewer to correctly track page numbers in continuous display mode.
Submitted by: Richard Wheeldon <richardw@geoquip-rnd.demon.co.uk>
Modifications to original patch:
- Small adjustments for out code conventions.
- Added some missing Javadocs.
Jeremias Maerki [Thu, 27 May 2010 19:20:54 +0000 (19:20 +0000)]
Big encoding performance improvement for bi-level images which do not have the right bit order. Apparently, setting the subtractive option doesn't help with inverting a bi-level FS10 image.
Jeremias Maerki [Thu, 20 May 2010 09:52:27 +0000 (09:52 +0000)]
Changed many variables and parameters from "int" to "char" because AFP font support mostly uses Unicode code points unlike Type 1 and TrueType support which use internal character code points (the result of Font.mapChar()). This should improve code readability.
Jeremias Maerki [Mon, 17 May 2010 11:41:33 +0000 (11:41 +0000)]
Don't fail on AFM just because it has a Start/EndTrackKern section. Log a warning instead of throwing an exception when an unimplemented feature is found.
Added a save/restoreGraphicsState pair for the initial coordinate system in PDF output for easier post-processing. The missing q/Q pair caused content to be upside-down when simply a new content stream is appended to the page. With this change the initial coordinate system is restored after FOP's stream is finished.
Chris Bowditch [Wed, 14 Apr 2010 15:38:20 +0000 (15:38 +0000)]
cache AFP Fonts in a similar manner to LazyFont class for TrueType fonts. This boosts performance when rendering a large batch of AFP documents in the same JVM
Now that the creation of event-model.xml has been standardised, the EventModelFactory mechanism is no longer needed. Removed all the factory classes.
Registration through META-INF/services also is no longer necessary.
Generate event models in the same directory as the corresponding EventProducer interfaces and name it event-model.xml by default
The eventResourceGenerator task now takes a destination directory parameter instead of modelfile
Split catch-all EventFormatter.xml message file into individual files for each EventProducer. There is no longer a default EventModelFactory
Added test case for font event
Jeremias Maerki [Thu, 18 Mar 2010 15:24:25 +0000 (15:24 +0000)]
Bumped xmlgraphics-commons.jar.
Added configuration option to tweak the image loader framework.
See also: http://svn.apache.org/viewvc?rev=924666&view=rev
Jeremias Maerki [Tue, 16 Feb 2010 09:36:40 +0000 (09:36 +0000)]
Bugzilla #48512:
Reverted rev 908543.
For some Type 1 fonts, the encoding mapped characters in the AFM file don't match the font's primary encoding. This change tries to address this fact.
Pascal Sancho [Mon, 15 Feb 2010 15:43:32 +0000 (15:43 +0000)]
Added complete list of 1.1 item in compliance page.
- Udated information for page-number-citation-last, content-width, content-height, and page-position
- Updated links for bookmarks
- retrieve-table-marker now related to fox:outline
Jeremias Maerki [Wed, 10 Feb 2010 15:37:04 +0000 (15:37 +0000)]
Bugzilla #48512:
Bugfix: Don't map AdobeStandardEncoding to StandardEncoding. They are not the same. Fixes problem with invalid character widths on PostScript output and missing umlauts.
Jeremias Maerki [Wed, 10 Feb 2010 08:53:05 +0000 (08:53 +0000)]
Bugzilla #48696:
Bugfix for color model in IOCA IDE structure parameter for 4- and 8-bit grayscale images.
Submitted by: Peter Hancock <peter.hancock.at.gmail.com>
Jeremias Maerki [Sat, 6 Feb 2010 18:19:31 +0000 (18:19 +0000)]
Related to Bugzilla #47232:
The same bug that existed for Type 1 fonts (fixed in rev 777459) also applies to TrueType fonts. The last glyph in a font was reported to have zero width. Bug exists since 2001.
Made part of setupsRGBColorProfile method synchronized to avoid ConcurrentModificationException when PDF documents are being produced in multiple threads
Jeremias Maerki [Thu, 21 Jan 2010 17:37:07 +0000 (17:37 +0000)]
Bugzilla #48567:
Initial support for CID-keyed double-byte fonts (Type 0) in AFP output.
Submitted by: Peter Hancock <peter.hancock.at.gmail.com>
Patch modified by jeremias:
- as discussed: removed fallback character code
- as discussed: changed "double-byte" to "CIDKeyed" for the font type.
- some cosmetic changes
- removed some dead code and commented code.
Updated reference accessible PDF files. Old ones had "Apache FOP Version SVN branches/Temp_Accessibility" as Creator and Producer values. New ones have "Apache FOP Version SVN trunk". This was causing spurious differences when testing PDF accessibility.
Jeremias Maerki [Fri, 1 Jan 2010 13:57:10 +0000 (13:57 +0000)]
Fixed a multi-threading bugfix, visible for example when opening examples/fo/basic/readme.fo with the AWT Preview. Words could be jumbled and the wrong fonts were sometimes used.
The class still has a performance problem concerning the use of the TextLayout class for determining some font metrics otherwise not available from the Java2D/AWT subsystem.