473,327 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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 30273
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Phillip T. Murphy | last post by:
Not sure if this is the correct forum, but since FPDF is a PHP script, I thought I would give it a try... I am having a problem getting ANYTHING to print in a header using the FPDF functions. I...
1
by: Rob Parker | last post by:
I posted this with a different subject line (in two posts - I added additional info in the second) in this newsgroup a few days ago, but haven't had a single response. Hopefully, that was because...
7
by: Nilesh | last post by:
I am using background-image attribute in a CSS file and linking the CSS file to aspx page. But strangly, background-image attribute is not working for relative URL. e.g. If I apply following css...
1
by: Holly | last post by:
Hi, I have a page (A) that allows users to enter addresses and displays direction information and map images. The page A calls Microsoft's mappoint web service, gets the route info and map image....
3
by: Mr Newbie | last post by:
I know this is going to be embarresingly simple, but I cant see the wood for the trees at the moment. If I create a webform and place an image control on it and select ( Browse an image ) it...
2
by: s.danyal.k | last post by:
Hi All, I have created an application in C# that converts HTML file to MS word documents. The HTML file may also have images , for e.g "<img src='http://www.google.com.pk/images/hp0.gif'></img>"....
2
by: pdh12783 | last post by:
HI All, I am having a problem saving the image in when using this code. The Language i am using is VB.NET 2005 Dim dlgImage As New OpenFileDialog dlgImage.Filter = "Image...
0
by: dimitri pater | last post by:
---------- Forwarded message ---------- From: dimitri pater <dimitri.pater@gmail.com> Date: Sep 5, 2007 9:13 PM Subject: Re: StringIO MySQL data blob Image problem To: Tim Golden...
0
by: ShirishKumar | last post by:
Hi to all, I have a problem regarding Image. I am opening a .aspx page through Javascript with the method window.open() by pop-up ,whenever i change the dropdown selected value with the onchange...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.