Class PagePDF
Represents a single PDF file item attached to a page, typically via a FieldtypePDF field.
-
Pagefile
-
FieldtypePDF\PagePDF
Methods summary
public
|
#
__construct( FieldtypePDF\PagePDFs $pagefiles, string $filename )
Construct a new PagePDF
Parameters
- $pagefiles
- Owning collection
- $filename
- Full path and filename to this pagefile
|
public
Pageimage
|
#
___toImage( integer $page = 0, type $options = array() )
Convert PDF to image
This generates one image for each combinations of $page and $options['suffix'].
If the file already exists it isn't regenerated until $options['forceNew'] is TRUE.
Parameters
- $page
- Number of PDF's page (indexed from 0) to be converted to image
- $options
Available options are:
- sufix (string[]) - Suffixes to be used in image's filename
- forceNew (boolean) - Whether to overwrite the image if already exists
Accepts also converter options, see FieldtypePDF\PDFConverter::setOptions() .
Returns
Pageimage
|
public
boolean
|
#
isImageOfThis( type $basename )
Test whether $basename is image generated from this PDF
Test whether $basename is image generated from this PDF
Parameters
Returns
boolean
|
public
Pageimages
|
#
getImages( )
Get all images generated from this PDF
Get all images generated from this PDF
Returns
Pageimages
|
public
|
#
removeImages( )
Remove all generated images.
Remove all generated images.
|
public
boolean
|
#
unlink( )
Delete the physical file on disk associated with this PDF.
Delete the physical file on disk associated with this PDF.
Unlinks also all generated images.
Returns
boolean
|
public
Pageimage
|
#
thumbnail( integer $width, integer $height = 0 )
Deprecated
since version 1.1.0, please use toImage() instead
Parameters
Returns
Pageimage
|
public
|
#
isThumbnail( string $basename )
Deprecated
since version 1.1.0, please use isImageOfThis() instead
Parameters
|
public
|
#
removeThumbnails( )
Deprecated
since version 1.1.0, please use removeImages() instead
|