Skip to content

classes_tasks_pdfprinttask.class

Daniel Spors edited this page Feb 14, 2023 · 4 revisions

Classes in file tasks/pdfprinttask.class.php

class PdfPrintTask

Wraps PDF printing using puppeteer

Namespace: ScavixWDF\Tasks

Extends: Task

detectPuppeteer

INTERNAL Checks if puppeteer is installed correctly

IsPrinterCall

Helper method to detect active puppeteer calls. May be used from within page renderer to detect if the call is from this task.

Definition: public static function IsPrinterCall()

Returns: bool true or false

Run

Runs PDF creation.

Definition: public function Run($args)

Returns: void

Parameters:

  • array $args Named args: url= pdf=

Url2Pdf

Actual PDF creation. This may be used sync from PHP code or async via Task.

Definition: public static function Url2Pdf($url)

Returns: string|false Returns the PDF filename or false on error

Parameters:

  • string $url The URL to render as PDF
Clone this wiki locally