Class PDFMarkupHandler

  • Direct Known Subclasses:
    Java2DMarkupHandler

    public abstract class PDFMarkupHandler
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract void beginPage​(float width, float height)
      Set the bounds of the page.
      abstract void clipChanged​(PDFGState g)
      Notifies that a change has been made to the current clipping path
      abstract void drawImage​(PDFGState g, java.awt.Image i, java.awt.geom.AffineTransform ixform)
      Draw an image
      void endPage()
      Called when all drawing is done.
      abstract void fillPath​(PDFGState g, java.awt.geom.GeneralPath p)
      Fill the current path using the fill params in the gstate
      abstract java.awt.font.FontRenderContext getFontRenderContext()
      Return an awt FontRenderContext object which will be used to render the fonts.
      abstract java.awt.Graphics getGraphics()
      Return an awt Graphics object which will be used for suspect purposes.
      abstract void showText​(PDFGState g, java.awt.font.GlyphVector v)
      Draw some text at the current text position.
      abstract void strokePath​(PDFGState g, java.awt.geom.GeneralPath p)
      Stroke the current path with the current miter limit, color, etc.
      • Methods inherited from class java.lang.Object

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

      • PDFMarkupHandler

        public PDFMarkupHandler()
    • Method Detail

      • beginPage

        public abstract void beginPage​(float width,
                                       float height)
        Set the bounds of the page. This will be called before any marking operations.
      • endPage

        public void endPage()
        Called when all drawing is done. (optional)
      • strokePath

        public abstract void strokePath​(PDFGState g,
                                        java.awt.geom.GeneralPath p)
        Stroke the current path with the current miter limit, color, etc.
      • fillPath

        public abstract void fillPath​(PDFGState g,
                                      java.awt.geom.GeneralPath p)
        Fill the current path using the fill params in the gstate
      • clipChanged

        public abstract void clipChanged​(PDFGState g)
        Notifies that a change has been made to the current clipping path
      • drawImage

        public abstract void drawImage​(PDFGState g,
                                       java.awt.Image i,
                                       java.awt.geom.AffineTransform ixform)
        Draw an image
      • showText

        public abstract void showText​(PDFGState g,
                                      java.awt.font.GlyphVector v)
        Draw some text at the current text position. The glyphVector will have been created by the parser using the current font and its character encodings.
      • getFontRenderContext

        public abstract java.awt.font.FontRenderContext getFontRenderContext()
        Return an awt FontRenderContext object which will be used to render the fonts. The same rendercontext is used for the entire page.
      • getGraphics

        public abstract java.awt.Graphics getGraphics()
        Return an awt Graphics object which will be used for suspect purposes. TODO: this is really to help get the FontMetrics for a given font