-
Notifications
You must be signed in to change notification settings - Fork 34
classes_tasks_pdfprinttask.class
Daniel Spors edited this page Nov 14, 2024
·
4 revisions
Wraps PDF printing using puppeteer
Extends: Task
INTERNAL Checks if puppeteer is installed correctly
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
Runs PDF creation.
Definition: public function Run($args)
Returns: void
Parameters:
-
array $argsNamed args: url= pdf=
Actual PDF creation. This may be used sync from PHP code or async via Task.
Definition: public static function Url2Pdf($url, $options)
Returns: string|false Returns the PDF filename or false on error
Parameters:
-
string $urlThe URL to render as PDF -
array $optionsSome parameters are available to be specified as options. See source code for details.