Manuals

 

SetaPDF_MetaManager::factory()

Description

class SetaPDF_MetaManager extends SetaPDF {
mixed factory ( string $sourcefile[, string $encoding='UTF-8'] ) }

This method has to be called static and will return an instance of the SetaPDF_MetaManager class or an SetaPDF_Error object.

Parameters

$sourcefile

A string that defines the path (relative or absolute) to the original document. Only local paths are allowed.

$encoding

Defines the encoding which is used for in- and out-going strings. Internally the API uses mb_convert_encoding() to convert from one encoding to another.

If mb_convert_encoding() is not available an own function named mb_convert_encoding will be created which trys to use iconv if available. If you want to write your own wrapper, just define the desired function prior loading any SetaPDF API.

Return Values

In case of success you get a new instance of the SetaPDF_MetaManager class.

On failure an SetaPDF_Error object will be returned. It is strongly recommened to check this return value with SetaPDF::isError().