PHP-SwfTools API
Class

SwfTools\Binary\Pdf2swf

class Pdf2swf extends Binary

The Pdf2Swf adapter

Constants

CONVERT_POLY2BITMAP

CONVERT_BITMAP

OPTION_LINKS_DISABLE

OPTION_LINKS_OPENNEWWINDOW

OPTION_ZLIB_ENABLE

OPTION_ZLIB_DISABLE

OPTION_ENABLE_SIMPLEVIEWER

OPTION_DISABLE_SIMPLEVIEWER

Methods

__construct(type $binaryPathname, Logger $logger, integer $timeout)

The path to the binary

from Binary
Binary setTimeout(integer $timeout)

Set the timeout for the underlying processes ; 0 means no timeout

from Binary
integer getTimeout()

Get the timeout for the underlyning processes ; 0 means no timeout

from Binary
string|null getVersion()

Try to get the version of the binary.

from Binary
Pdf2swf toSwf(string $pathfile, string $outputFile, array $options = array(), string $convertType = self::CONVERT_POLY2BITMAP, integer $resolution = 72, integer $pageRange = '1-', integer $frameRate = 15, integer $jpegquality = 75, integer $timelimit = null)

static Pdf2swf load(Configuration $configuration, Logger $logger)

Factory method to build the adapter

Details

in Binary at line 50
public __construct(type $binaryPathname, Logger $logger, integer $timeout)

The path to the binary

Parameters

type $binaryPathname the path to a binary executable
Logger $logger A logger
integer $timeout The timeout for the binary

Exceptions

BinaryNotFoundException In case the binary does not exists or is not executable

in Binary at line 70
public Binary setTimeout(integer $timeout)

Set the timeout for the underlying processes ; 0 means no timeout

Parameters

integer $timeout The timeout value

Return Value

Binary

Exceptions

InvalidArgumentException In case the timeout value is not valid

in Binary at line 86
public integer getTimeout()

Get the timeout for the underlyning processes ; 0 means no timeout

Return Value

integer The timeout value.

in Binary at line 96
public string|null getVersion()

Try to get the version of the binary.

If the detection fails, return null

Return Value

string|null The version of the binary adapter

at line 50
public Pdf2swf toSwf(string $pathfile, string $outputFile, array $options = array(), string $convertType = self::CONVERT_POLY2BITMAP, integer $resolution = 72, integer $pageRange = '1-', integer $frameRate = 15, integer $jpegquality = 75, integer $timelimit = null)

Parameters

string $pathfile
string $outputFile
array $options
string $convertType
integer $resolution
integer $pageRange
integer $frameRate
integer $jpegquality
integer $timelimit The time limit for the process (deprecated)

Return Value

Pdf2swf

Exceptions

InvalidArgumentException

at line 138
static public Pdf2swf load(Configuration $configuration, Logger $logger)

Factory method to build the adapter

Either pass a configuration file with the binary settings, or pass an
empty configuration, which will trigger the autodetection

Parameters

Configuration $configuration A Configuration
Logger $logger A logger

Return Value

Pdf2swf

Exceptions

BinaryNotFoundException