SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class FileConvert

Converter between various file types

For all features to work, the following programs need to be installed:
- convert (e.g. from the graphicsmagick-imagemagick-compat Debian package)
- exiftool (e.g. from the libimage-exiftool-perl Debian package)
- libreoffice (e.g. from the libreoffice-common Debian package)

Functions

NameVisibilityDescription
getPageCountpublic (static)Use 'exiftool' to determine the number of pages in a file
imagemagickpublic (static)Convert file using ImageMagick
installedpublic (static)Checks to see that a conversion program is installed
libreofficepublic (static)Convert file using LibreOffice
validateExtensionprivate (static)Validates that an output file extension is of a valid format

public getPageCount

int FileConvert::getPageCount ( string $filename );

Use 'exiftool' to determine the number of pages in a file

public imagemagick

string FileConvert::imagemagick ( string $in_file , string $out_ext [, int $page_index [, int $density ]] );

Convert file using ImageMagick

public installed

bool FileConvert::installed ( string $program );

Checks to see that a conversion program is installed

public libreoffice

string FileConvert::libreoffice ( string $in_file , string $out_ext );

Convert file using LibreOffice

private validateExtension

void FileConvert::validateExtension ( string $ext );

Validates that an output file extension is of a valid format