public class ConverterProperties extends Object
HtmlConverter.| Constructor and Description |
|---|
ConverterProperties()
Instantiates a new
ConverterProperties instance. |
ConverterProperties(ConverterProperties other)
Instantiates a new
ConverterProperties instance based on another ConverterProperties instance
(copy constructor). |
| Modifier and Type | Method and Description |
|---|---|
String |
getBaseUri()
Gets the base URI.
|
String |
getCharset()
Gets the encoding charset.
|
com.itextpdf.kernel.pdf.PdfAConformanceLevel |
getConformanceLevel()
Gets the generation and strictness level of the PDF/A that must be followed.
|
ICssApplierFactory |
getCssApplierFactory()
Gets the CSS applier factory.
|
com.itextpdf.kernel.pdf.PdfOutputIntent |
getDocumentOutputIntent()
Gets pdf document output intent (final destination device) to reproduce the color in the PDF.
|
com.itextpdf.layout.font.FontProvider |
getFontProvider()
Gets the font provider.
|
int |
getLimitOfLayouts()
Gets maximum number of layouts.
|
com.itextpdf.styledxmlparser.css.media.MediaDeviceDescription |
getMediaDeviceDescription()
Gets the media device description.
|
OutlineHandler |
getOutlineHandler()
Gets the outline handler.
|
com.itextpdf.styledxmlparser.resolver.resource.IResourceRetriever |
getResourceRetriever()
Gets the resource retriever.
|
ITagWorkerFactory |
getTagWorkerFactory()
Gets the TagWorkerFactory instance.
|
boolean |
isContinuousContainerEnabled()
check if continuous container is enabled.
|
boolean |
isCreateAcroForm()
Check if the createAcroForm flag is set.
|
boolean |
isImmediateFlush()
Checks if immediateFlush is set.
|
ConverterProperties |
setBaseUri(String baseUri)
Sets the base URI.
|
ConverterProperties |
setCharset(String charset)
Sets the encoding charset.
|
ConverterProperties |
setContinuousContainerEnabled(boolean value)
Sets continuous container support.
|
ConverterProperties |
setCreateAcroForm(boolean createAcroForm)
Sets the createAcroForm value.
|
ConverterProperties |
setCssApplierFactory(ICssApplierFactory cssApplierFactory)
Sets the CSS applier factory.
|
ConverterProperties |
setDocumentOutputIntent(com.itextpdf.kernel.pdf.PdfOutputIntent outputIntent)
Sets pdf document output intent (final destination device) to reproduce the color in the PDF.
|
ConverterProperties |
setEventMetaInfo(com.itextpdf.commons.actions.contexts.IMetaInfo metaInfo)
Sets html meta info.
|
ConverterProperties |
setFontProvider(com.itextpdf.layout.font.FontProvider fontProvider)
Sets the font provider.
|
ConverterProperties |
setImmediateFlush(boolean immediateFlush)
Set the immediate flush property of the layout document.
|
ConverterProperties |
setLimitOfLayouts(int limitOfLayouts)
Sets maximum number of layouts.
|
ConverterProperties |
setMediaDeviceDescription(com.itextpdf.styledxmlparser.css.media.MediaDeviceDescription mediaDeviceDescription)
Sets the media device description.
|
ConverterProperties |
setOutlineHandler(OutlineHandler outlineHandler)
Sets the outline handler.
|
ConverterProperties |
setPdfAConformanceLevel(com.itextpdf.kernel.pdf.PdfAConformanceLevel conformanceLevel)
Sets the generation and strictness level of the PDF/A that must be followed.
|
ConverterProperties |
setResourceRetriever(com.itextpdf.styledxmlparser.resolver.resource.IResourceRetriever resourceRetriever)
Sets the resource retriever.
|
ConverterProperties |
setTagWorkerFactory(ITagWorkerFactory tagWorkerFactory)
Sets the TagWorkerFactory.
|
public ConverterProperties()
ConverterProperties instance.public ConverterProperties(ConverterProperties other)
ConverterProperties instance based on another ConverterProperties instance
(copy constructor).other - the other ConverterProperties instancepublic com.itextpdf.styledxmlparser.css.media.MediaDeviceDescription getMediaDeviceDescription()
The properties of the multimedia device are taken into account when creating the SVG and when processing the properties of the СSS.
public ConverterProperties setMediaDeviceDescription(com.itextpdf.styledxmlparser.css.media.MediaDeviceDescription mediaDeviceDescription)
The properties of the multimedia device are taken into account when creating the SVG and when processing the properties of the СSS.
mediaDeviceDescription - the media device descriptionConverterProperties instancepublic com.itextpdf.layout.font.FontProvider getFontProvider()
Please note that FontProvider instances cannot be reused across several documents
and thus as soon as you set this property, this ConverterProperties instance becomes only useful
for a single HTML conversion.
public ConverterProperties setFontProvider(com.itextpdf.layout.font.FontProvider fontProvider)
Please note that FontProvider instances cannot be reused across several documents
and thus as soon as you set this property, this ConverterProperties instance becomes only useful
for a single HTML conversion.
fontProvider - the font providerConverterProperties instancepublic int getLimitOfLayouts()
public ConverterProperties setLimitOfLayouts(int limitOfLayouts)
limitOfLayouts - layouts limitConverterProperties instancepublic ITagWorkerFactory getTagWorkerFactory()
The tagWorkerFactory is used to create ITagWorker, which in turn
are used to convert the HTML tags to the PDF elements.
public ConverterProperties setTagWorkerFactory(ITagWorkerFactory tagWorkerFactory)
The tagWorkerFactory is used to create ITagWorker, which in turn
are used to convert the HTML tags to the PDF elements.
tagWorkerFactory - the TagWorkerFactoryConverterProperties instancepublic ICssApplierFactory getCssApplierFactory()
The cssApplierFactory is used to create ICssApplier, which in turn
are used to convert the CSS properties to the PDF properties.
public ConverterProperties setCssApplierFactory(ICssApplierFactory cssApplierFactory)
The cssApplierFactory is used to create ICssApplier, which in turn
are used to convert the CSS properties to the PDF properties.
cssApplierFactory - the CSS applier factoryConverterProperties instancepublic String getBaseUri()
Base URI is used to resolve other URI.
public ConverterProperties setBaseUri(String baseUri)
Base URI is used to resolve other URI.
baseUri - the base URIConverterProperties instancepublic com.itextpdf.styledxmlparser.resolver.resource.IResourceRetriever getResourceRetriever()
The resourceRetriever is used to retrieve data from resources by URL.
public ConverterProperties setResourceRetriever(com.itextpdf.styledxmlparser.resolver.resource.IResourceRetriever resourceRetriever)
The resourceRetriever is used to retrieve data from resources by URL.
resourceRetriever - the resource retrieverConverterProperties instancepublic boolean isCreateAcroForm()
If createAcroForm is set, then when the form is encountered in HTML, AcroForm will be created, otherwise a visually identical, but not functional element will be created. Please bare in mind that the created Acroform may visually differ a bit from the HTML one.
public ConverterProperties setCreateAcroForm(boolean createAcroForm)
If createAcroForm is set, then when the form is encountered in HTML, AcroForm will be created, otherwise a visually identical, but not functional element will be created. Please bare in mind that the created Acroform may visually differ a bit from the HTML one.
When enabling this acroform creation, it will disable the immediateFlushing property.
createAcroForm - true if an AcroForm needs to be createdConverterProperties instancepublic OutlineHandler getOutlineHandler()
If outlineHandler is specified, then outlines will be created in the PDF for HTML tags specified in outlineHandler.
Please note that OutlineHandler is not thread safe, thus
as soon as you have set this property, this ConverterProperties instance cannot be used in
converting multiple HTMLs simultaneously.
public ConverterProperties setOutlineHandler(OutlineHandler outlineHandler)
If outlineHandler is specified, then outlines will be created in the PDF for HTML tags specified in outlineHandler.
Please note that OutlineHandler is not thread safe, thus
as soon as you have set this property, this ConverterProperties instance cannot be used in
converting multiple HTMLs simultaneously.
outlineHandler - the outline handlerConverterProperties instancepublic String getCharset()
Charset is used to correctly decode an HTML file.
public ConverterProperties setCharset(String charset)
Charset is used to correctly decode an HTML file.
charset - the charsetConverterProperties instancepublic ConverterProperties setDocumentOutputIntent(com.itextpdf.kernel.pdf.PdfOutputIntent outputIntent)
Note, output intent isn't applicable for HtmlConverter#convertToElements methods
(e.g. HtmlConverter.convertToElements(InputStream, ConverterProperties))
outputIntent - a PdfOutputIntent instanceConverterProperties instancepublic ConverterProperties setPdfAConformanceLevel(com.itextpdf.kernel.pdf.PdfAConformanceLevel conformanceLevel)
conformanceLevel - a PdfAConformanceLevel constantConverterProperties instancepublic com.itextpdf.kernel.pdf.PdfOutputIntent getDocumentOutputIntent()
Note, output intent isn't applicable for HtmlConverter#convertToElements methods
(e.g. HtmlConverter.convertToElements(InputStream, ConverterProperties))
public com.itextpdf.kernel.pdf.PdfAConformanceLevel getConformanceLevel()
public boolean isImmediateFlush()
This is used for HtmlConverter.convertToDocument(java.lang.String, com.itextpdf.kernel.pdf.PdfWriter) methods and will be
overwritten to false if a page-counter declaration is present in the CSS of the HTML being converted.
Has no effect when used in conjunction with HtmlConverter.convertToPdf(java.lang.String, java.io.OutputStream)
or HtmlConverter.convertToElements(java.lang.String).
public ConverterProperties setImmediateFlush(boolean immediateFlush)
This is used for HtmlConverter.convertToDocument(java.lang.String, com.itextpdf.kernel.pdf.PdfWriter) methods and will be
overwritten to false if a page-counter declaration is present in the CSS of the HTML being converted.
Has no effect when used in conjunction with HtmlConverter.convertToPdf(java.lang.String, java.io.OutputStream)
or HtmlConverter.convertToElements(java.lang.String).
immediateFlush - the immediate flush valueConverterProperties instancepublic ConverterProperties setEventMetaInfo(com.itextpdf.commons.actions.contexts.IMetaInfo metaInfo)
This meta info will be used to determine event origin.
metaInfo - meta info to setConverterProperties instancepublic boolean isContinuousContainerEnabled()
public ConverterProperties setContinuousContainerEnabled(boolean value)
value - true to set continuous container, false otherwiseConverterProperties instanceCopyright © 1998–2024 Apryse Group NV. All rights reserved.