You are here

function print_epub_generate_html in Printer, email and PDF versions 7.2

Generate a EPUB version of the provided HTML.

Parameters

string $html: HTML content of the EPUB.

array $meta: Meta information to be used in the EPUB

  • url: original URL
  • name: author's name
  • title: Page title
  • node: node object.

string $filename: (optional) Filename of the generated EPUB.

Return value

string|null generated EPUB page, or NULL in case of error

See also

print_epub_controller()

Related topics

1 call to print_epub_generate_html()
print_epub_generate_path in print_epub/print_epub.pages.inc
Gennerate a EPUB for a given Drupal path.

File

print_epub/print_epub.module, line 203
Displays Printer-friendly versions of Drupal pages.

Code

function print_epub_generate_html($html, $meta, $filename = NULL) {
  $epub_tool = explode('|', variable_get('print_epub_epub_tool', PRINT_EPUB_EPUB_TOOL_DEFAULT));
  module_load_include('inc', $epub_tool[0], $epub_tool[0] . '.pages');
  $function = $epub_tool[0] . '_print_epub_generate';
  if (function_exists($function)) {
    return $function($html, $meta, $filename);
  }
  return NULL;
}