note 64158 deleted from ref.fdf by mazzanet
| From: | mazzanet@php.net | Date: | Sun, 09 Apr 2006 07:42:24 +0000 |
| Subject: | note 64158 deleted from ref.fdf by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-107585@lists.php.net to get a copy of this message | ||
Note Submitter: g8z at yahoo dot com
Reason: useless
----
<?php
/**
* Windows function to flatten an FDF file to a PDF document
* You can download pdfmerger.exe (free of course) from here:
* http://www.tufat.com/downloads/pdfmerger.zip
* Courtest of Darren's Script Archive: http://tufat.com
*/
function convertToPDF($path_to_pdf_file , $path_to_fdf_file, $path_to_new_pdf_file )
{
@unlink( $path_to_new_pdf_file );
exec( "pdfmerger.exe $path_to_pdf_file fill_form $path_to_fdf_file output
$path_to_new_pdf_file flatten" );
// if you have spaces in your directory paths, use this:
// exec( "$path_to_exe \"$path_to_pdf_file\" fill_form
\"$path_to_fdf_file\" output \"$path_to_new_pdf_file\" flatten" );
}
convertToPDF(
'"c:/path/to/file.pdf"',
'"c:/path/to/file.fdf"',
'"c:/path/to/output.pdf"'
);
?>