Package com.itextpdf.svg.processors.impl
Class SvgProcessorContext
java.lang.Object
com.itextpdf.svg.processors.impl.SvgProcessorContext
Context class with accessors to properties/objects used in processing Svg documents
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SvgCssContext
The SVG CSS context.private MediaDeviceDescription
The device description.private FontProvider
The font provider.private final ResourceResolver
private FontSet
Temporary set of fonts used in the PDF. -
Constructor Summary
ConstructorsConstructorDescriptionSvgProcessorContext
(ISvgConverterProperties converterProperties) Instantiates a newSvgProcessorContext
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTemporaryFont
(FontProgram fontProgram, String encoding, String alias) Add temporary font from @font-face.void
addTemporaryFont
(FontProgram fontProgram, String encoding, String alias, Range unicodeRange) Add temporary font from @font-face.void
addTemporaryFont
(FontInfo fontInfo, String alias) Add temporary font from @font-face.Gets the SVG CSS context.Gets the device description.Gets the font provider.Gets the resource resolver.Gets the temporary set of fonts.
-
Field Details
-
fontProvider
The font provider. -
tempFonts
Temporary set of fonts used in the PDF. -
resourceResolver
-
deviceDescription
The device description. -
cssContext
The SVG CSS context.
-
-
Constructor Details
-
SvgProcessorContext
Instantiates a newSvgProcessorContext
instance.- Parameters:
converterProperties
- aISvgConverterProperties
instance
-
-
Method Details
-
getFontProvider
Gets the font provider.- Returns:
- the font provider
-
getResourceResolver
Gets the resource resolver.- Returns:
- the resource resolver
-
getDeviceDescription
Gets the device description.- Returns:
- the device description
-
getTempFonts
Gets the temporary set of fonts.- Returns:
- the set of fonts
-
getCssContext
Gets the SVG CSS context.- Returns:
- the SVG CSS context
-
addTemporaryFont
public void addTemporaryFont(FontProgram fontProgram, String encoding, 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
Add temporary font from @font-face.- Parameters:
fontProgram
- the font programencoding
- the encodingalias
- the alias
-
addTemporaryFont
Add temporary font from @font-face.- Parameters:
fontInfo
- the font infoalias
- the alias
-