You are here

pdf_export.api.php in PDF Export 7

Documentation for PDF Export.

File

pdf_export.api.php
View source
<?php

/**
 * @file
 * Documentation for PDF Export.
 */

/**
 * Change block definition before saving to the database.
 *
 * @param string $html
 *   The exported HTML ready to be exported. You can add your extra content to
 *   it or remove/rewrite whatever you need.
 *
 * @param string $filename
 *   The filename of the file to be exported.
 */
function hook_pdf_export_html_alter(&$html, $filename) {

  // Add a cover on the first page.
  $cover = theme('pdf_cover');
  $html = $cover . $html;
}

/**
 * Define libraries processors.
 *
 * An array indexed by the library machine name containing:
 *   name: Human readable name of the library.
 *   class: Process adapter name.
 *   file: Relative path to the processor file without extension.
 */
function hook_pdf_export_processor_info() {
  return array(
    'library_key' => array(
      'name' => 'My Library',
      'class' => 'PdfExportMyLibraryProcessor',
      'file' => 'includes/PdfExportMyLibraryProcessor',
    ),
  );
}

Functions

Namesort descending Description
hook_pdf_export_html_alter Change block definition before saving to the database.
hook_pdf_export_processor_info Define libraries processors.