Package com.itextpdf.html2pdf.attach
Class ProcessorContext
java.lang.Object
com.itextpdf.html2pdf.attach.ProcessorContext
Keeps track of the context of the processor.
-
Constructor Summary
ConstructorDescriptionProcessorContext
(ConverterProperties converterProperties) Instantiates a newProcessorContext
instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTemporaryFont
(com.itextpdf.io.font.FontProgram fontProgram, String encoding, String alias) Add temporary font from @font-face.void
addTemporaryFont
(com.itextpdf.io.font.FontProgram fontProgram, String encoding, String alias, com.itextpdf.layout.font.Range unicodeRange) Add temporary font from @font-face.void
addTemporaryFont
(com.itextpdf.layout.font.FontInfo fontInfo, String alias) Add temporary font from @font-face.void
End the processing Svg StateGets the baseURI: the URI which has been set manually or the directory of the html file in case when baseURI hasn't been set manually.Gets the CSS applier factory.Gets the CSS context.com.itextpdf.styledxmlparser.css.media.MediaDeviceDescription
Gets the device description.com.itextpdf.layout.font.FontProvider
Gets the font provider.Gets the form field name resolver.int
Gets maximum number of layouts.Gets the link context.Gets html meta info container.Gets the outline handler.com.itextpdf.kernel.pdf.PdfDocument
Gets the PDF document.Gets the radio check resolver.com.itextpdf.styledxmlparser.resolver.resource.ResourceResolver
Gets the resource resolver.getState()
Gets the state.Gets the tag worker factory.com.itextpdf.layout.font.FontSet
Gets the temporary set of fonts.boolean
hasFonts()
Check fonts in font provider and temporary font set.boolean
Checks if is an AcroForm needs to be created.boolean
Checks if immediateFlush is setboolean
Check if the processor is currently processing an inline svgvoid
reset()
Resets the context.void
reset
(com.itextpdf.kernel.pdf.PdfDocument pdfDocument) Resets the context, and assigns a new PDF document.void
setFontProvider
(com.itextpdf.layout.font.FontProvider fontProvider) Sets the font provider.void
setMetaInfo
(com.itextpdf.commons.actions.contexts.IMetaInfo metaInfo) Sets IMetaInfo to processor context.void
Set the processor to processing Inline Svg state
-
Constructor Details
-
ProcessorContext
Instantiates a newProcessorContext
instance.- Parameters:
-
converterProperties
- aConverterProperties
instance
-
-
Method Details
-
getLimitOfLayouts
public int getLimitOfLayouts()Gets maximum number of layouts.- Returns:
- layouts limit
-
setFontProvider
public void setFontProvider(com.itextpdf.layout.font.FontProvider fontProvider) Sets the font provider.- Parameters:
-
fontProvider
- the new font provider
-
getState
Gets the state.- Returns:
- the state
-
getPdfDocument
public com.itextpdf.kernel.pdf.PdfDocument getPdfDocument()Gets the PDF document.- Returns:
- the PDF document
-
getFontProvider
public com.itextpdf.layout.font.FontProvider getFontProvider()Gets the font provider.- Returns:
- the font provider
-
getTempFonts
public com.itextpdf.layout.font.FontSet getTempFonts()Gets the temporary set of fonts.- Returns:
- the set of fonts
-
getResourceResolver
public com.itextpdf.styledxmlparser.resolver.resource.ResourceResolver getResourceResolver()Gets the resource resolver.- Returns:
- the resource resolver
-
getDeviceDescription
public com.itextpdf.styledxmlparser.css.media.MediaDeviceDescription getDeviceDescription()Gets the device description.- Returns:
- the device description
-
getTagWorkerFactory
Gets the tag worker factory.- Returns:
- the tag worker factory
-
getCssApplierFactory
Gets the CSS applier factory.- Returns:
- the CSS applier factory
-
getCssContext
Gets the CSS context.- Returns:
- the CSS context
-
getLinkContext
Gets the link context.- Returns:
- the link context
-
isCreateAcroForm
public boolean isCreateAcroForm()Checks if is an AcroForm needs to be created.- Returns:
- true, an AcroForm should be created
-
getFormFieldNameResolver
Gets the form field name resolver.- Returns:
- the form field name resolver
-
getRadioCheckResolver
Gets the radio check resolver.- Returns:
- the radio check resolver
-
getOutlineHandler
Gets the outline handler.- Returns:
- the outline handler
-
addTemporaryFont
Add temporary font from @font-face.- Parameters:
-
fontInfo
- the font info -
alias
- the alias
-
addTemporaryFont
public void addTemporaryFont(com.itextpdf.io.font.FontProgram fontProgram, String encoding, String alias) Add temporary font from @font-face.- Parameters:
-
fontProgram
- the font program -
encoding
- the encoding -
alias
- the alias
-
addTemporaryFont
public void addTemporaryFont(com.itextpdf.io.font.FontProgram fontProgram, String encoding, String alias, com.itextpdf.layout.font.Range unicodeRange) Add temporary font from @font-face.- Parameters:
-
fontProgram
- the font program -
encoding
- the encoding -
alias
- the alias -
unicodeRange
- the unicode range
-
hasFonts
public boolean hasFonts()Check fonts in font provider and temporary font set.- Returns:
- true, if there is at least one font either in FontProvider or temporary FontSet.
- See Also:
-
reset
public void reset()Resets the context. -
reset
public void reset(com.itextpdf.kernel.pdf.PdfDocument pdfDocument) Resets the context, and assigns a new PDF document.- Parameters:
-
pdfDocument
- the new PDF document for the context
-
getBaseUri
Gets the baseURI: the URI which has been set manually or the directory of the html file in case when baseURI hasn't been set manually.- Returns:
- the baseUri
-
isImmediateFlush
public boolean isImmediateFlush()Checks if immediateFlush is set- Returns:
- true if immediateFlush is set, false if not.
-
getMetaInfoContainer
Gets html meta info container.Meta info will be used to determine event origin.
- Returns:
- html meta info container
-
setMetaInfo
public void setMetaInfo(com.itextpdf.commons.actions.contexts.IMetaInfo metaInfo) Sets IMetaInfo to processor context.- Parameters:
-
metaInfo
- the IMetaInfo object
-
isProcessingInlineSvg
public boolean isProcessingInlineSvg()Check if the processor is currently processing an inline svg- Returns:
- True if the processor is processing an inline Svg, false otherwise.
-
startProcessingInlineSvg
public void startProcessingInlineSvg()Set the processor to processing Inline Svg state -
endProcessingInlineSvg
public void endProcessingInlineSvg()End the processing Svg State
-