steinbauerit/neos-headlesschrome

There is no license information available for the latest version (0.0.1) of this package.

A Neos Flow package to use Headless Chrome print to pdf.

Installs: 115

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:neos-package

0.0.1 2023-08-06 17:09 UTC

This package is not auto-updated.

Last update: 2024-04-15 18:53:15 UTC


README

Caution: This package is in development!

Installation

Just run:

composer require steinbauerit/neos-headlesschrome

Install chromium on your machine

Here, for example, alpine linux

apk update
apk upgrade
apk add chromium

Determine the binary location of your Chrome installation

which chromium-browser

Configuration

SteinbauerIT:
  Neos:
    HeadlessChrome:
      chromeExecutable: '/usr/bin/chromium-browser'
      defaultAttributes:
        - 'disable-gpu'
        - 'no-margins'
        - 'no-sandbox'

Usage

use SteinbauerIT\Neos\HeadlessChrome\Print2Pdf;

$print2Pdf = new Print2Pdf();
$print2Pdf->setSource($source);
$print2Pdf->setTargetDirectory($targetPath);
$print2Pdf->setAttributes(
    ['foo', 'bar']
);
$result = $print2Pdf->execute(); // Path to the printed PDF

Author