Image in pdf

i do this and he cant find it

pdf.Image('/products/logo2.jpg',10,8,86,0,'JPG')

the folder and image is under C:\rails\eshop\public\images, or is this only
for the web, if so where to put it for the pdf?

Um. Which PDF creator are you using? I'd guess that you're using FPDF
for Ruby; I'd personally recommend PDF::Writer, but I'm biased.

You will need to fully specify the path in any case, though, as the
Ruby program doesn't know anything about relative path from the web
root. You can potentially just specify
"public/images/products/logo2.jpg".

-austin

···

On 9/24/05, Nick <glenn.brutyn@telenet.be> wrote:

i do this and he cant find it

pdf.Image('/products/logo2.jpg',10,8,86,0,'JPG')

the folder and image is under C:\rails\eshop\public\images, or is this only
for the web, if so where to put it for the pdf?

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca

and another thing, how can i do footers and headers in fpdf???

i get this error using fpdf

pdf.Image('public/images/products/PIDVR108.jpg',20,200,100,'JPG')

error:
undefined local variable or method `data' for
#<FPDF:0x3709a18>/lib/fpdf/fpdf.rb:1317:in `parsejpg'
/lib/fpdf/fpdf.rb:821:in `Image'
/app/controllers/product_controller.rb:41:in `gen_pdf'
/app/controllers/product_controller.rb:27:in `pdf'
script/server:49when i change the path to something else (i enter a wrong
path): then no such directory or file,so he find the file.anyone can help me

Which operating system are you using?

Can you try the same thing with PDF::Writer (gem install pdf-writer)?
It's a different API, but the sort of message returned will be
informative. It's also clearly documented how to do headers and
footers in the 95-page manual.

-austin

···

On 9/25/05, Nick <glenn.brutyn@telenet.be> wrote:

i get this error using fpdf

pdf.Image('public/images/products/PIDVR108.jpg',20,200,100,'JPG')

error:
undefined local variable or method `data' for
#<FPDF:0x3709a18>/lib/fpdf/fpdf.rb:1317:in `parsejpg'
/lib/fpdf/fpdf.rb:821:in `Image'
/app/controllers/product_controller.rb:41:in `gen_pdf'
/app/controllers/product_controller.rb:27:in `pdf'
script/server:49when i change the path to something else (i enter a wrong
path): then no such directory or file,so he find the file.anyone can help me

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca