Zend Framework  1.12
Public Member Functions | Protected Member Functions | List of all members
Zend_Pdf_FileParser_Font Class Reference

Public Member Functions

 __construct (Zend_Pdf_FileParserDataSource $dataSource)
 Object constructor.
 
 __get ($property)
 Get handler.
 
 readStringUTF16 ($byteCount, $byteOrder=Zend_Pdf_FileParser::BYTE_ORDER_BIG_ENDIAN, $characterSet= '')
 Reads the Unicode UTF-16-encoded string from the binary file at the current offset location.
 
 readStringMacRoman ($byteCount, $characterSet= '')
 Reads the Mac Roman-encoded string from the binary file at the current offset location.
 
 readStringPascal ($characterSet= '', $lengthBytes=1)
 Reads the Pascal string from the binary file at the current offset location.
 
 writeDebug ()
 Writes the entire font properties array to STDOUT.
 
 __set ($property, $value)
 Set handler.
 
- Public Member Functions inherited from Zend_Pdf_FileParser
 screen ()
 Performs a cursory check to verify that the binary file is in the expected format.
 
 parse ()
 Reads and parses the complete binary file.
 
 __construct (Zend_Pdf_FileParserDataSource $dataSource)
 Object constructor.
 
 __destruct ()
 Object destructor.
 
 isScreened ()
 Returns true if the file has passed a cursory validation check.
 
 isParsed ()
 Returns true if the file has been successfully parsed.
 
 getDataSource ()
 Returns the data source object representing the file being parsed.
 
 moveToOffset ($offset)
 Convenience wrapper for the data source object's moveToOffset() method.
 
 getOffset ()
 
 getSize ()
 
 readBytes ($byteCount)
 Convenience wrapper for the data source object's readBytes() method.
 
 skipBytes ($byteCount)
 Convenience wrapper for the data source object's skipBytes() method.
 
 readInt ($size, $byteOrder=Zend_Pdf_FileParser::BYTE_ORDER_BIG_ENDIAN)
 Reads the signed integer value from the binary file at the current byte offset.
 
 readUInt ($size, $byteOrder=Zend_Pdf_FileParser::BYTE_ORDER_BIG_ENDIAN)
 Reads the unsigned integer value from the binary file at the current byte offset.
 
 isBitSet ($bit, $bitField)
 Returns true if the specified bit is set in the integer bitfield.
 
 readFixed ($mantissaBits, $fractionBits, $byteOrder=Zend_Pdf_FileParser::BYTE_ORDER_BIG_ENDIAN)
 Reads the signed fixed-point number from the binary file at the current byte offset.
 
 readStringUTF16 ($byteCount, $byteOrder=Zend_Pdf_FileParser::BYTE_ORDER_BIG_ENDIAN, $characterSet= '')
 Reads the Unicode UTF-16-encoded string from the binary file at the current byte offset.
 
 readStringMacRoman ($byteCount, $characterSet= '')
 Reads the Mac Roman-encoded string from the binary file at the current byte offset.
 
 readStringPascal ($characterSet= '', $lengthBytes=1)
 Reads the Pascal string from the binary file at the current byte offset.
 

Protected Member Functions

 _debugLog ($message)
 If debug logging is enabled, writes the log message.
 

Additional Inherited Members

- Public Attributes inherited from Zend_Pdf_FileParser
const BYTE_ORDER_LITTLE_ENDIAN = 0
 Little-endian byte order (0x04 0x03 0x02 0x01).
 
const BYTE_ORDER_BIG_ENDIAN = 1
 Big-endian byte order (0x01 0x02 0x03 0x04).
 
- Protected Attributes inherited from Zend_Pdf_FileParser
 $_isScreened = false
 
 $_isParsed = false
 
 $_dataSource = null
 

Constructor & Destructor Documentation

__construct ( Zend_Pdf_FileParserDataSource  $dataSource)

Object constructor.

Validates the data source and enables debug logging if so configured.

Parameters
Zend_Pdf_FileParserDataSource$dataSource
Exceptions
Zend_Pdf_Exception

Member Function Documentation

__get (   $property)

Get handler.

Parameters
string$property
Returns
mixed
__set (   $property,
  $value 
)

Set handler.

NOTE: This method is protected. Other classes may freely interrogate the font properties, but only this and its subclasses may set them.

Parameters
string$property
mixed$value
_debugLog (   $message)
protected

If debug logging is enabled, writes the log message.

The log message is a sprintf() style string and any number of arguments may accompany it as additional parameters.

Parameters
string$message
mixed(optional, multiple) Additional arguments
readStringMacRoman (   $byteCount,
  $characterSet = '' 
)

Reads the Mac Roman-encoded string from the binary file at the current offset location.

Overridden to fix return character set at UTF-16BE.

Parameters
integer$byteCountNumber of bytes (characters) to return.
string$characterSet(optional) –Ignored–
Returns
string
Exceptions
Zend_Pdf_Exception
readStringPascal (   $characterSet = '',
  $lengthBytes = 1 
)

Reads the Pascal string from the binary file at the current offset location.

Overridden to fix return character set at UTF-16BE.

Parameters
string$characterSet(optional) –Ignored–
integer$lengthBytes(optional) Number of bytes that make up the length. Default is 1.
Returns
string
Exceptions
Zend_Pdf_Exception
readStringUTF16 (   $byteCount,
  $byteOrder = Zend_Pdf_FileParser::BYTE_ORDER_BIG_ENDIAN,
  $characterSet = '' 
)

Reads the Unicode UTF-16-encoded string from the binary file at the current offset location.

Overridden to fix return character set at UTF-16BE.

Todo:
Deal with to-dos in the parent method.
Parameters
integer$byteCountNumber of bytes (characters * 2) to return.
integer$byteOrder(optional) Big- or little-endian byte order. Use the BYTE_ORDER_ constants defined in Zend_Pdf_FileParser. If omitted, uses big-endian.
string$characterSet(optional) –Ignored–
Returns
string
Exceptions
Zend_Pdf_Exception
writeDebug ( )

Writes the entire font properties array to STDOUT.

Used only for debugging.