PHP Class mikehaertl\pdftk\XfdfFile

This class represents a temporary XFDF file that can be used to fill a PDF form with valid unicode characters.
Author: Tomas Holy ([email protected])
Author: Michael Härtl ([email protected])
Inheritance: extends mikehaertl\tmp\File
显示文件 Open project: mikehaertl/php-pdftk Class Usage Examples

Public Methods

Method Description
__construct ( array $data, string | null $suffix = null, $prefix = null, string | null $directory = null, string | null $encoding = 'UTF-8' ) Constructor

Protected Methods

Method Description
writeFields ( integer $fp, mixed[] $fields ) Write the fields to the given filepointer

Method Details

__construct() public method

Constructor
public __construct ( array $data, string | null $suffix = null, $prefix = null, string | null $directory = null, string | null $encoding = 'UTF-8' )
$data array the form data as name => value
$suffix string | null the optional suffix for the tmp file
$directory string | null directory where the file should be created. Autodetected if not provided.
$encoding string | null of the data. Default is 'UTF-8'.

writeFields() protected method

Write the fields to the given filepointer
protected writeFields ( integer $fp, mixed[] $fields )
$fp integer
$fields mixed[] an array of field values. A value can also be another array in which case a nested field is written.