You are here

protected function MpdfGenerator::postGenerate in PDF generator API 2.x

Post generation cleanup.

1 call to MpdfGenerator::postGenerate()
MpdfGenerator::save in src/Plugin/PdfGenerator/MpdfGenerator.php
Generate and save the PDF at a specific location.

File

src/Plugin/PdfGenerator/MpdfGenerator.php, line 234
Contains \Drupal\pdf_api\Plugin\MpdfGenerator.

Class

MpdfGenerator
A PDF generator plugin for the mPDF library.

Namespace

Drupal\pdf_api\Plugin\PdfGenerator

Code

protected function postGenerate() {
  $filesystem = \Drupal::service('file_system');
  $filesystem
    ->deleteRecursive($this->tmpDir);
}