Class SvgProcessingUtil

java.lang.Object
com.itextpdf.html2pdf.util.SvgProcessingUtil

public class SvgProcessingUtil extends Object
Utility class for handling operations related to SVG
  • Constructor Summary

    Constructors
    Constructor
    Description
    SvgProcessingUtil(com.itextpdf.styledxmlparser.resolver.resource.ResourceResolver resourceResolver)
    Creates a new SvgProcessingUtil instance based on ResourceResolver which is used to resolve a variety of resources.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.itextpdf.layout.element.Image
    createImageFromProcessingResult(com.itextpdf.svg.processors.ISvgProcessorResult result, com.itextpdf.kernel.pdf.PdfDocument pdfDocument)
    Create an Image layout object tied to the passed PdfDocument 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 an PdfFormXObject tied to the passed PdfDocument using the SVG processing result.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SvgProcessingUtil

      public SvgProcessingUtil (com.itextpdf.styledxmlparser.resolver.resource.ResourceResolver resourceResolver)
      Creates a new SvgProcessingUtil instance based on ResourceResolver 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 an Image layout object tied to the passed PdfDocument 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 an PdfFormXObject tied to the passed PdfDocument using the SVG processing result.
      Parameters:
      result - Processing result containing the SVG information
      pdfDocument - pdf that shall contain the image
      Returns:
      PdfFormXObject instance