473,770 Members | 1,880 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 30341
"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********@the logconnection.c omnapisal w
wiadomosci news:46******** ******@thelogco nnection.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_aktual na"],'LR');
$this->Cell($w[1],6,$wiersz["pozycja_poprze dnia"],'LR');
$this->Cell($w[2],6,$wiersz_il_t yg["ilosc_tyg"],'LR',0,'R');
$this->Cell($w[3],6,$ile_oczek_g ora_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=$t his->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********@the logconnection.c omnapisal w
wiadomosci news:46******** ******@thelogco nnection.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_aktual na"],'LR');
$this->Cell($w[1],6,$wiersz["pozycja_poprze dnia"],'LR');
$this->Cell($w[2],6,$wiersz_il_t yg["ilosc_tyg"],'LR',0,'R');
$this->Cell($w[3],6,$ile_oczek_g ora_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=$t his->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
15756
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 can get text to go into the main body of the PDF file, but nothing into a header. I have messed with this for several hours, seached the web and no luck. Any help would be greatly appreciated. Here is my script - which prints "Test Output" in...
1
1775
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 I posted at the weekend, and the experts were all having a well-earned rest and missed it first time around. I'm hoping someone here can help - I've had no joy in other avenues. Now to the problem: Using Access 2002: I have downloaded a...
7
5129
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 ..navbar-background { background-image: url(images/menubar.gif); } the image is not appearing on the page. It seems that IE is picking
1
2425
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. Page A contains an image button with the image url set as MapOutput.aspx <asp:imagebutton id="ibtnMap" runat="server" ImageUrl="MapOutput.aspx"></asp:imagebutton> After page A got the image, it stores the image into
3
1063
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 appears for me on the page, and if I launch the browser, it allso appears ( Note the image property has the Fil:/// x x x x /x x x x URL. However, if I make the URL http://MyLocalMachine/MyAspNetApplication/Image.jpeg then this will not
2
4996
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>". The HTML file saved into .doc file. Now the problem is that whenever the .doc file is opened it goes to the link mentioned in the <imgtag. This means that only the link is saved in the .doc file and not the ACTUAL image. Now I want the actual...
2
1154
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 Files (*.bmp, *.gif, *.jpg)|*.bmp;*.gif;*.jpg" If dlgImage.ShowDialog = Windows.Forms.DialogResult.OK Then Dim fs As New StreamReader(dlgImage.FileName)
0
423
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 <mail@timgolden.me.uk> Dear Tim, you are right of course, I have been trying to put the StringIO in a temp file: cfoto=StringIO
0
811
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 attribute added to it. Whenever i show a popup.. ia m showing a different image depending up on the selected value of dropdown. But the page events are firing if there is a change in dropdown. other wise the page events are not firing but image is...
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10257
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.