Package com.itextpdf.svg.processors.impl
Class SvgConverterProperties
- java.lang.Object
-
- com.itextpdf.svg.processors.impl.SvgConverterProperties
-
- All Implemented Interfaces:
ISvgConverterProperties
public class SvgConverterProperties extends java.lang.Object implements ISvgConverterProperties
Default and fallback implementation ofISvgConverterProperties
forDefaultSvgProcessor
.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
baseUri
The base URI.private java.lang.String
charset
private FontProvider
fontProvider
The font provider.private MediaDeviceDescription
mediaDeviceDescription
The media device description.private ISvgNodeRendererFactory
rendererFactory
private IResourceRetriever
resourceRetriever
The resource retriever.
-
Constructor Summary
Constructors Constructor Description SvgConverterProperties()
Creates a newSvgConverterProperties
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBaseUri()
Gets the base URI.java.lang.String
getCharset()
Get the name of the Charset to be used when decoding an InputStream.FontProvider
getFontProvider()
Gets the font provider.MediaDeviceDescription
getMediaDeviceDescription()
Gets the media device description.ISvgNodeRendererFactory
getRendererFactory()
Retrieve the factory responsible for creatingISvgNodeRenderer
IResourceRetriever
getResourceRetriever()
Gets the resource retriever.SvgConverterProperties
setBaseUri(java.lang.String baseUri)
Sets the base URI.SvgConverterProperties
setCharset(java.lang.String charset)
SvgConverterProperties
setFontProvider(FontProvider fontProvider)
SvgConverterProperties
setMediaDeviceDescription(MediaDeviceDescription mediaDeviceDescription)
Sets the media device description.SvgConverterProperties
setRendererFactory(ISvgNodeRendererFactory rendererFactory)
SvgConverterProperties
setResourceRetriever(IResourceRetriever resourceRetriever)
Sets the resource retriever.
-
-
-
Field Detail
-
mediaDeviceDescription
private MediaDeviceDescription mediaDeviceDescription
The media device description.
-
fontProvider
private FontProvider fontProvider
The font provider.
-
baseUri
private java.lang.String baseUri
The base URI.
-
resourceRetriever
private IResourceRetriever resourceRetriever
The resource retriever.
-
rendererFactory
private ISvgNodeRendererFactory rendererFactory
-
charset
private java.lang.String charset
-
-
Constructor Detail
-
SvgConverterProperties
public SvgConverterProperties()
Creates a newSvgConverterProperties
instance. Instantiates its members, IResourceRetriever and ISvgNodeRendererFactory, to its default implementations.
-
-
Method Detail
-
setRendererFactory
public SvgConverterProperties setRendererFactory(ISvgNodeRendererFactory rendererFactory)
-
setFontProvider
public SvgConverterProperties setFontProvider(FontProvider fontProvider)
-
getRendererFactory
public ISvgNodeRendererFactory getRendererFactory()
Description copied from interface:ISvgConverterProperties
Retrieve the factory responsible for creatingISvgNodeRenderer
- Specified by:
getRendererFactory
in interfaceISvgConverterProperties
- Returns:
- A
ISvgNodeRendererFactory
implementation
-
getCharset
public java.lang.String getCharset()
Description copied from interface:ISvgConverterProperties
Get the name of the Charset to be used when decoding an InputStream. This method is allowed to return null, in which caseUTF-8
will be used (by JSoup).Please be aware that this method is NOT used when handling a
String
variable in theSvgConverter
.- Specified by:
getCharset
in interfaceISvgConverterProperties
- Returns:
- the String name of the
Charset
used for decoding
-
setCharset
public SvgConverterProperties setCharset(java.lang.String charset)
-
getBaseUri
public java.lang.String getBaseUri()
Gets the base URI.- Specified by:
getBaseUri
in interfaceISvgConverterProperties
- Returns:
- the base URI
-
getFontProvider
public FontProvider getFontProvider()
Gets the font provider.- Specified by:
getFontProvider
in interfaceISvgConverterProperties
- Returns:
- the font provider
-
getMediaDeviceDescription
public MediaDeviceDescription getMediaDeviceDescription()
Gets the media device description.- Specified by:
getMediaDeviceDescription
in interfaceISvgConverterProperties
- Returns:
- the media device description
-
setMediaDeviceDescription
public SvgConverterProperties setMediaDeviceDescription(MediaDeviceDescription mediaDeviceDescription)
Sets the media device description.- Parameters:
mediaDeviceDescription
- the media device description- Returns:
- the ConverterProperties instance
-
setBaseUri
public SvgConverterProperties setBaseUri(java.lang.String baseUri)
Sets the base URI.- Parameters:
baseUri
- the base URI- Returns:
- the ConverterProperties instance
-
getResourceRetriever
public IResourceRetriever getResourceRetriever()
Description copied from interface:ISvgConverterProperties
Gets the resource retriever. The resourceRetriever is used to retrieve data from resources by URL.- Specified by:
getResourceRetriever
in interfaceISvgConverterProperties
- Returns:
- the resource retriever
-
setResourceRetriever
public SvgConverterProperties setResourceRetriever(IResourceRetriever resourceRetriever)
Sets the resource retriever. The resourceRetriever is used to retrieve data from resources by URL.- Parameters:
resourceRetriever
- the resource retriever- Returns:
- the
SvgConverterProperties
instance
-
-