Class PresentationTextData

java.lang.Object
org.apache.fop.afp.modca.AbstractAFPObject
org.apache.fop.afp.modca.PresentationTextData
All Implemented Interfaces:
PtocaConstants, Streamable

public class PresentationTextData extends AbstractAFPObject implements PtocaConstants
Presentation text data contains the graphic characters and the control sequences necessary to position the characters within the object space. The data consists of: - graphic characters to be presented - control sequences that position them - modal control sequences that adjust the positions by small amounts - other functions causing text to be presented with differences in appearance.

The graphic characters are expected to conform to a coded font representation so that they can be translated from the code point in the object data to the character in the coded font. The units of measure for linear displacements are derived from the PresentationTextDescriptor or from the hierarchical defaults.

In addition to graphic character code points, Presentation Text data can contain embedded control sequences. These are strings of two or more bytes which signal an alternate mode of processing for the content of the current Presentation Text data.

The content for this object can be created using PtocaBuilder.

  • Constructor Details

    • PresentationTextData

      public PresentationTextData()
      Default constructor for the PresentationTextData.
    • PresentationTextData

      public PresentationTextData(boolean controlInd)
      Constructor for the PresentationTextData, the boolean flag indicate whether the control sequence prefix should be set to indicate the start of a new control sequence.
      Parameters:
      controlInd - The control sequence indicator.
  • Method Details

    • getBytesAvailable

      public int getBytesAvailable()
      Returns the number of data bytes still available in this object until it is full and a new one has to be started.
      Returns:
      the number of data bytes available
    • getOutputStream

      protected OutputStream getOutputStream()
      Returns the output stream the content data is written to.
      Returns:
      the output stream
    • writeToStream

      public void writeToStream(OutputStream os) throws IOException
      DataStream objects must implement the writeToStream() method to write its data to the given OutputStream
      Specified by:
      writeToStream in interface Streamable
      Parameters:
      os - the outputsteam stream
      Throws:
      IOException - an I/O exception of some sort has occurred.