Reputation: 31
I am using FPDM library of FPDF to fill my pdf form and then trying to flatten it.
My code is :
$fields = array(
'name' => 'My name',
'address' => 'My address',
'city' => 'My city',
'phone' => 'My phone number'
);
$pdf = new FPDM('template.pdf');
$pdf->Load( $fields, false );
$pdf->Merge();
$pdf->Flatten();
$pdf->Output();
But it gives error saying - FPDF-Merge Error: Sorry but pdftk binary is not provided .
As I am a new developer i have very less idea of existing libraries.
So Please help me to find the cause of this error and solution as well.
Upvotes: 3
Views: 1136
Reputation: 349
fpdm requires pdftk for some features, including flatten.
* V2.5 (06.12.2010) pdftk support for flatten mode and more...special *
* christmas release to the fpdf fanclub even if the red guy is busy *
There is a related question in the issue queue.
Unfortunately it's hard to find a pure PHP solution for manipulating PDFs.
Upvotes: 1