You are here

ConvertToPdfInterface.php in PDF using mPDF 8

Same filename and directory in other branches
  1. 8.2 src/ConvertToPdfInterface.php

File

src/ConvertToPdfInterface.php
View source
<?php

namespace Drupal\pdf_using_mpdf;


/**
 * Provides an interface defining methods needed for PDF generation.
 */
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);

}

Interfaces

Namesort descending Description
ConvertToPdfInterface Provides an interface defining methods needed for PDF generation.