Forum


Replies: 3   Views: 3160
Embedded fpdi conflicts
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by Edics  · 09-11-2016 - 09:49

Here is a simple code sample we use :

     $pdf = new FPDI();
        $pageCount = $pdf->setSourceFile($filename);
        for ($i = 1; $i <= $pageCount; $i++) { 
                $tplidx = $pdf->ImportPage($i);
                $pdf->AddPage();
                $pdf->useTemplate($tplidx);
                if ($i != $pageCount or $pageCount == 1){
                        $pdf->Image('00123456.png',178,45,0);
                }
        }
        $pdf->Output($filename, 'F');

Basically, it adds an image on each page of a PDF file.

Until we buy PHPDOCX, we were using this program and all was working fine. But now we include PHPDOCX in our scripts and its seems that it has its own embedded FPDI version.

The problem is that this embedded version is slightly different from the older one we had, and now, using the program above adds strange borders to our documents.

So is there a way to include both PHPDOCX and another FPDI version without having conflicts ? Or is there something we can do to remove those strange borders (on top and bottom of document) ?

Regards