[ 
http://issues.apache.org/jira/browse/OFBIZ-311?page=comments#action_12435176 ] 
            
David E. Jones commented on OFBIZ-311:
--------------------------------------

Here is an email from John that has some additional information that is helpful 
about this:

==================================
In conjunction with fixing the DHL label issue, I ran into formating
limitations with the current version that ofBiz is using of FOP.  So I
jumped in and got it working.

The new FOP is NOT backwards compatible and they dropped several of
the classes that were being used.  They went to a new factory
framework.

I managed to get the
ofbiz\framework\widget\src\org\ofbiz\widget\screenScreenFopPdfViewHandler
working.

I started updating
ofbiz\framework\webapp\src\org\ofbiz\webapp\view\foprenderer.java
(pretty much the same    code...) but I didn't see where it was being
used.  I placed some breakpoints in the code but when viewing PDFs it
never enters the code.  Some help here?

The newer libraries are more sensitive to the FO schema and some of
the existing templates broke (i.e. viewInvoice.fo.ftl) which I
corrected.  The problem there was that there were some spacer
<table-row> elements with no <fo:table-cell> and <fo:table-cell> with
no <fo:block> elements which are now required.

The newer libraries also require upgrades of a few of the libraries
that they use including:

  avalon-framework-4.2.0.jar
  batik-all-1.6.jar
  commons-io-1.1.jar
  commons-logging-1.0.4.jar
  serializer-2.7.0.jar
  xalan-2.7.0.jar
  xercesImpl-2.7.1.jar
  xml-apis-1.3.02.jar
  xmlgraphics-commons-1.0.jar

I'm looking for feedback and help with foprenderer.java before I send
in my changes.

John


> 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
>
> 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