Package com.ribs.pdf
Class PDFTextObject
- java.lang.Object
-
- com.ribs.pdf.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 voidbegin()start a new text objectvoiddddshowText(byte[] pageBytes, int offset, int length, PDFGState gs, PDFFile file)voidend()End the text objectbooleanisOpen()Check if the text object is active.voidpositionText(float x, float y)Set text position relative to current line matrix.voidsetTextMatrix(float a, float b, float c, float d, float e, float f)voidshowText(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.voidshowText(byte[] pageBytes, java.util.List tokens, PDFGState gs, PDFFile file)Like the previous routine, except using a list of strings & spacing adjustments
-
-
-
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
-
-