Class DrawContext


  • public class DrawContext
    extends java.lang.Object
    This class holds instances which required for drawing on pdf document.
    • Field Detail

      • taggingEnabled

        private boolean taggingEnabled
    • Constructor Detail

      • DrawContext

        public DrawContext​(PdfDocument document,
                           PdfCanvas canvas)
        Create drawing context by setting document and pdf canvas on which drawing will be performed.
        Parameters:
        document - pdf document
        canvas - canvas to draw on
      • DrawContext

        public DrawContext​(PdfDocument document,
                           PdfCanvas canvas,
                           boolean enableTagging)
        Create drawing context by setting document and pdf canvas on which drawing will be performed.
        Parameters:
        document - pdf document
        canvas - canvas to draw on
        enableTagging - if true document drawing operations will be appropriately tagged
    • Method Detail

      • getDocument

        public PdfDocument getDocument()
        Get pdf document.
        Returns:
        PdfDocument instance
      • getCanvas

        public PdfCanvas getCanvas()
        Get pdf canvas.
        Returns:
        PdfCanvas instance
      • isTaggingEnabled

        public boolean isTaggingEnabled()
        Get document tagging property.
        Returns:
        true if tagging is enabled, false otherwise
      • setTaggingEnabled

        public void setTaggingEnabled​(boolean taggingEnabled)
        Set document tagging property.
        Parameters:
        taggingEnabled - true if to enable tagging, false to disable it