Details
-
Type: New Feature
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.2
-
Fix Version/s: EE-1.8.2.GA_P04, 3.1.0.BETA1, 3.1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:all
-
Affects:Documentation (User Guide, Ref. Guide, etc.), Sample App./Tutorial
-
Community Contribution:Yes
Description
-
Hide
- PDFExport_jars.zip
- 2.21 MB
- Tobin Tom
-
- PDFExport_jars/ICEPDF_Export.doc 1.38 MB
- PDFExport_jars/ICEPDFExport.jar 37 kB
- PDFExport_jars/iText-2.1.0.jar 1.00 MB
-
Hide
- ICEPDFExport.zip
- 30 kB
- Tobin Tom
-
- ICEPDFExport/.classpath 0.5 kB
- ICEPDFExport/.project 0.5 kB
- ICEPDFExport/META-INF/MANIFEST.MF 0.0 kB
- ICEPDFExport/.../PDFDataExporter.taglib.xml 0.5 kB
- ICEPDFExport/.../PDFDataExporter.tld 4 kB
- ICEPDFExport/META-INF/faces-config.xml 0.8 kB
- ICEPDFExport/.../web-facesconfig_1_1.dtd 36 kB
- ICEPDFExport/com/.../PDFDataExporter.java 23 kB
- ICEPDFExport/.../PDFDataExporterRenderer.java 5 kB
- ICEPDFExport/com/.../PDFExporterServlet.java 5 kB
- ICEPDFExport/com/.../PDFExporterTag.java 14 kB
- ICEPDFExport/com/.../util/ComponentUtil.java 5 kB
- ICEPDFExport/.../PDFExporterConstants.java 11 kB
- ICEPDFExport/com/.../util/PDFGenerator.java 7 kB
- ICEPDFExport/com/.../util/PageEvents.java 3 kB
- ICEPDFExport/com/.../util/StringUtil.java 0.8 kB
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
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.
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
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.
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.
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
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
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.
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
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