FPDF image under layout

I am importing a PDF file with 2 pages using fpdi, it works.

I need to paste the image into the imported pdf, but it is in the original pdf format, so I can not see the image I want to insert. By the way, I can add text and it works correctly.

I do the same on the second page of my PDF document and it works, I see the image (jpg and png). On my second page of my original pdf, I have no layout / image from the original imported pdf.

I need the z-index property, as in css / html

SOURCE: http://pastebin.com/45BEY7fw

+4
source share
2 answers

Try the following: http://forums.devshed.com/php-development-5/fpdf-background-image-510220.html

Since you are importing data from a PDF file, I do not know how it processes it. Do you get items like text or image? I assume that you are trying to get a PDF with image conversion (you are viewing an image, such as a screenshot of a page, not text elements) above the image on the background. I think this will not work if the original PDF conversion was done using JPG.

Let me know if this happens.

+3
source

If you print on a page before importing a 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); 
0
source

Source: https://habr.com/ru/post/1380174/


All Articles