Package com.itextpdf.svg.processors.impl
Class SvgConverterProperties
java.lang.Object
com.itextpdf.svg.processors.impl.SvgConverterProperties
- All Implemented Interfaces:
-
ISvgConverterProperties
Default and fallback implementation of
ISvgConverterProperties for DefaultSvgProcessor.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the accessibility properties.Gets the base URI.Get the name of the Charset to be used when decoding an InputStream.Gets the CSS style sheet.Gets the custom viewport of SVG.Gets the font provider.Gets the media device description.Retrieve the factory responsible for creatingISvgNodeRendererGets the resource retriever.setBaseUri(String baseUri) Sets the base URI.setCharset(String charset) Sets the character set.setCssStyleSheet(CssStyleSheet cssStyleSheet) Sets the CSS style sheet.voidsetCustomViewport(Rectangle customViewport) Sets the custom viewport of SVG.setFontProvider(FontProvider fontProvider) Sets font provider.setMediaDeviceDescription(MediaDeviceDescription mediaDeviceDescription) Sets the media device description.setRendererFactory(ISvgNodeRendererFactory rendererFactory) Sets renderer factory.setResourceRetriever(IResourceRetriever resourceRetriever) Sets the resource retriever.
-
Constructor Details
-
SvgConverterProperties
public SvgConverterProperties()Creates a newSvgConverterPropertiesinstance. Instantiates its members, IResourceRetriever and ISvgNodeRendererFactory, to its default implementations.
-
-
Method Details
-
getCustomViewport
Gets the custom viewport of SVG.The custom viewport is used to resolve percent values of the top level svg.
- Returns:
- the custom viewport
-
getAccessibilityProperties
Gets the accessibility properties.- Returns:
- the accessibility properties.
-
setCustomViewport
Sets the custom viewport of SVG.The custom viewport is used to resolve percent values of the top level svg.
- Parameters:
-
customViewport- the custom viewport
-
setRendererFactory
Sets renderer factory.- Parameters:
-
rendererFactory-ISvgNodeRendererFactoryto set - Returns:
-
this
SvgConverterPropertiesinstance
-
setFontProvider
Sets font provider.- Parameters:
-
fontProvider-FontProviderto set - Returns:
-
this
SvgConverterPropertiesinstance
-
getRendererFactory
Description copied from interface:ISvgConverterPropertiesRetrieve the factory responsible for creatingISvgNodeRenderer- Specified by:
-
getRendererFactoryin interfaceISvgConverterProperties - Returns:
-
A
ISvgNodeRendererFactoryimplementation
-
getCharset
Description copied from interface:ISvgConverterPropertiesGet the name of the Charset to be used when decoding an InputStream. This method is allowed to return null, in which caseUTF-8will be used (by JSoup).Please be aware that this method is NOT used when handling a
Stringvariable in theSvgConverter.- Specified by:
-
getCharsetin interfaceISvgConverterProperties - Returns:
-
the String name of the
Charsetused for decoding
-
setCharset
Sets the character set.- Parameters:
-
charset- the character set to set - Returns:
-
this
SvgConverterPropertiesinstance
-
getBaseUri
Gets the base URI.- Specified by:
-
getBaseUriin interfaceISvgConverterProperties - Returns:
- the base URI
-
getFontProvider
Gets the font provider.- Specified by:
-
getFontProviderin interfaceISvgConverterProperties - Returns:
- the font provider
-
getMediaDeviceDescription
Gets the media device description.- Specified by:
-
getMediaDeviceDescriptionin 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
Sets the base URI.- Parameters:
-
baseUri- the base URI - Returns:
- the ConverterProperties instance
-
getResourceRetriever
Description copied from interface:ISvgConverterPropertiesGets the resource retriever. The resourceRetriever is used to retrieve data from resources by URL.- Specified by:
-
getResourceRetrieverin interfaceISvgConverterProperties - Returns:
- the resource retriever
-
setResourceRetriever
Sets the resource retriever. The resourceRetriever is used to retrieve data from resources by URL.- Parameters:
-
resourceRetriever- the resource retriever - Returns:
-
the
SvgConverterPropertiesinstance
-
getCssStyleSheet
Description copied from interface:ISvgConverterPropertiesGets the CSS style sheet. Style sheet is used to apply CSS statements to elements.- Specified by:
-
getCssStyleSheetin interfaceISvgConverterProperties - Returns:
- the CSS style sheet
-
setCssStyleSheet
Sets the CSS style sheet. Style sheet is used to apply CSS statements to elements.- Parameters:
-
cssStyleSheet- the CSS style sheet - Returns:
-
the
SvgConverterPropertiesinstance
-