PHP code example of siad007 / fop

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

    

siad007 / fop example snippets


use siad007\Fop\Command as Fop;
use siad007\Fop\Arguments as Args;
use siad007\Fop\Options as Opts;

$args = new Args();
$args['fo']  = __DIR__ . '/../data/test.fo';
$args['pdf'] = __DIR__ . '/../output/test.pdf'

$opts = new Opts();
$opts->setQuiet(true);

$fop = new Fop($args, $opts);
$fop->generatePdf();