Package com.ribs.pdf

Class PDFTextObject


  • public class PDFTextObject
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      PDFTextObject​(java.awt.font.FontRenderContext ctxt)
      Main constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void begin()
      start a new text object
      void dddshowText​(byte[] pageBytes, int offset, int length, PDFGState gs, PDFFile file)  
      void end()
      End the text object
      boolean isOpen()
      Check if the text object is active.
      void positionText​(float x, float y)
      Set text position relative to current line matrix.
      void setTextMatrix​(float a, float b, float c, float d, float e, float f)  
      void showText​(byte[] pageBytes, int offset, int length, PDFGState gs, PDFFile file)
      Get a glyph vector by decoding the string bytes according to the font encoding, and calculating spacing using the text parameters in the gstate.
      void showText​(byte[] pageBytes, java.util.List tokens, PDFGState gs, PDFFile file)
      Like the previous routine, except using a list of strings & spacing adjustments
      • Methods inherited from class java.lang.Object

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

      • PDFTextObject

        public PDFTextObject​(java.awt.font.FontRenderContext ctxt)
        Main constructor.
    • Method Detail

      • begin

        public void begin()
        start a new text object
      • end

        public void end()
        End the text object
      • isOpen

        public boolean isOpen()
        Check if the text object is active. This can be used to raise errors for operations that are only legal within or without a text object.
      • positionText

        public void positionText​(float x,
                                 float y)
        Set text position relative to current line matrix. Used by Td, TD, T*, ', "
      • setTextMatrix

        public void setTextMatrix​(float a,
                                  float b,
                                  float c,
                                  float d,
                                  float e,
                                  float f)
      • showText

        public void showText​(byte[] pageBytes,
                             int offset,
                             int length,
                             PDFGState gs,
                             PDFFile file)
        Get a glyph vector by decoding the string bytes according to the font encoding, and calculating spacing using the text parameters in the gstate.
      • showText

        public void showText​(byte[] pageBytes,
                             java.util.List tokens,
                             PDFGState gs,
                             PDFFile file)
        Like the previous routine, except using a list of strings & spacing adjustments
      • dddshowText

        public void dddshowText​(byte[] pageBytes,
                                int offset,
                                int length,
                                PDFGState gs,
                                PDFFile file)