PHP code example of kinncj / pdfcrowd-bundle

1. Go to this page and download the library: Download kinncj/pdfcrowd-bundle 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/ */

    

kinncj / pdfcrowd-bundle example snippets

 php
// File: app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Amp\PDFCrowdBundle\AmpPDFCrowdBundle(),
        // ...
    );
}
 php
$pdfCrowd = $this->get('amp_pdf_crowd.api');
$url = $this->generateUrl('route_name', array(), true);

$pdfData = $pdfCrowd->convertURI($url);
$fileName = $this->container->getParameter('kernel.root_dir') . '/../web/pdfs/example.pdf';

file_put_contents($fileName, $pdfData); // Make sure this directory is writable