PHP code example of pointybeard / pdfchip

1. Go to this page and download the library: Download pointybeard/pdfchip library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

pointybeard / pdfchip example snippets




declare(strict_types=1);

int version information
print PdfChip\PdfChip::version() . PHP_EOL;

// Generate a PDF from input files
PdfChip\PdfChip::process(
    ["test.html", "test2.html"],
    "test.pdf",
    [
        "maxpages" => 1,
        "zoom-factor" => 3,
        "remote-content" => "off",
        "licensetype" => "all",
        "use-system-proxy",
        "underlay" => ["file.pdf", "file2.pdf"]
    ],
    $o,
    $e
);

var_dump($o, $e);