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) Create anImage
layout object tied to the passedPdfDocument
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) Create anImage
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:
- 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 image - Returns:
- PdfFormXObject instance
-