Class SvgImageXObject


public class SvgImageXObject extends PdfFormXObject
A wrapper for Form XObject for SVG images.
  • Constructor Details

    • SvgImageXObject

      public SvgImageXObject (Rectangle bBox, ISvgProcessorResult result, ResourceResolver resourceResolver)
      Creates a new instance of Form XObject for the SVG image.
      Parameters:
      bBox - the form XObject’s bounding box.
      result - processor result containing the SVG information.
      resourceResolver - ResourceResolver for the SVG image.
  • Method Details

    • getResult

      public ISvgProcessorResult getResult()
      Returns processor result containing the SVG information.
      Returns:
      {ISvgProcessorResult} processor result.
    • getResourceResolver

      public ResourceResolver getResourceResolver()
      Returns resource resolver for the SVG image.
      Returns:
      ResourceResolver instance
    • generate

      public void generate (PdfDocument document)
      Processes xObject before first image generation to avoid drawing it twice or more. It allows to reuse the same Form XObject multiple times.
      Parameters:
      document - pdf that shall contain the SVG image.