469,920 Members | 2,403 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,920 developers. It's quick & easy.

fpdf image problem

K.
Hello!

Could you be so kind and help me with one problem I have.

I would like to put an image into the table while creating PDF file. I use
fpdf class (www.fpdf.org).

I cannot find any example in internet and group archieves and www.fpdf.org
page.

Thank you in advance
Marcin
Mar 22 '07 #1
3 29868
"K." wrote:
>
Hello!

Could you be so kind and help me with one problem I have.

I would like to put an image into the table while creating PDF file. I use
fpdf class (www.fpdf.org).

I cannot find any example in internet and group archieves and www.fpdf.org
page.
Say what? It's right there in the Manual under "Image".
Also in the tutorials--see #2.

Example:
$this->Image('logo_pb.png',10,8,33);
Mar 22 '07 #2
MZ

Uzytkownik "Gary Hasler" <ga********@thelogconnection.comnapisal w
wiadomosci news:46**************@thelogconnection.com...
"K." wrote:
>>
Hello!

Could you be so kind and help me with one problem I have.

I would like to put an image into the table while creating PDF file. I
use
fpdf class (www.fpdf.org).

I cannot find any example in internet and group archieves and
www.fpdf.org
page.

Say what? It's right there in the Manual under "Image".
Also in the tutorials--see #2.

Example:
$this->Image('logo_pb.png',10,8,33);

I knew this solution, but this code $this->Image('logo_pb.png',10,8,33)
doesn`t work when I put this into the table.
I would like to put image into the 4th column

$this->Cell($w[0],6,$wiersz["pozycja_aktualna"],'LR');
$this->Cell($w[1],6,$wiersz["pozycja_poprzednia"],'LR');
$this->Cell($w[2],6,$wiersz_il_tyg["ilosc_tyg"],'LR',0,'R');
$this->Cell($w[3],6,$ile_oczek_gora_dol,'LR',0,'R');
$this->Cell($w[4],6,'A','LR',0,'R');
$this->Ln();

but when I replace code

$this->Cell($w[4],6,'A','LR',0,'R');

on/for:
$image_photo=$this->Image('logo_pb.png',10,8,33);
$this->Cell($w[4],$image_photo,'LR',0,'R');
or
$this->Cell($w[4],$this->Image('logo_pb.png',10,8,33);,'LR',0,'R');
both of two ways don`t work, and I don`t know why

How to write the right code to make it work?

Thank you in advance for help
Marcin
Mar 22 '07 #3
MZ

Użytkownik "MZ" <ma**************@poczta.onet.plnapisał w wiadomo¶ci
news:et**********@news.onet.pl...
>
Uzytkownik "Gary Hasler" <ga********@thelogconnection.comnapisal w
wiadomosci news:46**************@thelogconnection.com...
>"K." wrote:
>>>
Hello!

Could you be so kind and help me with one problem I have.

I would like to put an image into the table while creating PDF file. I
use
fpdf class (www.fpdf.org).

I cannot find any example in internet and group archieves and
www.fpdf.org
page.

Say what? It's right there in the Manual under "Image".
Also in the tutorials--see #2.

Example:
$this->Image('logo_pb.png',10,8,33);


I knew this solution, but this code $this->Image('logo_pb.png',10,8,33)
doesn`t work when I put this into the table.
I would like to put image into the 4th column

$this->Cell($w[0],6,$wiersz["pozycja_aktualna"],'LR');
$this->Cell($w[1],6,$wiersz["pozycja_poprzednia"],'LR');
$this->Cell($w[2],6,$wiersz_il_tyg["ilosc_tyg"],'LR',0,'R');
$this->Cell($w[3],6,$ile_oczek_gora_dol,'LR',0,'R');
$this->Cell($w[4],6,'A','LR',0,'R');
$this->Ln();

but when I replace code

$this->Cell($w[4],6,'A','LR',0,'R');

on/for:
$image_photo=$this->Image('logo_pb.png',10,8,33);
$this->Cell($w[4],$image_photo,'LR',0,'R');
or
$this->Cell($w[4],$this->Image('logo_pb.png',10,8,33);,'LR',0,'R');
both of two ways don`t work, and I don`t know why

How to write the right code to make it work?

Thank you in advance for help
Marcin

OK. I found out about it myself.

Here is the resolution:

$this->Cell($w[4],6,$this->Image('img/lp_ikona_up.png',$this->GetX(),$this->GetY()),'LR',0,'R');

Marcin
Mar 22 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Phillip T. Murphy | last post: by
1 post views Thread by Rob Parker | last post: by
1 post views Thread by Holly | last post: by
3 posts views Thread by Mr Newbie | last post: by
2 posts views Thread by pdh12783 | last post: by
reply views Thread by dimitri pater | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.