By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,077 Members | 1,175 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,077 IT Pros & Developers. It's quick & easy.

fpdf image problem

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
"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

P: n/a
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

P: n/a
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.