com.pdftools.expa
Class Content

java.lang.Object
  extended by com.pdftools.NativeLibrary
      extended by com.pdftools.expa.ExpaInitialize
          extended by com.pdftools.expa.Content

public class Content
extends ExpaInitialize

The Content object provides information about the content of a PDF page. To obtain a Content object, use the getContent() method of the Page class.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.pdftools.expa.ExpaInitialize
ExpaInitialize.CONTENTOBJECT, ExpaInitialize.ORIENTATION, ExpaInitialize.Rectangle, ExpaInitialize.TransformMatrix
 
Nested classes/interfaces inherited from class com.pdftools.NativeLibrary
NativeLibrary.COLORCONVERSION, NativeLibrary.COLORSPACE, NativeLibrary.COMPRESSION, NativeLibrary.DITHERINGMODE, NativeLibrary.ERRORCODE, NativeLibrary.FONTTYPE, NativeLibrary.PERMISSION, NativeLibrary.RENDEREROPTION, NativeLibrary.RENDERINGMODE, NativeLibrary.ROTATEMODE, NativeLibrary.STRIPTYPE
 
Field Summary
 
Fields inherited from class com.pdftools.NativeLibrary
VERSION
 
Constructor Summary
Content()
           
 
Method Summary
 int getFlags()
          Get the annotation flags (-1: page content).
 GraphicsState getGraphicsState()
          get current graphics state information;
 Image getImage()
          get the image data.
 Image getNextImage()
          get the next image in the content stream
 int getNextObject()
          get the information of which type of content object retrieved.
 java.lang.String getNextPath()
          get the next path in the content stream
 Text getNextText()
          get the next text in the content stream
 java.lang.String getPath()
          get the content stream making up the current path
 Text getText()
          get current text item.
 void reset()
          reset the content to the beginning to start another pass through all components
 void reset(boolean iBoolIncludeRotate)
          reset the content to the beginning to start another pass through all components.
 void resetContent(boolean iBoolIncludeRotate)
          reset the content to the beginning to start another pass through all components.
 void setBreakWords(int iBoolOn)
          Set break words to control the way how the text extraction algorithm works.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Content

public Content()
Method Detail

resetContent

public void resetContent(boolean iBoolIncludeRotate)
reset the content to the beginning to start another pass through all components.

Parameters:
iBoolIncludeRotate - true to include viewer rotation for returning coordinates.

reset

public void reset(boolean iBoolIncludeRotate)
reset the content to the beginning to start another pass through all components.

Parameters:
iBoolIncludeRotate - true to include viewer rotation for returning coordinates.

reset

public void reset()
reset the content to the beginning to start another pass through all components


getGraphicsState

public GraphicsState getGraphicsState()
get current graphics state information;

Returns:
the interface of the current graphics state; This information is invalidated by the next call to getNextObject, getNextText, getNextImage, or getNextPath

getText

public Text getText()
get current text item.

Returns:
the current text item. This information is invalidated when reading the next text item.

getImage

public Image getImage()
get the image data.

Returns:
the image data obtained by the last getNextObject() or getNextImage() call.

getPath

public java.lang.String getPath()
get the content stream making up the current path

Returns:
string the bytes of the content stream making up the current path

setBreakWords

public void setBreakWords(int iBoolOn)
Set break words to control the way how the text extraction algorithm works.

Parameters:
iBoolOn - true: a word breaking character such as a blank is found or the character spacing exceeds the blank character width the text objects are split up into individual text objects without blanks. False: Line breaking characters are treated the same as other characters and character spacing is disregarded.

getNextText

public Text getNextText()
get the next text in the content stream

Returns:
the next text in the content stream

getNextImage

public Image getNextImage()
get the next image in the content stream

Returns:
the next image in the content stream

getNextPath

public java.lang.String getNextPath()
get the next path in the content stream

Returns:
the next path in the content stream

getNextObject

public int getNextObject()
get the information of which type of content object retrieved.

Returns:
which type of content object retrieved (eNone if at end of stream)

getFlags

public int getFlags()
Get the annotation flags (-1: page content).

Returns:
the annotation flags (-1: page content).