Package com.itextpdf.html2pdf.util
Class SvgProcessingUtil
java.lang.Object
com.itextpdf.html2pdf.util.SvgProcessingUtil
Utility class for handling operations related to SVG
-
Constructor Summary
ConstructorsConstructorDescriptionSvgProcessingUtil
(com.itextpdf.styledxmlparser.resolver.resource.ResourceResolver resourceResolver) Creates a newSvgProcessingUtil
instance based onResourceResolver
which is used to resolve a variety of resources. -
Method Summary
Modifier and TypeMethodDescriptioncom.itextpdf.layout.element.Image
createImageFromProcessingResult
(com.itextpdf.svg.processors.ISvgProcessorResult result, com.itextpdf.kernel.pdf.PdfDocument pdfDocument) Deprecated.com.itextpdf.layout.element.Image
createSvgImageFromProcessingResult
(com.itextpdf.svg.processors.ISvgProcessorResult result) Deprecated.com.itextpdf.svg.xobject.SvgImageXObject
createXObjectFromProcessingResult
(com.itextpdf.svg.processors.ISvgProcessorResult result, ProcessorContext context, boolean generateAbsolutelySizedSvg) Create anPdfFormXObject
tied to the passedProcessorContext
using the SVG processing result.com.itextpdf.kernel.pdf.xobject.PdfFormXObject
createXObjectFromProcessingResult
(com.itextpdf.svg.processors.ISvgProcessorResult result, com.itextpdf.kernel.pdf.PdfDocument pdfDocument) Deprecated.
-
Constructor Details
-
SvgProcessingUtil
public SvgProcessingUtil(com.itextpdf.styledxmlparser.resolver.resource.ResourceResolver resourceResolver) Creates a newSvgProcessingUtil
instance based onResourceResolver
which is used to resolve a variety of resources.- Parameters:
-
resourceResolver
- the resource resolver
-
-
Method Details
-
createImageFromProcessingResult
@Deprecated public com.itextpdf.layout.element.Image createImageFromProcessingResult(com.itextpdf.svg.processors.ISvgProcessorResult result, com.itextpdf.kernel.pdf.PdfDocument pdfDocument) Deprecated.CreateSvgImage
layout object tied to the passedPdfDocument
using the SVG processing result.- Parameters:
-
result
- processing result containing the SVG information -
pdfDocument
- pdf that shall contain the image - Returns:
- SVG image layout object
-
createSvgImageFromProcessingResult
@Deprecated public com.itextpdf.layout.element.Image createSvgImageFromProcessingResult(com.itextpdf.svg.processors.ISvgProcessorResult result) Deprecated.CreateSvgImage
layout object using the SVG processing result.- Parameters:
-
result
- processing result containing the SVG information - Returns:
- SVG image layout object
-
createXObjectFromProcessingResult
@Deprecated public com.itextpdf.kernel.pdf.xobject.PdfFormXObject createXObjectFromProcessingResult(com.itextpdf.svg.processors.ISvgProcessorResult result, com.itextpdf.kernel.pdf.PdfDocument pdfDocument) Deprecated.Create anPdfFormXObject
tied to the passedPdfDocument
using the SVG processing result.- Parameters:
-
result
- processing result containing the SVG information -
pdfDocument
- pdf that shall contain the SVG image - Returns:
-
SvgImageXObject
instance
-
createXObjectFromProcessingResult
public com.itextpdf.svg.xobject.SvgImageXObject createXObjectFromProcessingResult(com.itextpdf.svg.processors.ISvgProcessorResult result, ProcessorContext context, boolean generateAbsolutelySizedSvg) Create anPdfFormXObject
tied to the passedProcessorContext
using the SVG processing result.- Parameters:
-
result
- processing result containing the SVG information -
context
- html2pdf processor context -
generateAbsolutelySizedSvg
- if true and context has pdf document and svg is not relative sized, it will be immediately generated, otherwise no generation will be performed - Returns:
-
new
SvgImageXObject
instance
-