[jira] Created: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
29 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
    [ 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-311?page=comments#action_12435186 ]
           
Jacopo Cappellato commented on OFBIZ-311:
-----------------------------------------

As correctly stated by John, there was just one report using the JPublish FOP view handler: the fonts.pdf in the content manager.
Now that I've migrated it to the Screen Widget FOP view handler, the two classes FopPdfViewHandler and FopRenderer are no more used: can I remove them?


> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-311?page=comments#action_12435187 ]
           
Jacopo Cappellato commented on OFBIZ-311:
-----------------------------------------

Another useful email from John:

================================================================
Good news on the Barcode4J.  I found that Jeremias Maerki released a
beta that works with version .92.  The jar is available at: .

  http://www.jeremias-maerki.ch/download/fop/barcode4j-fop-ext-trunk-complete.jar

I swapped out the jars and restarted ofBiz and the barcodes are working!
================================================================

> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-311?page=comments#action_12435190 ]
           
David E. Jones commented on OFBIZ-311:
--------------------------------------

In general with the framework we have not removed older tools like this, even if they are no longer a best practice, or even a secondary best practice, or even really recommended at all... ;)

That doesn't mean we have to keep them 100% up to date and functional, but they should be there and be close to functional (and compiling and such).

Does it look like there will be an issue with that as part of this FOP library update?

> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-311?page=comments#action_12435365 ]
           
John Martin commented on OFBIZ-311:
-----------------------------------

Dave,

I have 90% of the code for the FopPdfViewHandler and FopRenderer handler but just don't see how to test it.  I'm not quite sure how it was referencing the fonts.fo page?  The code is pretty much the same as the other handler except it returned instead of outputted.

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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-311?page=comments#action_12435411 ]
           
Jacopo Cappellato commented on OFBIZ-311:
-----------------------------------------

John, David,

well I think that this is a good compromise:

1) FopPdfViewHandler and FopRenderer have been updated by John so that they compile fine with the new jars
2) we will not remove them
3) since they are not currently used in the system, there is no need to test them now; if someone will ever use them, he/she will report the issues (if any) introduced by the migration


> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-311?page=comments#action_12435418 ]
           
David E. Jones commented on OFBIZ-311:
--------------------------------------

Sounds good to me.

> 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 | Threaded
Open this post in threaded view
|

Re: [jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

John Martin
I just posted up the updated code and required jars to the ticket:

    https://issues.apache.org/jira/browse/OFBIZ-311

Everything is working to the best of my knowledge.  One concern that I
do have is: 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.

Let me know if you have any problems with the patch.

John
Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-311?page=comments#action_12435558 ]
           
John Martin commented on OFBIZ-311:
-----------------------------------

I wanted to mention that I noticed that when referencing images using the fo:external-graphic src=http://...> that the FOP engine will do a GET on the image two or three times.  I'm not certain the reason for this but it obviously could become a performance problem.  I noticed this by watching the access_log.

My recommendation is to try and reference static images using the "file:" syntax instead of the "http://".  This will eliminate the unnecessary repeated downloads of the graphics.  

> 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 | Threaded
Open this post in threaded view
|

Re: [jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Christian Geisert
In reply to this post by John Martin
John Martin schrieb:
> I just posted up the updated code and required jars to the ticket:
>
>    https://issues.apache.org/jira/browse/OFBIZ-311
>
> Everything is working to the best of my knowledge.  One concern that I
> do have is: 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.

I'll meet Jeremias Märki tomorrow at the OpenExpo[1] in Zürich and maybe
we'll have some time to look at this ..

--
Christian

[1] http://openexpo.org/
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-311?page=comments#action_12436225 ]
           
Christian Geisert commented on OFBIZ-311:
-----------------------------------------

I just tried the patch and got compile errors for the following classes (ant returns BUILD SUCCESSFUL...)

applications/content/src/org/ofbiz/content/email/EmailServices.java
applications/content/src/org/ofbiz/content/ContentManagementServices.java
applications/content/src/org/ofbiz/content/content/ContentServices.java

(they use older FOP classes)


After excluding those from the build I had a look at the barcode on the shipment manifest and it looks ok (you might want to zoom in see the bars)

Please create the patch next time with a 'svn diff' from the ofbiz dir, this will make it simpler to apply.

> 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 | Threaded
Open this post in threaded view
|

Re: [jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

John Martin
Sorry but I couldn't make the 'svn diff' from the root because I have
a bunch of other changes going on at the same time.

I'm not going to have any time in the next couple of days to look at
the Content classes to cut them over.  Is there anybody that might
possibly be able to?  Looking at the EmailServices.java class, the
code changes that I've already done should provide a good example of
how to do it.
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-311?page=comments#action_12446583 ]
           
Jacopo Cappellato commented on OFBIZ-311:
-----------------------------------------

Anyone willing to help to fix the last three classes (see the above comment from Christian):

applications/content/src/org/ofbiz/content/email/EmailServices.java
applications/content/src/org/ofbiz/content/ContentManagementServices.java
applications/content/src/org/ofbiz/content/content/ContentServices.java

After this is done I'd be much more than happy to review and commit this work.

Thanks


> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-311?page=comments#action_12453529 ]
           
Jacopo Cappellato commented on OFBIZ-311:
-----------------------------------------

I'd really love to see this work committed soon!
It seems that we need to upgrade the following last three classes before we can do it:

applications/content/src/org/ofbiz/content/email/EmailServices.java
applications/content/src/org/ofbiz/content/ContentManagementServices.java
applications/content/src/org/ofbiz/content/content/ContentServices.java

However, I've reviewed the code in the ContentServices class and I've discovered that the offending method (a service implementation) is "foToPdf": the method/service is not used in the system (it's probably an old implementation, probably superseded by the widgets).
I propose to remove that method/service and its service definition.


> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-311?page=comments#action_12453532 ]
           
Jacopo Cappellato commented on OFBIZ-311:
-----------------------------------------

Another good news: the ContentManagementServices class doesn't contain anymore code related to fop; so the very last issue is the class:

applications/content/src/org/ofbiz/content/email/EmailServices.java



> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-311?page=comments#action_12453533 ]
           
Jacopo Cappellato commented on OFBIZ-311:
-----------------------------------------

Last update about the EmailServices class: the only method that uses the old fop is sendMailFromScreen that is the implementation of the "sendMailFromScreen" service that is used by many other application.

John, Christian, all, could you please help (at least with some suggestions) to migrate it to use the new fop api?

THANKS

Jacopo


> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-311?page=comments#action_12453611 ]
           
Christian Geisert commented on OFBIZ-311:
-----------------------------------------

Ok, I'll have a look at it.

framework/example/src/org/ofbiz/example/ExamplePrintServices.java uses the old FOP API too


> 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 | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-311) Upgrade the Apache FOP rendering engine from .20.5 to .92

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-311?page=comments#action_12454170 ]
           
Christian Geisert commented on OFBIZ-311:
-----------------------------------------

Status update: Everything compiles, will do some testing tomorrow

> 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

       
12