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.
|
ICssApplierFactory |
getCssApplierFactory()
Gets the CSS applier factory.
|
com.itextpdf.kernel.counter.event.IMetaInfo |
getEventCountingMetaInfo()
Gets html meta info.
|
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 |
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 |
setCreateAcroForm(boolean createAcroForm)
Sets the createAcroForm value.
|
ConverterProperties |
setCssApplierFactory(ICssApplierFactory cssApplierFactory)
Sets the CSS applier factory.
|
ConverterProperties |
setEventCountingMetaInfo(com.itextpdf.kernel.counter.event.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 |
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
instance
public 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 description
ConverterProperties
instance
public 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 provider
ConverterProperties
instance
public int getLimitOfLayouts()
public ConverterProperties setLimitOfLayouts(int limitOfLayouts)
limitOfLayouts
- layouts limit
ConverterProperties
instance
public 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 TagWorkerFactory
ConverterProperties
instance
public 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 factory
ConverterProperties
instance
public 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 URI
ConverterProperties
instance
public 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 retriever
ConverterProperties
instance
public 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.
createAcroForm
- true if an AcroForm needs to be created
ConverterProperties
instance
public 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 handler
ConverterProperties
instance
public 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 charset
ConverterProperties
instance
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 value
ConverterProperties
instance
public com.itextpdf.kernel.counter.event.IMetaInfo getEventCountingMetaInfo()
This meta info will be passed with to EventCounter
with PdfHtmlEvent
and can be used to determine event origin.
IMetaInfo
public ConverterProperties setEventCountingMetaInfo(com.itextpdf.kernel.counter.event.IMetaInfo metaInfo)
This meta info will be passed with to EventCounter
with PdfHtmlEvent
and can be used to determine event origin.
metaInfo
- meta info to set
ConverterProperties
instance
Copyright © 1998–2021 iText Group NV. All rights reserved.