public class JRPptxExporter extends JRAbstractExporter<PptxReportConfiguration,PptxExporterConfiguration,OutputStreamExporterOutput,JRPptxExporterContext>
PptxReportConfiguration)
to configure its behavior: one can ignore hyperlinks in generated documents if they are
not intended for the PPTX output format. This can be customized using either the
isIgnoreHyperlink()
exporter configuration flag, or its corresponding exporter hint called
net.sf.jasperreports.export.pptx.ignore.hyperlink.
It supports font mappings, batch mode exporting, and filtering
out content using exporter filters.
Documents produced using this exporter can be generated in the great majority of the
samples shipped with the JasperReports project source files, where the pptx Ant task is
defined.PptxReportConfiguration| Modifier and Type | Class and Description |
|---|---|
protected class |
JRPptxExporter.ExporterContext |
JRAbstractExporter.BaseExporterContext, JRAbstractExporter.PageRangeallSelector, crtCompositeConfiguration, crtCompositeItemConfiguration, crtItem, dateFormatCache, EXCEPTION_MESSAGE_KEY_END_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_INVALID_IMAGE_NAME, EXCEPTION_MESSAGE_KEY_INVALID_ZOOM_RATIO, EXCEPTION_MESSAGE_KEY_MIXED_CALLS_NOT_ALLOWED, EXCEPTION_MESSAGE_KEY_OUTPUT_WRITER_ERROR, EXCEPTION_MESSAGE_KEY_PAGE_INDEX_OUT_OF_RANGE, EXCEPTION_MESSAGE_KEY_START_PAGE_INDEX_OUT_OF_RANGE, exporterConfiguration, exporterContext, exporterInput, exporterOutput, filter, fontUtil, itemConfiguration, jasperPrint, jasperReportsContext, noBackcolorSelector, noneSelector, numberFormatCache, parameters, propertiesUtil, PROPERTY_DEFAULT_FILTER_FACTORY, PROPERTY_SUFFIX_DEFAULT_FILTER_FACTORY, rendererUtil, styledTextUtil, textValueClasses| Constructor and Description |
|---|
JRPptxExporter() |
JRPptxExporter(JasperReportsContext jasperReportsContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeSlide() |
protected void |
createSlide(String name) |
protected void |
ensureOutput() |
protected void |
exportElements(List<JRPrintElement> elements) |
protected void |
exportEllipse(JRPrintEllipse ellipse) |
void |
exportFrame(JRPrintFrame frame) |
protected void |
exportGenericElement(JRGenericPrintElement element) |
void |
exportImage(JRPrintImage image) |
protected void |
exportLine(JRPrintLine line) |
protected void |
exportPage(JRPrintPage page) |
protected void |
exportRectangle(JRPrintRectangle rectangle) |
void |
exportReport()
Performs the export.
|
protected void |
exportReportToStream(OutputStream os) |
protected void |
exportStyledText(JRStyle style,
JRStyledText styledText,
Locale locale) |
void |
exportText(JRPrintText text) |
protected Class<PptxExporterConfiguration> |
getConfigurationInterface() |
protected JRPrintElementIndex |
getElementIndex() |
String |
getExporterKey() |
String |
getExporterPropertiesPrefix()
Returns the properties prefix for the current exporter.
|
protected String |
getHyperlinkTarget(JRPrintHyperlink link) |
protected String |
getHyperlinkURL(JRPrintHyperlink link) |
protected Class<PptxReportConfiguration> |
getItemConfigurationInterface() |
protected JRPen |
getPptxPen(JRLineBox box) |
static JRPrintElementIndex |
getPrintElementIndex(String imageName)
protected void writeImageMap(String imageMapName, JRPrintHyperlink mainHyperlink, List imageMapAreas)
{
writer.write("\n");
}
protected void writeImageAreaCoordinates(JRPrintImageArea area)
{
int[] coords = area.getCoordinates();
if (coords != null && coords.length > 0)
{
StringBuilder coordsEnum = new StringBuilder(coords.length * 4);
coordsEnum.append(coords[0]);
for (int i = 1; i < coords.length; i++)
{
coordsEnum.append(',');
coordsEnum.append(coords[i]);
}
writer.write(" coords=\"" + coordsEnum + "\"");
}
}
protected void writeImageAreaHyperlink(JRPrintHyperlink hyperlink)
{
String href = getHyperlinkURL(hyperlink);
if (href == null)
{
writer.write(" nohref=\"nohref\"");
}
else
{
writer.write(" href=\"" + href + "\"");
String target = getHyperlinkTarget(hyperlink);
if (target != null)
{
writer.write(" target=\"");
writer.write(target);
writer.write("\"");
}
}
if (hyperlink.getHyperlinkTooltip() != null)
{
writer.write(" title=\"");
writer.write(JRStringUtil.xmlEncode(hyperlink.getHyperlinkTooltip()));
writer.write("\"");
}
}
/**
|
protected void |
initExport() |
protected void |
initReport() |
protected String |
toOOXMLId(JRPrintElement element) |
createFilter, defaultParseNumber, ensureInput, ensureJasperReportsContext, getBooleanCellValue, getCurrentConfiguration, getCurrentItemConfiguration, getCurrentJasperPrint, getCustomHandler, getDateCellValue, getDateFormat, getExporterContext, getExporterInput, getExporterOutput, getHyperlinkProducer, getJasperReportsContext, getLocale, getNumberCellValue, getNumberFormat, getOffsetX, getOffsetY, getPageRange, getParameter, getParameters, getPropertiesUtil, getRendererUtil, getReportContext, getStyledText, getStyledText, getTextFormatFactoryClass, getTextLocale, getTextTimeZone, getTextValue, getTextValueString, insideFrame, reset, resetClassLoader, resetExportContext, restoreElementOffsets, setClassLoader, setConfiguration, setConfiguration, setCurrentExporterInputItem, setExporterInput, setExporterOutput, setFrameElementsOffset, setJasperPrint, setJasperReportsContext, setOffset, setOffset, setParameter, setParameters, setReportContextpublic static final String PPTX_EXPORTER_KEY
GenericElementHandlerEnviroment.getElementHandler(JRGenericElementType, String).protected static final String PPTX_EXPORTER_PROPERTIES_PREFIX
public static final String PROPERTY_IGNORE_HYPERLINK
PptxReportConfiguration.PROPERTY_IGNORE_HYPERLINK.protected static final String JR_PAGE_ANCHOR_PREFIX
public static final String IMAGE_NAME_PREFIX
protected static final int IMAGE_NAME_PREFIX_LEGTH
protected PptxZip pptxZip
protected PptxPresentationHelper presentationHelper
protected PptxPresentationRelsHelper presentationRelsHelper
protected PptxContentTypesHelper ctHelper
protected PptxSlideHelper slideHelper
protected PptxSlideRelsHelper slideRelsHelper
protected Writer presentationWriter
protected RenderersCache renderersCache
protected int reportIndex
protected int pageIndex
protected int elementIndex
protected boolean startPage
protected String invalidCharReplacement
protected int slideIndex
public JRPptxExporter()
JRPptxExporter(JasperReportsContext)public JRPptxExporter(JasperReportsContext jasperReportsContext)
protected Class<PptxExporterConfiguration> getConfigurationInterface()
protected Class<PptxReportConfiguration> getItemConfigurationInterface()
protected void ensureOutput()
public void exportReport()
throws JRException
ExporterexportReport in interface Exporter<ExporterInput,PptxReportConfiguration,PptxExporterConfiguration,OutputStreamExporterOutput>exportReport in class JRAbstractExporter<PptxReportConfiguration,PptxExporterConfiguration,OutputStreamExporterOutput,JRPptxExporterContext>JRExceptionprotected void initExport()
protected void initReport()
protected void exportReportToStream(OutputStream os) throws JRException, IOException
JRExceptionIOExceptionprotected void exportPage(JRPrintPage page) throws JRException
JRExceptionprotected void createSlide(String name)
protected void closeSlide()
protected void exportElements(List<JRPrintElement> elements) throws JRException
JRExceptionprotected void exportLine(JRPrintLine line)
protected void exportRectangle(JRPrintRectangle rectangle)
protected void exportEllipse(JRPrintEllipse ellipse)
public void exportText(JRPrintText text)
protected void exportStyledText(JRStyle style, JRStyledText styledText, Locale locale)
public void exportImage(JRPrintImage image) throws JRException
JRExceptionprotected JRPrintElementIndex getElementIndex()
public static JRPrintElementIndex getPrintElementIndex(String imageName)
public void exportFrame(JRPrintFrame frame) throws JRException
JRExceptionprotected void exportGenericElement(JRGenericPrintElement element)
protected String getHyperlinkTarget(JRPrintHyperlink link)
protected String getHyperlinkURL(JRPrintHyperlink link)
public String getExporterKey()
public String getExporterPropertiesPrefix()
JRAbstractExportergetExporterPropertiesPrefix in class JRAbstractExporter<PptxReportConfiguration,PptxExporterConfiguration,OutputStreamExporterOutput,JRPptxExporterContext>protected String toOOXMLId(JRPrintElement element)
Copyright © 2017. All rights reserved.