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
ConstructorDescriptionSvgProcessingUtil
(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) CreateSvgImage
layout object tied to the passedPdfDocument
using the SVG processing result.com.itextpdf.layout.element.Image
createSvgImageFromProcessingResult
(com.itextpdf.svg.processors.ISvgProcessorResult result) CreateSvgImage
layout object using the SVG processing result.com.itextpdf.kernel.pdf.xobject.PdfFormXObject
createXObjectFromProcessingResult
(com.itextpdf.svg.processors.ISvgProcessorResult result, com.itextpdf.kernel.pdf.PdfDocument pdfDocument) Create anPdfFormXObject
tied to the passedPdfDocument
using the SVG processing result.
-
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
public com.itextpdf.layout.element.Image createImageFromProcessingResult(com.itextpdf.svg.processors.ISvgProcessorResult result, com.itextpdf.kernel.pdf.PdfDocument pdfDocument) 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
public com.itextpdf.layout.element.Image createSvgImageFromProcessingResult(com.itextpdf.svg.processors.ISvgProcessorResult result) CreateSvgImage
layout object using the SVG processing result.- Parameters:
-
result
- processing result containing the SVG information - Returns:
- SVG image layout object
-
createXObjectFromProcessingResult
public com.itextpdf.kernel.pdf.xobject.PdfFormXObject createXObjectFromProcessingResult(com.itextpdf.svg.processors.ISvgProcessorResult result, com.itextpdf.kernel.pdf.PdfDocument pdfDocument) 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
-