Package com.itextpdf.svg.processors.impl
Class SvgProcessorContext
- java.lang.Object
-
- com.itextpdf.svg.processors.impl.SvgProcessorContext
-
public class SvgProcessorContext extends java.lang.ObjectContext class with accessors to properties/objects used in processing Svg documents
-
-
Field Summary
Fields Modifier and Type Field Description private SvgCssContextcssContextThe SVG CSS context.private CssStyleSheetcssStyleSheetprivate MediaDeviceDescriptiondeviceDescriptionThe device description.private FontProviderfontProviderThe font provider.private ResourceResolverresourceResolverprivate FontSettempFontsTemporary set of fonts used in the PDF.
-
Constructor Summary
Constructors Constructor Description SvgProcessorContext(ISvgConverterProperties converterProperties)Instantiates a newSvgProcessorContextinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTemporaryFont(FontProgram fontProgram, java.lang.String encoding, java.lang.String alias)Add temporary font from @font-face.voidaddTemporaryFont(FontProgram fontProgram, java.lang.String encoding, java.lang.String alias, Range unicodeRange)Add temporary font from @font-face.voidaddTemporaryFont(FontInfo fontInfo, java.lang.String alias)Add temporary font from @font-face.SvgCssContextgetCssContext()Gets the SVG CSS context.CssStyleSheetgetCssStyleSheet()Gets the CSS style sheet.MediaDeviceDescriptiongetDeviceDescription()Gets the device description.FontProvidergetFontProvider()Gets the font provider.ResourceResolvergetResourceResolver()Gets the resource resolver.FontSetgetTempFonts()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.
-
cssStyleSheet
private CssStyleSheet cssStyleSheet
-
-
Constructor Detail
-
SvgProcessorContext
public SvgProcessorContext(ISvgConverterProperties converterProperties)
Instantiates a newSvgProcessorContextinstance.- Parameters:
converterProperties- aISvgConverterPropertiesinstance
-
-
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
-
getCssStyleSheet
public CssStyleSheet getCssStyleSheet()
Gets the CSS style sheet.- Returns:
- the CSS style sheet
-
-