org.foray.pdf.object
Class PDFString

java.lang.Object
  extended by org.foray.pdf.object.PDFObject
      extended by org.foray.pdf.object.PDFString

public class PDFString
extends PDFObject

A PDF String Object, as defined in PDF Reference, 2nd edition, Section 3.2.3. PDF string objects are used in content streams, and are specifically distinguished from PDF text strings, which are used for such things as bookmark titles, annotations, etc.

See Also:
PDFTextString

Field Summary
 
Fields inherited from class org.foray.pdf.object.PDFObject
EOL, MSG_EOL, XREF_EOL
 
Constructor Summary
PDFString(PDFDocument doc, String string, org.axsl.pdf.PdfFont font, org.axsl.font.FontOptions fontOptions, org.axsl.common.i18n.Orthography orthography)
          Constructor.
 
Method Summary
 boolean isEmpty()
          Indicates whether this string has any content or not.
 String toPDF()
          Generates the PDF text necessary to represent the object, returning it as a String.
 
Methods inherited from class org.foray.pdf.object.PDFObject
bufferToByteArray, byteArrayToStream, getCharsPerLine, getGeneration, getLogger, getNumber, getPDFDocument, output, pdfID, pdfReference, setNumber, stringToByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDFString

public PDFString(PDFDocument doc,
                 String string,
                 org.axsl.pdf.PdfFont font,
                 org.axsl.font.FontOptions fontOptions,
                 org.axsl.common.i18n.Orthography orthography)
Constructor.

Parameters:
doc - The parent PDF document.
string - The String being encapsulated.
font - The font in which this String should be written.
fontOptions - The font options, such as ligatures and small-caps that should be used when computing the glyphs for this word.
orthography - The orthography that should be used when applying font features like subsitutions.
Method Detail

toPDF

public String toPDF()
Description copied from class: PDFObject
Generates the PDF text necessary to represent the object, returning it as a String.

Returns:
The PDF text necessary to represent the object.

isEmpty

public boolean isEmpty()
Indicates whether this string has any content or not.

Returns:
True iff this string has no content.


Copyright © 2017. All rights reserved.