Where does <imagename> search for the image in pdf multi? [message #1797] |
Fri, 07 November 2008 04:59 |
bonzo_bcn
Messages: 152 Registered: June 2008
|
Senior Member |
|
|
I have this code in a report.inc file:
$structure['multi1']['fields'][6][] = array('image' => 'images/logo_print.jpg','imagewidth' =>30,'width' => 20, 'align' => 'center','x'=> 5);
But I can't figure out where should I place the image and what should be the path, I've tried several options but it didn't work.
|
|
|
Re: Where does <imagename> search for the image in pdf multi? [message #1798 is a reply to message #1797] |
Fri, 07 November 2008 06:02 |
AJM
Messages: 2371 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
If you looked at the PDF example in the XAMPLE subsystem you would see straight away that the path name for images is relative to the current working directory, i.e. the directory from which the current script is being run. So, when a script in the XAMPLE subsystem is run the current working directory is 'radicore/xample', which means that the 'images' directory can be found at 'radicore/xample/images'.
Therefore you should be using an 'images' directory which is located in your subsystem directory.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|
Re: Where does <imagename> search for the image in pdf multi? [message #1799 is a reply to message #1797] |
Fri, 07 November 2008 06:10 |
bonzo_bcn
Messages: 152 Registered: June 2008
|
Senior Member |
|
|
Before posting I looked at that example and tried placing it there, but it didn't work.
If I put this code:
$structure['title'][] = array('image' => 'images/radicore.jpg',
'imagewidth' => 84,
'imageheight' => 45);
the image is displayed, but with this:
$structure['multi1']['fields'][6][] = array('image' => 'images/radicore.jpg','imagewidth' =>30,
'width' => 20, 'align' => 'center','x'=> 5
);
the image isn't displayed
could it be that the 'image' doesnt work with multi?
[Updated on: Fri, 07 November 2008 06:18] Report message to a moderator
|
|
|
|
Re: Where does <imagename> search for the image in pdf multi? [message #1802 is a reply to message #1801] |
Sat, 08 November 2008 07:01 |
AJM
Messages: 2371 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Here is a patch which addresses your problem. I have tested it with the following line in the report structure file:
$structure['multi1']['fields'][1][] = array('field' => 'picture',
'width' => 75,
'notext' => 'y');
Note that <imagewidth> and <imageheight> are supplied in the field's entry in the $fieldspec array.
The 'notext' entry is optional. If it is not there the field name for the image will appear after the image.
Note that each line which is output from the 'multi*' area will be as deep as the deepest cell.
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
|
|
|