ICEfaces
  1. ICEfaces
  2. ICE-5208

Add PDF export to ice:dataExporter

    Details

    • Affects:
      Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial
    • Community Contribution:
      Yes

      Description

      DataExporter could have a pdf export type.

        Activity

        Stephane Douxc created issue -
        Hide
        Tobin Tom added a comment -

        Hi,

        I have attached a ICEFaces data table PDF export component code and documentation. I used this with 1.8.2, but I am sure there would be a few changes to convert it to a JSF 1.2/2.0 standard, but after those changes the component should work just fine.

        Thanks,
        Tobin

        Show
        Tobin Tom added a comment - Hi, I have attached a ICEFaces data table PDF export component code and documentation. I used this with 1.8.2, but I am sure there would be a few changes to convert it to a JSF 1.2/2.0 standard, but after those changes the component should work just fine. Thanks, Tobin
        Tobin Tom made changes -
        Field Original Value New Value
        Attachment PDFExport_jars.zip [ 13243 ]
        Attachment ICEPDFExport.zip [ 13244 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 2.1 [ 10241 ]
        Affects [Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial]
        Assignee Priority P2
        Community Contribution [Yes]
        Assignee Mark Collette [ mark.collette ]
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P2 P3
        Ken Fyten made changes -
        Fix Version/s 3.1 [ 10312 ]
        Fix Version/s 3.0 [ 10241 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s EE-1.8.2.GA_P04 [ 10280 ]
        Assignee Priority P3 P2
        Hide
        Ken Fyten added a comment - - edited

        We need to be cautious with 3rd party libraries, such as iText. Since iText is LGPL licenses, we will not be able to distribute it in the product bundle. This means the the exportAdapter will need to be written using reflection or some other technique that will allow it to not fail with errors at runtime if the iText library is missing.

        Show
        Ken Fyten added a comment - - edited We need to be cautious with 3rd party libraries, such as iText. Since iText is LGPL licenses, we will not be able to distribute it in the product bundle. This means the the exportAdapter will need to be written using reflection or some other technique that will allow it to not fail with errors at runtime if the iText library is missing.
        Ken Fyten made changes -
        Assignee Priority P2 P3
        Ken Fyten made changes -
        Salesforce Case []
        Assignee Priority P3 P1
        Hide
        Mark Collette added a comment -

        Uses a Servlet instead of Resource api
        Exports data into Map in session, which Servlet then uses to create a PDF in memory, and serve out
        Doesn't seem to support ice:columns
        Doesn't seem to support footer rendering
        Doesn't use Converters

        Adds these properties to component:

        private String headerValue;
        private String orientation;
        private String pageSize;
        private String headerFont;
        private String cellFont;
        private String headerFontSize;
        private String cellFontSize;

        The code is organised to need all the cell data to calculate column widths, before the table is rendered, but this might be possible to set after. Have to investigate.
        PDF specific code is mostly contained in PDFExporterServlet, PDFGenerator, PageEvents

        Show
        Mark Collette added a comment - Uses a Servlet instead of Resource api Exports data into Map in session, which Servlet then uses to create a PDF in memory, and serve out Doesn't seem to support ice:columns Doesn't seem to support footer rendering Doesn't use Converters Adds these properties to component: private String headerValue; private String orientation; private String pageSize; private String headerFont; private String cellFont; private String headerFontSize; private String cellFontSize; The code is organised to need all the cell data to calculate column widths, before the table is rendered, but this might be possible to set after. Have to investigate. PDF specific code is mostly contained in PDFExporterServlet, PDFGenerator, PageEvents
        Hide
        Mark Collette added a comment -

        Didn't render the component when tested with Facelets, but did work with JSP. Was able to modify the code to calculate and set the column widths after receiving the column data, so can continue to use the standard callback approach.

        Show
        Mark Collette added a comment - Didn't render the component when tested with Facelets, but did work with JSP. Was able to modify the code to calculate and set the column widths after receiving the column data, so can continue to use the standard callback approach.
        Hide
        Mark Collette added a comment -

        Hard-coding the added font name/size properties to their defaults. Adding the properties would entail augmenting the Excel one to use them too, so that may end up being a separate enhancement jira.

        Show
        Mark Collette added a comment - Hard-coding the added font name/size properties to their defaults. Adding the properties would entail augmenting the Excel one to use them too, so that may end up being a separate enhancement jira.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #28718 Sun Apr 15 10:07:33 MDT 2012 mark.collette ICE-5208 : Add a pdf export in dataExporter
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/common-web/WEB-INF/includes/examples/custom/dataTable-dataExporter.jspx
        Commit graph ADD /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/dataexporter/PDFOutputHandler.java
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/dataexporter/DataExporter.java
        Hide
        Mark Collette added a comment -

        Got everything working as an OutputTypeHandler, just like the Excel and CSV exporting. Then changed all the code to use reflection, so that it will compile without iText, and will run and give an error if the PDF exporting code is run without iText. The component-showcase dataExporter example references the PDF exporting, even though the iText jar must be downloaded by application developers and manually included into war by them, since we can't distribute it.

        icefaces 1.8.2 P04
        Subversion 28718

        Show
        Mark Collette added a comment - Got everything working as an OutputTypeHandler, just like the Excel and CSV exporting. Then changed all the code to use reflection, so that it will compile without iText, and will run and give an error if the PDF exporting code is run without iText. The component-showcase dataExporter example references the PDF exporting, even though the iText jar must be downloaded by application developers and manually included into war by them, since we can't distribute it. icefaces 1.8.2 P04 Subversion 28718
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #28719 Sun Apr 15 20:51:37 MDT 2012 mark.collette ICE-5208 : Add a pdf export in dataExporter
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component-metadata/src/main/resources/conf/custom/dataExporter-renderer.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/component-metadata/src/main/resources/conf/ice_cust_properties/cust-dataExporter-props.xml
        Hide
        Mark Collette added a comment -

        Added documentation for the dataExporter and the type property on it, listing the pdf export capability and giving the URL to download the iText jar from.

        icefaces 1.8.2 P04
        Subversion 28719

        Show
        Mark Collette added a comment - Added documentation for the dataExporter and the type property on it, listing the pdf export capability and giving the URL to download the iText jar from. icefaces 1.8.2 P04 Subversion 28719
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #28723 Mon Apr 16 11:28:14 MDT 2012 ken.fyten ICE-5208 : Add a pdf export in dataExporter (incl. itext-2.1.7.jar in war if it is present).
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/facelets/build.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/jsp/build.xml
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/facelets-enh/build.xml
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #28724 Mon Apr 16 11:37:59 MDT 2012 ken.fyten ICE-5208 : Add a pdf export in dataExporter (incl. itext-2.1.7.jar in war if it is present).
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase/README.TXT
        Hide
        Ken Fyten added a comment -

        For the Release Notes:

        The ice:dataExporter PDF exporter requires the 3rd party iText-2.1.7.jar. This jar is not included in the the ICEfaces release bundle due to its LGPL license. If you wish to use the PDF export function, you must first source the appropriate itext-2.x.x.jar and copy it in to the icefaces/samples/component-showcase/lib dir.

        Show
        Ken Fyten added a comment - For the Release Notes: The ice:dataExporter PDF exporter requires the 3rd party iText-2.1.7.jar. This jar is not included in the the ICEfaces release bundle due to its LGPL license. If you wish to use the PDF export function, you must first source the appropriate itext-2.x.x.jar and copy it in to the icefaces/samples/component-showcase/lib dir.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #28735 Mon Apr 16 22:58:16 MDT 2012 mark.collette ICE-5208 : Add a pdf export in dataExporter
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/compat/exporter/exporterType.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/compat/exporter/exporterColumn.xhtml
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/component-metadata/src/main/resources/conf/custom/dataExporter-renderer.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/compat/exporter/ExporterColumn.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/component-metadata/src/main/resources/conf/ice_cust_properties/cust-dataExporter-props.xml
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/dataexporter/DataExporter.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/java/org/icefaces/samples/showcase/example/compat/exporter/ExporterType.java
        Commit graph ADD /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/dataexporter/PDFOutputHandler.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/samples/showcase/showcase/src/main/webapp/resources/examples/compat/exporter/exporterPagination.xhtml
        Hide
        Mark Collette added a comment - - edited

        Adapted the code for icefaces3 compat dataExporter, and augmented showcase sample application to incorporate PDF exporting where appropriate. Fixed a showcase app issue where configurable column exporting would export in an unexpected sequence of columns.

        icefaces3 trunk
        Subversion 28735

        Show
        Mark Collette added a comment - - edited Adapted the code for icefaces3 compat dataExporter, and augmented showcase sample application to incorporate PDF exporting where appropriate. Fixed a showcase app issue where configurable column exporting would export in an unexpected sequence of columns. icefaces3 trunk Subversion 28735
        Ken Fyten made changes -
        Summary Add a pdf export in dataExporter Add PDF export to ice:dataExporter
        Issue Type Improvement [ 4 ] New Feature [ 2 ]
        Salesforce Case []
        Mark Collette made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Fix Version/s 3.1.0.BETA1 [ 10335 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mark Collette
            Reporter:
            Stephane Douxc
          • Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: