[ http://issues.apache.org/jira/browse/OFBIZ-311?page=all ]

John Martin updated OFBIZ-311:
------------------------------

    Attachment: fop-0.92-upgrade-patch.zip

Here is the patch to upgrade ofBiz FOP support from 0.20.5 to 0.92.  A few 
notes:

- Attached is a zip of the files changed for the FOP upgrade.  

-I've tested the  fopRenderer.java class by accessing the URL 
https://localhost:8443/content/control/fonts.pdf.   This class was in which 
before but I'm pretty sure it should be fine.

- The barcode functionality works but I question if the actual bars in the 
barcode are correct because they look odd to me.  I don't have a reader to 
validate them.

- From enclosed README.txt file:

The included files are to be used to upgrade the FOP functionality in ofBiz 
from version 0.20.5 to 0.92.

Apply the following patches:

apply viewInvoice.fo.ftl.patch to: 
applications\accounting\webapp\accounting\invoice\viewInvoice.fo.ftl 
- fixed syntax problems

apply FopRenderer.java.patch to:
framework\webapp\src\org\ofbiz\webapp\view\FopRenderer.java (patch)
- rewrote to work with new FOP engine

apply ScreenFopPdfViewHandler.java.patch to:
framework\widget\src\org\ofbiz\widget\screen\ScreenFopPdfViewHandler.java  
- rewrote to work with new FOP engine

Add new file ApacheFopFactory.java to:
framework\webapp\src\org\ofbiz\webapp\view\ApacheFopFactory.java 
- common class shared between various FOP clients


Updated libraries in directory framework\webapp\lib:
   fop-0.92.jar (replaces fop.jar)
   barcode4j-fop-ext-0.92.jar (replaces barcode4j-fop-ext-0.20.5-complete.jar)
   batik-all-1.6.jar (replaces batik.jar)
   xmlgraphics-commons-1.0.jar (new)

Updated libraries in directory framework\base\lib:
   commons\commons-logging-1.0.4.jar (new)
   avalon-framework-4.2.0.jar (replaces avalon-framework-4.1.5.jar)



NOTE:

=========================================================
>From the FOP specs for Library Dependencies:
=========================================================

Normal Dependencies
----------------------

- Apache Jakarta Commons IO

    commons-io-*.jar
    http://jakarta.apache.org/commons/io/
    (I/O routines)
    
    Apache License v2.0
    
- Apache Jakarta Commons Logging

    commons-logging-*.jar
    http://jakarta.apache.org/commons/logging/
    (Logging adapter for various logging backends like JDK 1.4 logging or Log4J)
    
    Apache License v2.0

- Apache Avalon Framework

    avalon-framework-*.jar
    http://excalibur.apache.org/framework/
    (Avalon Framework, maintained by the Apache Excalibur project)
    
    Apache License v2.0

- Apache XML Graphics Commons

    xmlgraphics-commons-*.jar
    http://xmlgraphics.apache.org/
    (Common Library for Apache Batik and Apache FOP)
    
    Apache License v2.0

- Apache Batik

    batik-*.jar
    http://xmlgraphics.apache.org/batik/
    (SVG Implementation)
    
    Apache License v2.0
   

> Upgrade the Apache FOP rendering engine from .20.5 to .92
> ---------------------------------------------------------
>
>                 Key: OFBIZ-311
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-311
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Improvement
>          Components: framework
>         Environment: Windows / Java 1.5
>            Reporter: John Martin
>         Attachments: fop-0.92-upgrade-patch.zip
>
>
> Working on upgrading the FOP (http://xmlgraphics.apache.org/fop/) rendering 
> engine used in ofBiz to generate PDF documents.  
> We had the need to use more advanced layout functionality than what 0.20.5 
> offered.  Version 0.92 offers a lot of improvements.  From the apache site: 
> *  More than half of the codebase has been rewritten over the last three 
> years. The code is relatively new and possibly not as stable as version 
> 0.20.5 in every regard. But the code is quickly approaching production level, 
> especially when you're happy with only PDF and PostScript output.
> * The API of FOP has changed considerably and is not backwards-compatible 
> with version 0.20.5.
> * There have been changes to the end-user API between 0.91 beta and 0.92 
> beta. With version 0.92, the API is now considered stable. Some methods have 
> been deprecated and will be removed with the next release. If you upgrade 
> from 0.91 beta, you will need to adjust your Java code.
> * The new code is much more strict about the interpretation of the XSL-FO 1.0 
> specification. Things that worked fine in version 0.20.5 might start to 
> produce warnings or even errors now. FOP 0.20.5 contains many bugs which have 
> been corrected in the new code.
> NOTE:
> - The last bullet point was accurate and some of the fo.ftl templates were 
> broken (i.e. invoicePDF.fo.ftl).   <fo:table-row> must contain 
> <fo:table-column> and <fo:table-column>  must contain <fo:block>.
> - Rendering of images are now done at their "natural" size unless you use the 
> properties content-width or content-height.  The height and width attributes 
> don't seem to have any effect on the rendering.  
> - Some of the XSL-FO documentation that I read also recommended avoiding the 
> use of 'px' (pixels) to define the size of objects since pixels is a screen 
> resolution and may not translate well to other devices.  They recommend using 
> mm or in for dimensions.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to