0

I'm new to FPDI, until now I just used FPDF to create my PDFs in PHP. Now I wanted to attach some other documents to one of my FPDF reports. So I have the report (with a lot of FPDF cells with texts and some images) and want to add new pages at the end of this report that contain pages from another PDF.

I've used the example at https://www.setasign.com/products/fpdi/about/ to import only one page at the end of the document:

$pageCount = $pdf->setSourceFile($uri);
$pageId = $pdf->importPage(1);
$pdf->addPage();
$pdf->useImportedPage($pageId, 10, 10, 90);

The result is that all the text of the original report (and even the images) is gone and - guess what: the new page at the end of the document is also empty. The cells of the original document are drawed (the ones that have background are also colored) but there is no text (even if I try to select it so its not a problem of the text color).

Can someone help me with this problem?

acb1980
  • 145
  • 3
  • 15
  • Are you using the latest FPDF version? If not, upgrade first. – Jan Slabon Nov 26 '18 at 10:41
  • Yes, it's the latest (1.8.1) version... – acb1980 Nov 27 '18 at 16:19
  • Can you create a simple POC which would let us reproduce this issue? And could you provide such faulty result? – Jan Slabon Nov 28 '18 at 07:05
  • I found the reason for this issue - but no solution until now. I'm using another extension to FPDF, PDF_ImageAlpha to display transparent PNG files in the PDFs which is incompatible with FPDI... – acb1980 Nov 29 '18 at 20:21
  • Alpha channel for PNG files are supported by default since v1.7 (2011-06-18). The mentioned extension is not official available anymore. – Jan Slabon Nov 30 '18 at 08:02

0 Answers0