You are here

interface ConvertToPdfInterface in PDF using mPDF 8

Same name and namespace in other branches
  1. 8.2 src/ConvertToPdfInterface.php \Drupal\pdf_using_mpdf\ConvertToPdfInterface

Provides an interface defining methods needed for PDF generation.

Hierarchy

Expanded class hierarchy of ConvertToPdfInterface

All classes that implement ConvertToPdfInterface

1 file declares its use of ConvertToPdfInterface
ConvertToPdf.php in src/Conversion/ConvertToPdf.php

File

src/ConvertToPdfInterface.php, line 8

Namespace

Drupal\pdf_using_mpdf
View source
interface ConvertToPdfInterface {

  /**
   * Converts HTML to PDF.
   *
   * Point of call to instantiate the mPDF library
   * and call the generator functions for creating a
   * PDF file.
   *
   * @param string $html
   *   The html that will be converted into PDF content.
   *
   * @return mixed
   *   Generated output or empty.
   */
  public function convert($html);

  /**
   * Converts html to PDF and return as a string.
   *
   * @param string $html
   *   The html that will be converted into PDF content.
   *
   * @return string
   *   Generated output as string or empty.
   */
  public function convertToString($html);

}

Members

Namesort descending Modifiers Type Description Overrides
ConvertToPdfInterface::convert public function Converts HTML to PDF. 1
ConvertToPdfInterface::convertToString public function Converts html to PDF and return as a string. 1