public class ProcessHtml extends ProcessReport implements ProcessHtmlAPI
ProcessReport.CleanDatasource, ProcessReport.DrillDownTemplate, ProcessReport.PhoneHomeStatsNUM_HOURS_BETWEEN_LICENSE_CHECK_INS, NUM_HOURS_BETWEEN_LICENSE_CHECK_INS_PREV_FAILED, TEMPLATE_TYPE_DOCM, TEMPLATE_TYPE_DOCX, TEMPLATE_TYPE_HTML, TEMPLATE_TYPE_PPTM, TEMPLATE_TYPE_PPTX, TEMPLATE_TYPE_UNKNOWN, TEMPLATE_TYPE_XLSM, TEMPLATE_TYPE_XLSXCSS_EXISTS, CSS_INCLUDE, CSS_NO, CSS_SEPARATE, HTML_2, HTML_4_1, IE5, IE5_5, IE6, XHTMLCHARSET_DEFAULT, CHARSET_RTF, CHARSET_UNICODE, COPY_METADATA_ALWAYS, COPY_METADATA_IF_NO_DATASOURCE, COPY_METADATA_NEVER, DATA_MODE_ALL_ATTRIBUTES, DATA_MODE_DATA, DATA_MODE_EMBED, DATA_MODE_INCLUDE_BITMAPS, DATA_MODE_SELECT, ERROR_HANDLING_ALL, ERROR_HANDLING_NONE, ERROR_HANDLING_ONLY, ERROR_HANDLING_TRACK_ERRORS, ERROR_HANDLING_VERIFY, HIDDEN_IGNORE_PRINT_RANGE, HIDDEN_SHOW_ALL_ROWS_COLUMNS, HIDDEN_SHOW_HIDDEN_SHEETS, HIDDEN_SHOW_NO_PRINT, HYPHENATE_OFF, HYPHENATE_ON, HYPHENATE_TEMPLATE, LOCALE_DEFAULT, LOCALE_SYSTEM, MODE_PROCESS_EMBEDDED_ALWAYS, MODE_PROCESS_EMBEDDED_COPY, MODE_PROCESS_EMBEDDED_DROP, MODE_PROCESS_EMBEDDED_IF_DATA_APPLIED, MODE_PROCESS_EMBEDDED_KEEP_ORIGINAL_SCREENSHOT, RENDER_EXTENT_ALL, RENDER_EXTENT_CROP_EVERYTHING, RENDER_EXTENT_CROP_HEADER_AND_FOOTER, RENDER_EXTENT_CROP_MARGINS, RENDER_EXTENT_CROP_TO_CONTENT, TAG_STYLE_FIELD, TAG_STYLE_FIELD_2007, TAG_STYLE_TEXT, TYP_CSV, TYP_DOCX, TYP_HTML, TYP_IMAGE, TYP_PDF, TYP_PPTX, TYP_PRINTER, TYP_PS, TYP_RTF, TYP_TXT, TYP_XLSX| Constructor and Description |
|---|
ProcessHtml(java.io.InputStream template)
Create a ProcessHtml object with the passed in template.
|
ProcessHtml(java.io.InputStream template,
java.util.ArrayList<java.io.ByteArrayOutputStream> reportPages)
Create a ProcessHtml object with the passed in template.
|
ProcessHtml(java.io.InputStream xmlData,
java.io.InputStream template,
java.util.ArrayList<java.io.ByteArrayOutputStream> reportPages)
Create a ProcessReport object with the passed in template & data streams.
|
ProcessHtml(java.io.InputStream xmlData,
java.io.InputStream template,
java.io.OutputStream report)
Create a ProcessReport object with the passed in template & data streams, writing it to
the passed in report stream.
|
ProcessHtml(java.io.InputStream template,
java.io.OutputStream report)
Create a ProcessHtml object with the passed in template, writing it to the passed in report stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addImageName(HtmlImage img)
Deprecated.
This will be eliminated - use embedded images.
|
void |
addImageNames(java.util.ArrayList<HtmlImage> imgs)
Deprecated.
This will be eliminated - use embedded images.
|
ProcessReportAPIBase |
duplicate(java.io.OutputStream out)
Creates and returns a copy of this object.
|
ProcessHtmlAPI |
duplicate(java.io.OutputStream out,
java.io.OutputStream cssStream)
Creates and returns a copy of this object.
|
java.lang.String |
getCssFilename()
Returns the css filename.
|
java.io.OutputStream |
getCssStream()
Returns the css stream.
|
int |
getCssType()
Returns if the css information will be written to a separate file, as part of the html file,
or skipped (because the file already exists).
|
java.lang.String |
getFilePath()
Get the path that all images will be saved to on the disk.
|
java.lang.String |
getFilePrefix()
Get the prefix that will be part of the filename of all images saved to disk and listed
in the html file.
|
boolean |
getHeadersFooters()
Deprecated.
This will be eliminated.
|
java.lang.String |
getHtmlPath()
Get the path that all images will be prefixed with in the html file.
|
java.util.ArrayList<HtmlImage> |
getImageNames()
Get the image names/streams for the images in a report.
|
java.util.ArrayList<java.io.ByteArrayOutputStream> |
getPages()
Get the array of OutputStreams representing each page in this generated HTML document if html.split_pages is set.
|
byte[][] |
getPagesByteArrays()
Get an array of pages where each page is represented by a byte array (for easy file output).
|
int |
getReportType()
Get the report format of the output stream.
|
java.lang.String |
getReportTypeString()
Get the report format of the output as a string.
|
int |
getSpec()
Deprecated.
We have never used this inside the engine. Use getProperties(HTML_SET_XHTML) for XHTML output.
|
boolean |
getUseTemplatePageWidth()
Deprecated.
This will be eliminated. Use getProperties(REPORT_RENDER_EXTENT) instead.
|
boolean |
isEmbedImages()
When set to true, tells the engine to embed all images in the HTML file
instead of using separate image files; more information found on
Wikipedia: http://en.wikipedia.org/wiki/Data_URI_scheme
|
boolean |
isFullFile()
The report can be generated as either a complete html file, or as just the body.
|
boolean |
isHeaders()
Deprecated.
This will be replaced by getProperties(REPORT_RENDER_EXTENT)
|
boolean |
isIE()
Deprecated.
We have never used this inside the engine.
|
boolean |
isPageBasedReport()
true if the generated report is page based.
|
boolean |
isSplitPages()
When set to true, tells the engine to split HTML output into multiple
documents, one for each page of the document.
|
static boolean |
isSplitPagesFromProperties()
Deprecated.
There is no global value for this now.
|
void |
process()
Create a report from the input template and datasource(s) streams, writing it to the output (report) stream.
|
void |
setCss(int cssMethod,
java.io.OutputStream cssStream,
java.lang.String cssFileName)
Sets if the css information will be written to a separate file, as part of the html file,
or skipped (because the file already exists).
|
void |
setEmbededDataMode(int mode)
Set the embed data setting.
|
void |
setEmbedImages(boolean setEmbedImages)
When set to true, tells the engine to embed all images in the HTML file
instead of using separate image files; more information found on
Wikipedia: http://en.wikipedia.org/wiki/Data_URI_scheme
|
void |
setFullFile(boolean fullDoc)
The report can be generated as either a complete html file, or as just the body.
|
void |
setHeadersFooters(boolean headerOn)
Deprecated.
This will be eliminated.
|
void |
setImagePath(java.lang.String file,
java.lang.String html,
java.lang.String prefix)
Set a path that all images will be saved to.
|
void |
setSpec(int spec)
Deprecated.
We have never used this inside the engine. Use getProperties(HTML_SET_XHTML) for XHTML output.
|
void |
setSplitPages(boolean setSplitPages)
When set to true, tells the engine to split HTML output into multiple
documents, one for each page of the document.
|
void |
setUseTemplatePageWidth(boolean setUsePageWidth)
Deprecated.
This will be eliminated. Use getProperties(REPORT_RENDER_EXTENT) instead.
|
abort, addImportInfo, adjustFontName, adjustFontSize, applyLicenseKey, batchNext, batchSetup, buildSchema, checkTimeout, clean, clean, clean, cleanSelects, cleanSelects, close, findPodsUsed, getBaseDirectory, getCharset, getChartProvider, getChartRenderType, getCompany, getCopyMetadata, getDataMode, getDataStream, getDataWriter, getDebugHandler, getDescription, getDrillDownInfo, getErrorInfo, getEventHandler, getHiddenMode, getHyphenate, getImportInfo, getKeywords, getLocale, getMaxReportPages, getModeProcessEmbedded, getNumPages, getOutputBuilderData, getParameters, getProperties, getRenderExtent, getRenderPages, getReport, getSubject, getTagTree, getTemplateMetrics, getTemplateMetrics, getTemplateMetrics, getTemplateMetrics, getTemplateTypeString, getTemplateVersion, getTimeout, getTitle, getVersion, getVersionMajor, getVersionMinor, getVersionRelease, getWriteTags, hasDatasourcesApplied, hasProcessedTags, init, isDebugMode, isIgnoreTags, isLayoutDocument, isPreservePodFraming, isRemoveUnusedFormats, isReportTypeDocx, isReportTypeExcel, isReportTypeOpenXml, isReportTypePpt, isReportTypeWord, isSameOpenXml, isTemplateTypeDOCX, isTemplateTypeEqualsReportType, isTemplateTypeOpenXml, isTemplateTypePPTX, isTemplateTypeXLSX, isTrackImports, isUseExternalOutputBuilder, loadTemplate, mergePodItemStyles, performLayout, processComplete, processComplete, processData, processData, processSetup, processSetup, setBaseDirectory, setCharset, setCopyMetadata, setDataMode, setDataStream, setDebugHandler, setDebugMode, setDescription, setDrillDownInfo, setEventHandler, setHiddenMode, setHyphenate, setIgnoreTags, setKeywords, setLayoutDocument, setLicense, setLocale, setModeProcessEmbedded, setOutputBuilder, setOutputBuilderData, setParameters, setPreservePodFraming, setRemoveUnusedFormats, setRenderExtent, setRenderPages, setSubject, setTemplateVersion, setTimeout, setTitle, setTrackErrors, setTrackImports, setUseExternalOutputBuilder, setWriteTags, shutdown, statBanner, statLine, updatePodsequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbatchNext, batchSetup, buildSchema, close, findPodsUsed, getBaseDirectory, getCharset, getCopyMetadata, getDataMode, getDataStream, getDescription, getDrillDownInfo, getErrorInfo, getEventHandler, getHiddenMode, getHyphenate, getImportInfo, getKeywords, getLocale, getModeProcessEmbedded, getNumPages, getOutputBuilderData, getParameters, getProperties, getRenderExtent, getRenderPages, getReport, getSubject, getTemplateVersion, getTimeout, getTitle, getWriteTags, hasProcessedTags, isDebugMode, isLayoutDocument, isPreservePodFraming, isRemoveUnusedFormats, isReportTypeExcel, isReportTypeWord, isTrackImports, isUseExternalOutputBuilder, processComplete, processData, processData, processSetup, processSetup, setBaseDirectory, setCharset, setCopyMetadata, setDataMode, setDataStream, setDebugMode, setDescription, setDrillDownInfo, setEventHandler, setHiddenMode, setHyphenate, setKeywords, setLayoutDocument, setLicense, setLocale, setModeProcessEmbedded, setOutputBuilderData, setParameters, setPreservePodFraming, setRemoveUnusedFormats, setRenderExtent, setRenderPages, setSubject, setTemplateVersion, setTimeout, setTitle, setTrackErrors, setTrackImports, setUseExternalOutputBuilder, setWriteTags, updatePodspublic ProcessHtml(java.io.InputStream template)
throws LicenseException,
SetupException
template - The report template.LicenseException - thrown if the license licenseKey check fails. The message will list the license check that failed.SetupExceptionpublic ProcessHtml(java.io.InputStream template,
java.io.OutputStream report)
throws LicenseException,
SetupException
template - The report template.report - The stream to write the report to.LicenseException - thrown if the license licenseKey check fails. The message will list the license check that failed.java.lang.IllegalArgumentException - thrown if html.split_pages is set;
call ProcessHtml(InputStream, ArrayListSetupExceptionpublic ProcessHtml(java.io.InputStream template,
java.util.ArrayList<java.io.ByteArrayOutputStream> reportPages)
throws LicenseException,
SetupException
template - The report templatereportPages - The array of streams to write pages to.LicenseExceptionSetupExceptionpublic ProcessHtml(java.io.InputStream xmlData,
java.io.InputStream template,
java.io.OutputStream report)
throws java.lang.IllegalArgumentException,
DataConnectionException,
LicenseException,
SetupException
xmlData - The xml data that will be placed into the report where there are xml elements.template - The report template.report - The stream to write the report to.java.lang.IllegalArgumentException - thrown if an illegal argument is given, or if html.split_pages is enabled. If
split_pages is enabled, use ProcessHtml(InputStream, ArrayListDataSourceException - thrown if there is a problem with the datasource.LicenseException - thrown if the license licenseKey check fails. The message will list the license check that failed.DataConnectionExceptionSetupExceptionpublic ProcessHtml(java.io.InputStream xmlData,
java.io.InputStream template,
java.util.ArrayList<java.io.ByteArrayOutputStream> reportPages)
throws DataConnectionException,
LicenseException,
SetupException
xmlData - The xml data that will be placed into the report where there are xml elements.template - The report templatereportPages - The array of streams to write pages to.DataConnectionException - thrown if there is a problem with the datasource.LicenseException - thrown if the license licenseKey check fails. The message will list the license check
that failed.SetupExceptionpublic ProcessReportAPIBase duplicate(java.io.OutputStream out) throws AlreadyProcessedException, LicenseException, SetupException
duplicate in interface ProcessReportAPIBaseout - The stream to write the report to. If null will create a ByteArrayOutputStream.AlreadyProcessedException - thrown if call the process steps out of order or call ones other than data twice.LicenseException - thrown if the license licenseKey check fails. The message will list the license check that failed.SetupExceptionpublic ProcessHtmlAPI duplicate(java.io.OutputStream out, java.io.OutputStream cssStream) throws AlreadyProcessedException, LicenseException, SetupException
duplicate in interface ProcessHtmlAPIout - The stream to write the report to. If null will create a ByteArrayOutputStream.cssStream - The css stream to write to. Can be null.AlreadyProcessedException - thrown if call the process steps out of order or call ones other than data twice.LicenseException - thrown if the license licenseKey check fails. The message will list the license check that failed.SetupExceptionpublic void process()
throws LicenseException,
java.io.IOException,
TemplateParseException,
java.lang.IllegalArgumentException,
TagException,
AlreadyProcessedException,
DataSourceException,
OutputLimitationException,
TinyException
process in interface ProcessReportAPIBaseprocess in class ProcessReportjava.io.IOException - thrown if have problems accessing the xml, template, or report streams.LicenseException - thrown if called too often for the license type.java.lang.IllegalArgumentException - thrown if come across an unknown element type or an illegal reportType value is used.TagException - thrown if there is an unmatched if/while - end. Not thrown in debug mode.AlreadyProcessedException - thrown if call process multiple times on an object.DataSourceException - thrown if there is a problem with the datasource.TemplateParseExceptionOutputLimitationExceptionTinyExceptionpublic void setEmbededDataMode(int mode)
mode - the embed data setting. You can only pass a 0.public boolean isIE()
public boolean isHeaders()
public boolean isPageBasedReport()
isPageBasedReport in interface ProcessReportAPIBaseisPageBasedReport in class ProcessReportpublic int getReportType()
getReportType in interface ProcessHtmlAPIgetReportType in interface ProcessReportAPIBasepublic java.lang.String getReportTypeString()
getReportTypeString in interface ProcessReportAPIBasepublic void addImageName(HtmlImage img)
addImageName in interface ProcessHtmlAPIimg - The image to add to the list of images for this file.java.lang.IllegalArgumentException - Thrown if setImageName(s) already calledpublic void addImageNames(java.util.ArrayList<HtmlImage> imgs)
addImageNames in interface ProcessHtmlAPIimgs - The images to add to the list of images for this file.java.lang.IllegalArgumentException - Thrown if setImageName(s) already calledpublic void setImagePath(java.lang.String file,
java.lang.String html,
java.lang.String prefix)
The path can be just a series of folders like "c:/dir1/dir2/" or it can include the begining of the filename like "c:/dir1/dir2/tmp". The first will create the file "c:/dir1/dir2/00001.jpg" while the second will create the file "c:/dir1/dir2/tmp00001.jpg".
Note: file and prefix should not end with a /
Note: as Windward Reports has no idea when the created file is no longer needed, it will not delete any files created.
Note: The path seperator should be /, not \ (to work on unix and windows).
setImagePath in interface ProcessHtmlAPIfile - The path of the file on the disk relative to the default directory of your program. It can be
an absolute path.
If it's null, images won't be written. You'll need to call getImageNames to obtain a list of images and write them to the disk yourself.
html - The path of the file relative to the default directory of the client browser.prefix - The prefix to use when creating the filename. This can be null.java.lang.IllegalArgumentException - Thrown if addImageName(s) already calledpublic java.lang.String getFilePath()
getFilePath in interface ProcessHtmlAPIpublic java.lang.String getHtmlPath()
getHtmlPath in interface ProcessHtmlAPIpublic java.lang.String getFilePrefix()
getFilePrefix in interface ProcessHtmlAPIpublic java.util.ArrayList<HtmlImage> getImageNames()
getImageNames in interface ProcessHtmlAPIpublic java.util.ArrayList<java.io.ByteArrayOutputStream> getPages()
public byte[][] getPagesByteArrays()
public void setFullFile(boolean fullDoc)
setFullFile in interface ProcessHtmlAPIfullDoc - Set to true to return a complete html file, false otherwise.public boolean isFullFile()
isFullFile in interface ProcessHtmlAPIpublic void setCss(int cssMethod,
java.io.OutputStream cssStream,
java.lang.String cssFileName)
throws java.lang.IllegalArgumentException
setCss in interface ProcessHtmlAPIcssMethod - Must be one of the values CSS_NO, CSS_INCLUDE, CSS_SEPARATE, or CSS_EXISTS.cssStream - The stream to write the css file to. This can (and must) only be set if cssMethod
is CSS_SEPARATE. This file will always be the same every time a given template is run so it can be
generated the first time and just reused without being regenerated after that.cssFileName - The name of the file when cssMethod is CSS_SEPARATE or CSS_EXISTS. This is
only needed if the report will write the full file. Set to "" or null for other methods.java.lang.IllegalArgumentException - Thrown if an illegal reportType value is passed in.public int getCssType()
getCssType in interface ProcessHtmlAPIpublic java.lang.String getCssFilename()
getCssFilename in interface ProcessHtmlAPIpublic java.io.OutputStream getCssStream()
getCssStream in interface ProcessHtmlAPIpublic void setSpec(int spec)
throws java.lang.IllegalArgumentException
setSpec in interface ProcessHtmlAPIspec - Must be one of the spec final int's from this class: HTML*, NN*, IE*, ...java.lang.IllegalArgumentException - Thrown if an illegal spec value is passed in.public int getSpec()
getSpec in interface ProcessHtmlAPIpublic void setHeadersFooters(boolean headerOn)
setHeadersFooters in interface ProcessHtmlAPIheaderOn - true=on false=off, off by defaultpublic boolean getHeadersFooters()
getHeadersFooters in interface ProcessHtmlAPIpublic void setUseTemplatePageWidth(boolean setUsePageWidth)
setUseTemplatePageWidth in interface ProcessHtmlAPIsetUsePageWidth - true=on false=off, on by defaultpublic boolean getUseTemplatePageWidth()
getUseTemplatePageWidth in interface ProcessHtmlAPIpublic boolean isEmbedImages()
isEmbedImages in interface ProcessHtmlAPIpublic void setEmbedImages(boolean setEmbedImages)
setEmbedImages in interface ProcessHtmlAPIsetEmbedImages - true=embed images; false=separate images, on by defaultpublic boolean isSplitPages()
isSplitPages in interface ProcessHtmlAPIpublic static boolean isSplitPagesFromProperties()
public void setSplitPages(boolean setSplitPages)
setSplitPages in interface ProcessHtmlAPIsetSplitPages - true=split pages; false=produce one full documentCopyright © 2020 Windward Studios - All Rights Reserved. We are java reporting and document generation software