I import a PDF file with 2 pages using fpdi, it works.
I need to insert an image in my imported pdf but its in under the original pdf layout so I cant see the image that i want to insert. By the way, I can add text and it works properly.
I do the same thing in the second page of my pdf and it works, i can see the image (jpg and png). In my 2nd page of my original pdf I dont have any layout/image coming from the original imported pdf.
I need a z-index property like in css/html
preguntado el 08 de noviembre de 11 a las 12:11
Since you are importing data from a PDF file I don't know how it handles it. Are you getting elements as text or image? I guess that you are trying to get an image-converted PDF (you're reading an image, like a snapshot of the page, and not text items) over an image on the background. I guess that this won't work if the original PDF conversion was made with JPG.
Let me know if that's happening.
If you print on the page before importing template page - it works . here is my code :
$pdf - > AddPage(); //draw watermark $pdf - > SetTextColor(215, 215, 215); $pdf - > SetFont('Times', '', 90); $pdf - > RotatedText(24.5, 234.5, $school_data['watermark'], 45); $pdf - > SetTextColor(0, 0, 0); //load template pdf - > setSourceFile('reports/template.pdf'); $tplIdx = $pdf - > importPage(1); $pdf - > SetAutoPagebreak(false, 0); //use the imported page and place it at point 0,0; calculate width and height //automaticallay and ajust the page size to the size of the imported page $pdf - > useTemplate($tplIdx, 0, 0, 0, 0, false);