Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » How To » Where does <imagename> search for the image in pdf multi?
Where does <imagename> search for the image in pdf multi? [message #1797] Fri, 07 November 2008 04:59 Go to next message
bonzo_bcn is currently offline  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 Go to previous messageGo to next message
AJM is currently offline  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.


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 Go to previous messageGo to next message
bonzo_bcn is currently offline  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 #1801 is a reply to message #1799] Fri, 07 November 2008 16:59 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2371
Registered: April 2006
Location: Surrey, UK
Senior Member
You are right, 'image' does not work with 'multi', but it should. I will look at it and get back to you as soon as I can.

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 Go to previous message
AJM is currently offline  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.


Previous Topic: Use a table with only rdcaccount_id as primary key
Next Topic: How to default values in output4 screen?
Goto Forum:
  


Current Time: Sat Nov 30 00:50:04 EST 2024

Total time taken to generate the page: 0.03115 seconds