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 SvgImage layout object tied to the passed PdfDocument using the SVG processing result.
    com.itextpdf.layout.element.Image
    createSvgImageFromProcessingResult(com.itextpdf.svg.processors.ISvgProcessorResult result)
    Create SvgImage 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 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 SvgImage 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:
      SVG image layout object
    • createSvgImageFromProcessingResult

      public com.itextpdf.layout.element.Image createSvgImageFromProcessingResult (com.itextpdf.svg.processors.ISvgProcessorResult result)
      Create SvgImage 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 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 SVG image
      Returns:
      SvgImageXObject instance