Class PDFExporter
- java.lang.Object
-
- org.primefaces.extensions.component.exporter.Exporter
-
- org.primefaces.extensions.component.exporter.PDFExporter
-
public class PDFExporter extends Exporter
Exporter
component.- Since:
- 0.7.0
- Author:
- Sudheer Jonna / last modified by $Author$
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.primefaces.extensions.component.exporter.Exporter
Exporter.ColumnType
-
-
Field Summary
-
Fields inherited from class org.primefaces.extensions.component.exporter.Exporter
skipComponents
-
-
Constructor Summary
Constructors Constructor Description PDFExporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.lowagie.text.pdf.PdfPCell
addColumnAlignments(javax.faces.component.UIComponent component, com.lowagie.text.pdf.PdfPCell cell)
protected void
addColumnFacets(org.primefaces.component.datatable.DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, Exporter.ColumnType columnType)
protected void
addColumnFacets(org.primefaces.component.subtable.SubTable table, com.lowagie.text.pdf.PdfPTable pdfTable, Exporter.ColumnType columnType)
protected void
addColumnValue(com.lowagie.text.pdf.PdfPTable pdfTable, List<javax.faces.component.UIComponent> components, com.lowagie.text.Font font, String columnType, org.primefaces.component.api.UIColumn column)
protected void
addColumnValue(com.lowagie.text.pdf.PdfPTable pdfTable, javax.faces.component.UIComponent component, com.lowagie.text.Font font, String columnType)
protected com.lowagie.text.pdf.PdfPCell
addFacetAlignments(javax.faces.component.UIComponent component, com.lowagie.text.pdf.PdfPCell cell)
protected void
createCustomFonts(String encoding)
void
customFormat(String facetBackground, String facetFontSize, String facetFontColor, String facetFontStyle, String fontName, String cellFontSize, String cellFontColor, String cellFontStyle, String datasetPadding, String orientation)
void
export(javax.faces.event.ActionEvent event, String tableId, javax.faces.context.FacesContext context, String filename, String tableTitle, boolean pageOnly, boolean selectionOnly, String encodingType, javax.el.MethodExpression preProcessor, javax.el.MethodExpression postProcessor, boolean subTable)
protected void
exportAll(javax.faces.context.FacesContext context, org.primefaces.component.datatable.DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable)
protected String
exportAll(org.primefaces.component.datalist.DataList list, int rowCount, StringBuilder input)
protected void
exportCells(org.primefaces.component.datatable.DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable)
protected String
exportPageOnly(int first, org.primefaces.component.datalist.DataList list, int rowsToExport, StringBuilder input)
protected void
exportPageOnly(javax.faces.context.FacesContext context, org.primefaces.component.datatable.DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable)
protected com.lowagie.text.pdf.PdfPTable
exportPDFTable(javax.faces.context.FacesContext context, org.primefaces.component.datalist.DataList list, boolean pageOnly, String encoding)
protected com.lowagie.text.pdf.PdfPTable
exportPDFTable(javax.faces.context.FacesContext context, org.primefaces.component.datatable.DataTable table, boolean pageOnly, boolean selectionOnly, String encoding, boolean subTable)
protected void
exportRow(org.primefaces.component.datatable.DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, int rowIndex)
protected void
exportSelectionOnly(javax.faces.context.FacesContext context, org.primefaces.component.datatable.DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable)
protected void
subTableExportAll(javax.faces.context.FacesContext context, org.primefaces.component.subtable.SubTable table, com.lowagie.text.pdf.PdfPTable pdfTable)
protected void
subTableExportCells(org.primefaces.component.subtable.SubTable table, com.lowagie.text.pdf.PdfPTable pdfTable)
protected void
subTableExportRow(org.primefaces.component.subtable.SubTable table, com.lowagie.text.pdf.PdfPTable pdfTable, int rowIndex)
protected void
tableColumnGroup(com.lowagie.text.pdf.PdfPTable pdfTable, org.primefaces.component.datatable.DataTable table, String facetType)
protected void
tableColumnGroup(com.lowagie.text.pdf.PdfPTable pdfTable, org.primefaces.component.subtable.SubTable table, String facetType)
protected void
tableFacet(javax.faces.context.FacesContext context, com.lowagie.text.pdf.PdfPTable pdfTable, org.primefaces.component.datatable.DataTable table, int columnCount, String facetType)
protected void
tableFacet(javax.faces.context.FacesContext context, com.lowagie.text.pdf.PdfPTable pdfTable, org.primefaces.component.subtable.SubTable table, int columnCount, String facetType)
protected void
writePDFToResponse(javax.faces.context.ExternalContext externalContext, ByteArrayOutputStream baos, String fileName)
-
Methods inherited from class org.primefaces.extensions.component.exporter.Exporter
addColumnValues, exportColumnByFunction, exportFacetValue, exportValue, getColumnsCount, getColumnsCount, getColumnsToExport, hasFooterColumn, hasHeaderColumn, hasHeaderColumn, setSkipComponents
-
-
-
-
Method Detail
-
export
public void export(javax.faces.event.ActionEvent event, String tableId, javax.faces.context.FacesContext context, String filename, String tableTitle, boolean pageOnly, boolean selectionOnly, String encodingType, javax.el.MethodExpression preProcessor, javax.el.MethodExpression postProcessor, boolean subTable) throws IOException
- Specified by:
export
in classExporter
- Throws:
IOException
-
exportPDFTable
protected com.lowagie.text.pdf.PdfPTable exportPDFTable(javax.faces.context.FacesContext context, org.primefaces.component.datatable.DataTable table, boolean pageOnly, boolean selectionOnly, String encoding, boolean subTable)
-
exportPDFTable
protected com.lowagie.text.pdf.PdfPTable exportPDFTable(javax.faces.context.FacesContext context, org.primefaces.component.datalist.DataList list, boolean pageOnly, String encoding)
-
exportPageOnly
protected void exportPageOnly(javax.faces.context.FacesContext context, org.primefaces.component.datatable.DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable)
-
exportPageOnly
protected String exportPageOnly(int first, org.primefaces.component.datalist.DataList list, int rowsToExport, StringBuilder input)
-
exportSelectionOnly
protected void exportSelectionOnly(javax.faces.context.FacesContext context, org.primefaces.component.datatable.DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable)
-
exportAll
protected void exportAll(javax.faces.context.FacesContext context, org.primefaces.component.datatable.DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable)
-
subTableExportAll
protected void subTableExportAll(javax.faces.context.FacesContext context, org.primefaces.component.subtable.SubTable table, com.lowagie.text.pdf.PdfPTable pdfTable)
-
exportAll
protected String exportAll(org.primefaces.component.datalist.DataList list, int rowCount, StringBuilder input)
-
tableFacet
protected void tableFacet(javax.faces.context.FacesContext context, com.lowagie.text.pdf.PdfPTable pdfTable, org.primefaces.component.datatable.DataTable table, int columnCount, String facetType)
-
tableFacet
protected void tableFacet(javax.faces.context.FacesContext context, com.lowagie.text.pdf.PdfPTable pdfTable, org.primefaces.component.subtable.SubTable table, int columnCount, String facetType)
-
tableColumnGroup
protected void tableColumnGroup(com.lowagie.text.pdf.PdfPTable pdfTable, org.primefaces.component.datatable.DataTable table, String facetType)
-
tableColumnGroup
protected void tableColumnGroup(com.lowagie.text.pdf.PdfPTable pdfTable, org.primefaces.component.subtable.SubTable table, String facetType)
-
exportRow
protected void exportRow(org.primefaces.component.datatable.DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, int rowIndex)
-
subTableExportRow
protected void subTableExportRow(org.primefaces.component.subtable.SubTable table, com.lowagie.text.pdf.PdfPTable pdfTable, int rowIndex)
-
exportCells
protected void exportCells(org.primefaces.component.datatable.DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable)
-
subTableExportCells
protected void subTableExportCells(org.primefaces.component.subtable.SubTable table, com.lowagie.text.pdf.PdfPTable pdfTable)
-
addColumnFacets
protected void addColumnFacets(org.primefaces.component.datatable.DataTable table, com.lowagie.text.pdf.PdfPTable pdfTable, Exporter.ColumnType columnType)
-
addColumnFacets
protected void addColumnFacets(org.primefaces.component.subtable.SubTable table, com.lowagie.text.pdf.PdfPTable pdfTable, Exporter.ColumnType columnType)
-
addColumnValue
protected void addColumnValue(com.lowagie.text.pdf.PdfPTable pdfTable, javax.faces.component.UIComponent component, com.lowagie.text.Font font, String columnType)
-
addColumnValue
protected void addColumnValue(com.lowagie.text.pdf.PdfPTable pdfTable, List<javax.faces.component.UIComponent> components, com.lowagie.text.Font font, String columnType, org.primefaces.component.api.UIColumn column)
-
addColumnAlignments
protected com.lowagie.text.pdf.PdfPCell addColumnAlignments(javax.faces.component.UIComponent component, com.lowagie.text.pdf.PdfPCell cell)
-
addFacetAlignments
protected com.lowagie.text.pdf.PdfPCell addFacetAlignments(javax.faces.component.UIComponent component, com.lowagie.text.pdf.PdfPCell cell)
-
customFormat
public void customFormat(String facetBackground, String facetFontSize, String facetFontColor, String facetFontStyle, String fontName, String cellFontSize, String cellFontColor, String cellFontStyle, String datasetPadding, String orientation)
- Specified by:
customFormat
in classExporter
-
createCustomFonts
protected void createCustomFonts(String encoding)
-
writePDFToResponse
protected void writePDFToResponse(javax.faces.context.ExternalContext externalContext, ByteArrayOutputStream baos, String fileName) throws IOException, com.lowagie.text.DocumentException
- Throws:
IOException
com.lowagie.text.DocumentException
-
-