pdftk in php not working
here is the code.... it is not able to merge two pdf files ...can anyone find what 开发者_Go百科the problem is in the code... thanks for ur time....
You're using the wrong syntax.
Right code should looks like such this:
// prepare command escaping paths of your files
$parts = '';
foreach( array( 'file1.pdf', 'file2.pdf' ) as $part )
$parts .= escapeshellarg( $part ) . ' ';
// build command
$command = sprintf( 'pdftk %s cat output %s', $parts, escapeshellarg($output) );
// launch it
system( $command, $returnvalue );
if( $returnvalue ) printf 'There was an error.';
Next time note: please choose a more-specific title and remove unnecessary code.
精彩评论