PDF Clown
0.1.2

org.pdfclown.documents.contents.objects
Class ShowText

java.lang.Object
  extended by org.pdfclown.documents.contents.objects.ContentObject
      extended by org.pdfclown.documents.contents.objects.Operation
          extended by org.pdfclown.documents.contents.objects.ShowText
Direct Known Subclasses:
ShowAdjustedText, ShowSimpleText, ShowTextToNextLine

@PDF(value=PDF10)
public abstract class ShowText
extends Operation

Abstract 'show a text string' operation [PDF:1.6:5.3.2].

Since:
0.0.8
Version:
0.1.1, 11/01/11
Author:
Stefano Chizzolini (http://www.stefanochizzolini.it)

Nested Class Summary
static interface ShowText.IScanner
           
 
Field Summary
 
Fields inherited from class org.pdfclown.documents.contents.objects.Operation
operands, operator
 
Constructor Summary
protected ShowText(String operator)
           
protected ShowText(String operator, List<PdfDirectObject> operands)
           
protected ShowText(String operator, PdfDirectObject... operands)
           
 
Method Summary
abstract  byte[] getText()
          Gets the encoded text.
 List<Object> getValue()
          Gets the encoded text elements along with their adjustments.
 void scan(ContentScanner.GraphicsState state)
          Applies this object to the specified graphics context, updating the specified graphics state.
 void scan(ContentScanner.GraphicsState state, ShowText.IScanner textScanner)
          Executes scanning on this operation.
abstract  void setText(byte[] value)
           
 void setValue(List<Object> value)
           
 
Methods inherited from class org.pdfclown.documents.contents.objects.Operation
get, getOperands, getOperator, toString, writeTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShowText

protected ShowText(String operator)

ShowText

protected ShowText(String operator,
                   PdfDirectObject... operands)

ShowText

protected ShowText(String operator,
                   List<PdfDirectObject> operands)
Method Detail

getText

public abstract byte[] getText()
Gets the encoded text.

Remarks

Text is expressed in native encoding: to resolve it to Unicode, pass it to the decode method of the corresponding font.


getValue

public List<Object> getValue()
Gets the encoded text elements along with their adjustments.

Remarks

Text is expressed in native encoding: to resolve it to Unicode, pass it to the decode method of the corresponding font.

Returns:
Each element can be either a byte array or a number: if it's a byte array (encoded text), the operator shows text glyphs; if it's a number (glyph adjustment), the operator inversely adjusts the next glyph position by that amount (that is: a positive value reduces the distance between consecutive glyphs).

scan

public void scan(ContentScanner.GraphicsState state)
Description copied from class: ContentObject
Applies this object to the specified graphics context, updating the specified graphics state.

Overrides:
scan in class ContentObject
Parameters:
state - Graphics state.

scan

public void scan(ContentScanner.GraphicsState state,
                 ShowText.IScanner textScanner)
Executes scanning on this operation.

Parameters:
state - Graphics state context.
textScanner - Scanner to be notified about text contents. In case it's null, the operation is applied to the graphics state context.

setText

public abstract void setText(byte[] value)
See Also:
getText()

setValue

public void setValue(List<Object> value)
See Also:
getValue()

PDF Clown
0.1.2

Project home page

Copyright © 2006-2013 Stefano Chizzolini. Some Rights Reserved.
This documentation is available under the terms of the GNU Free Documentation License.