Class SloodlePluginPresenterPDFImporter

Description

Presenter plugin for importing a PDF file as a series of image slides.

Located in /plugin/presenter/pdfimporter.php (line 31)

SloodlePluginBase
   |
   --SloodlePluginBasePresenterImporter
      |
      --SloodlePluginPresenterPDFImporter
Method Summary
 void get_plugin_description ([ $lang = null])
 string get_plugin_name ([string $lang = null])
 int get_version ()
 bool import_file (SloodleModulePresenter $presenter, string $path, [string $name = ''], [integer $position = -1])
 void print_slide_position_menu (SloodleModulePresenter $presenter, [integer $position = -1])
 bool|string process_upload ( &$path,  &$name, string $path, string $name)
 void render (string $url, SloodleModulePresenter $presenter)
 integer|bool _import_ImageMagick (SloodleModulePresenter $presenter, string $srcfile, string $destpath, string $viewurl, string $destfile, string $destfileext, string $destname, [integer $position = -1])
 integer|bool _import_MagickWand (SloodleModulePresenter $presenter, string $srcfile, string $destpath, string $viewurl, string $destfile, string $destfileext, string $destname, [integer $position = -1])
Methods
get_plugin_description (line 402)

Gets the human-readable description of this plugin.

void get_plugin_description ([ $lang = null])
  • $lang

Redefinition of:
SloodlePluginBase::get_plugin_description()
Gets the human-readable description of this plugin.
get_plugin_name (line 394)

Gets the human-readable name of this plugin.

  • return: The human-readable name of this plugin
  • access: public
string get_plugin_name ([string $lang = null])
  • string $lang: Optional -- can specify the language we want the plugin name in, as an identifier like "en_utf8". If unspecified, then the current Moodle language should be used.

Redefinition of:
SloodlePluginBase::get_plugin_name()
Gets the human-readable name of this plugin.
get_version (line 414)

Gets the internal version number of this plugin.

This should be a number like the internal version number for Moodle modules, containing the date and release number. Format is: YYYYMMDD##. For example, "2009012302" would be the 3rd release on the 23rd January 2009.

  • return: The version number of this module.
int get_version ()

Redefinition of:
SloodlePluginBase::get_version()
Gets the internal version number of this plugin.
import_file (line 187)

Import a file to this Presenter.

  • return: True if successful or false if not.
bool import_file (SloodleModulePresenter $presenter, string $path, [string $name = ''], [integer $position = -1])
  • SloodleModulePresenter $presenter: An object representing the Presenter we are importing into.
  • string $path: The path of the file to import (must be local... i.e. on disk!)
  • string $name: Optional -- a name for the import. If omitted, it will be taken from the path.
  • integer $position: The position at which the slides should be imported. Optional. Defaults to import at the end.
print_slide_position_menu (line 119)

Display a drop-down menu of slides in the current presentation.

void print_slide_position_menu (SloodleModulePresenter $presenter, [integer $position = -1])
  • SloodleModulePresenter $presenter: An object representing the Preseter to work from.
  • integer $position: Specifies the intially selected position, if known. Defaults to end.
process_upload (line 155)

Attempt to process a file upload.

  • return: Returns true if an upload occurred succesfully. Returns false if no upload has happened. Returns a string containing an error message if an error occurred.
bool|string process_upload ( &$path,  &$name, string $path, string $name)
  • string $path: [out] This reference parameter will contain the path of the uploaded file if an upload has been performed. It will be empty if no upload has occurred.
  • string $name: [out] This reference parameter will contain the original name of the uploaded file if an upload has been performed.
  • &$path
  • &$name
render (line 39)

Render this importer on a web page.

All importing functionality should be handled by this function as well.

void render (string $url, SloodleModulePresenter $presenter)
  • string $url: A URL to this Presenter, without a "mode" parameter.
  • SloodleModulePresenter $presenter: An object representing this Presenter.
_import_ImageMagick (line 333)

Imports the given file using the ImageMagick command line programs if possible. (Internal only)

  • return: If successful, an integer indicating the number of slides loaded is displayed. If the import does not (or cannot) work, then boolean false is returned.
  • access: private
integer|bool _import_ImageMagick (SloodleModulePresenter $presenter, string $srcfile, string $destpath, string $viewurl, string $destfile, string $destfileext, string $destname, [integer $position = -1])
  • SloodleModulePresenter $presenter: An object representing the Presenter we are importing into.
  • string $srcfile: Full path of the PDF file we are importing
  • string $destpath: Folder path to which the imported files will be added.
  • string $viewurl: URl of the folder in which the files can be viewed
  • string $destfile: Name for the output files (excluding extension, such as .jpg). The page numbers will be appended automatically, before the extension
  • string $destfileext: Extension for destination files, not including the dot. (e.g. "jpg" or "png").
  • string $destname: Basic name to use for each imported slide. The page numbers will be appended automatically.
  • integer $position: The position within the Presentation to add the new slides. Optional. Default is to put them at the end.
_import_MagickWand (line 248)

Imports the given file using the MagickWand extension if possible. (Internal only)

  • return: If successful, an integer indicating the number of slides loaded is displayed. If the import does not (or cannot) work, then boolean false is returned.
  • access: private
integer|bool _import_MagickWand (SloodleModulePresenter $presenter, string $srcfile, string $destpath, string $viewurl, string $destfile, string $destfileext, string $destname, [integer $position = -1])
  • SloodleModulePresenter $presenter: An object representing the Presenter we are importing into.
  • string $srcfile: Full path of the PDF file we are importing
  • string $destpath: Folder path to which the imported files will be added.
  • string $viewurl: URL of the folder in which the imported files will be viewed
  • string $destfile: Name for the output files (excluding extension, such as .jpg). The page numbers will be appended automatically, before the extension
  • string $destfileext: Extension for destination files, not including the dot. (e.g. "jpg" or "png").
  • string $destname: Basic name to use for each imported slide. The page numbers will be appended automatically.
  • integer $position: The position within the Presentation to add the new slides. Optional. Default is to put them at the end.

Inherited Methods

Inherited From SloodlePluginBasePresenterImporter

 SloodlePluginBasePresenterImporter::import()

Inherited From SloodlePluginBase

 SloodlePluginBase::get_id()
 SloodlePluginBase::get_plugin_description()
 SloodlePluginBase::get_plugin_name()
 SloodlePluginBase::get_version()

Documentation generated on Fri, 17 Jul 2009 11:02:21 +0100 by phpDocumentor 1.4.0