API Documentation

Pdf/FileParser/Font.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Pdf
subpackage
FileParser
version
$Id: Font.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Pdf_FileParser_Font

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Pdf_FileParser_Font

Extends from
Zend_Pdf_FileParser
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Pdf
subpackage
FileParser
Properties
$_fontProperties
$_debug
Methods
__construct
__get
readStringUTF16
readStringMacRoman
readStringPascal
writeDebug
__set
_debugLog

Description

Abstract helper class for {@link Zend_Pdf_Font} that parses font files.

Defines the public interface for concrete subclasses which are responsible for parsing the raw binary data from the font file on disk. Also provides a debug logging interface and a couple of shared utility methods.

Properties

$_debug

boolean $_debug = 'false'

Flag indicating whether or not debug logging is active.

Details

$_debug
boolean
visibility
private
default
false
final
false
static
false

$_fontProperties

array $_fontProperties = 'array'

Array of parsed font properties. Used with {@link __get()} and {@link __set()}.

Details

$_fontProperties
array
visibility
private
default
array
final
false
static
false

Methods

__construct

__construct( Zend_Pdf_FileParserDataSource $dataSource ) :

Object constructor.

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

Arguments
$dataSource
Zend_Pdf_FileParserDataSource
Details
visibility
public
final
false
static
false
throws

__get

__get( string $property ) : mixed

Get handler

Arguments
$property
string
Output
mixed
Details
visibility
public
final
false
static
false

__set

__set( string $property, mixed $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.

Arguments
$property
string
$value
mixed
Details
visibility
public
final
false
static
false

_debugLog

_debugLog( string $message ) :

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.

Arguments
$message
string
Details
visibility
protected
final
false
static
false

readStringMacRoman

readStringMacRoman( integer $byteCount, string $characterSet ) : string

Reads the Mac Roman-encoded string from the binary file at the current offset location. Overridden to fix return character set at UTF-16BE.

Arguments
$byteCount
integer
Number of bytes (characters) to return.
$characterSet
string
(optional) --Ignored--
Output
string
Details
visibility
public
final
false
static
false
throws

readStringPascal

readStringPascal( string $characterSet, integer $lengthBytes = 1 ) : string

Reads the Pascal string from the binary file at the current offset location. Overridden to fix return character set at UTF-16BE.

Arguments
$characterSet
string
(optional) --Ignored--
$lengthBytes
integer
(optional) Number of bytes that make up the length. Default is 1.
Output
string
Details
visibility
public
final
false
static
false
throws

readStringUTF16

readStringUTF16( integer $byteCount, integer $byteOrder = Zend_Pdf_FileParser, string $characterSet ) : string

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.

Arguments
$byteCount
integer
Number of bytes (characters * 2) to return.
$byteOrder
integer
(optional) Big- or little-endian byte order. Use the BYTE_ORDER_ constants defined in {@link Zend_Pdf_FileParser}. If omitted, uses big-endian.
$characterSet
string
(optional) --Ignored--
Output
string
Details
visibility
public
final
false
static
false
throws
todo
Deal with to-dos in the parent method.

writeDebug

writeDebug( ) :

Writes the entire font properties array to STDOUT. Used only for debugging.

Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.