Class SvgImageXObject


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

      • 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 Detail

      • getResult

        public ISvgProcessorResult getResult()
        Returns processor result containing the SVG information.
        Returns:
        {ISvgProcessorResult} processor result.
      • 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.