akrambe/shotify

Html to PDF and web page screenshots using headless Chrome with no need for Nodejs/npm.

0.1 2019-07-29 05:15 UTC

This package is auto-updated.

Last update: 2024-04-29 04:59:28 UTC


README

License: GPL v3 Build Status Packagist Version PHP from Packagist

No need for Nodejs/npm!

Documentation

Installation

The best way to install this package is through your terminal via Composer.

composer require akrambe/shotify

Usage

<?php

require('vendor/autoload.php');

// PDF print from url
Shotify\Launcher::fromUrl('http://example.com')
            ->saveToPDF('example.pdf');

// Screenshot
Shotify\Launcher::fromUrl('http://example.com')
            ->captureScreenshot('hello.png',
                (new Shotify\Options\ScreenshotOptions)
                    ->setQuality(70)
                    ->setFormat('png')
            );
            
// Get document outer HTML
$html = Shotify\Launcher::fromUrl('http://example.com')
            ->outerHtml();
            

License

Shotify is licensed under the terms of the GNU General Public License v3.0 (See LICENSE file for details).