Package com.itextpdf.svg.processors.impl
Class SvgProcessorContext
- java.lang.Object
-
- com.itextpdf.svg.processors.impl.SvgProcessorContext
-
public class SvgProcessorContext extends java.lang.Object
Context class with accessors to properties/objects used in processing Svg documents
-
-
Field Summary
Fields Modifier and Type Field Description private SvgCssContext
cssContext
The SVG CSS context.private MediaDeviceDescription
deviceDescription
The device description.private FontProvider
fontProvider
The font provider.private ResourceResolver
resourceResolver
private FontSet
tempFonts
Temporary set of fonts used in the PDF.
-
Constructor Summary
Constructors Constructor Description SvgProcessorContext(ISvgConverterProperties converterProperties)
Instantiates a newSvgProcessorContext
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTemporaryFont(FontProgram fontProgram, java.lang.String encoding, java.lang.String alias)
Add temporary font from @font-face.void
addTemporaryFont(FontProgram fontProgram, java.lang.String encoding, java.lang.String alias, Range unicodeRange)
Add temporary font from @font-face.void
addTemporaryFont(FontInfo fontInfo, java.lang.String alias)
Add temporary font from @font-face.SvgCssContext
getCssContext()
Gets the SVG CSS context.MediaDeviceDescription
getDeviceDescription()
Gets the device description.FontProvider
getFontProvider()
Gets the font provider.ResourceResolver
getResourceResolver()
Gets the resource resolver.FontSet
getTempFonts()
Gets the temporary set of fonts.
-
-
-
Field Detail
-
fontProvider
private FontProvider fontProvider
The font provider.
-
tempFonts
private FontSet tempFonts
Temporary set of fonts used in the PDF.
-
resourceResolver
private final ResourceResolver resourceResolver
-
deviceDescription
private MediaDeviceDescription deviceDescription
The device description.
-
cssContext
private final SvgCssContext cssContext
The SVG CSS context.
-
-
Constructor Detail
-
SvgProcessorContext
public SvgProcessorContext(ISvgConverterProperties converterProperties)
Instantiates a newSvgProcessorContext
instance.- Parameters:
converterProperties
- aISvgConverterProperties
instance
-
-
Method Detail
-
getFontProvider
public FontProvider getFontProvider()
Gets the font provider.- Returns:
- the font provider
-
getResourceResolver
public ResourceResolver getResourceResolver()
Gets the resource resolver.- Returns:
- the resource resolver
-
getDeviceDescription
public MediaDeviceDescription getDeviceDescription()
Gets the device description.- Returns:
- the device description
-
getTempFonts
public FontSet getTempFonts()
Gets the temporary set of fonts.- Returns:
- the set of fonts
-
getCssContext
public SvgCssContext getCssContext()
Gets the SVG CSS context.- Returns:
- the SVG CSS context
-
addTemporaryFont
public void addTemporaryFont(FontProgram fontProgram, java.lang.String encoding, java.lang.String alias, Range unicodeRange)
Add temporary font from @font-face.- Parameters:
fontProgram
- the font programencoding
- the encodingalias
- the aliasunicodeRange
- the specific range of characters to be used from the font
-
addTemporaryFont
public void addTemporaryFont(FontProgram fontProgram, java.lang.String encoding, java.lang.String alias)
Add temporary font from @font-face.- Parameters:
fontProgram
- the font programencoding
- the encodingalias
- the alias
-
addTemporaryFont
public void addTemporaryFont(FontInfo fontInfo, java.lang.String alias)
Add temporary font from @font-face.- Parameters:
fontInfo
- the font infoalias
- the alias
-
-