Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

Image on page header

Locked
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Image on page header

Unread post by Fike »

I am using latest version of nuBuilder Pro.

When I place an image on the REPORT HEADER (specifing the image's code or URL) the image displays correctly in the PDF report. However, when I move the image to the PAGE HEADER, I get the following error message when I try to get the PDF report:

FPDF error: Image file has no extension and no type was specified:


Any idea of why this could be happening?

Kind regrads,


Fike
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Re: Image on page header

Unread post by Fike »

More details,

When I erase all fields from the DETAILS section I am able to display the image on the PAGE HEADER of the PDF report, but as soon as I add one field to the DETAILS section, I get the error message again.

Kind regards,


Fike
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Re: Image on page header

Unread post by Fike »

It seems that the error occurs only when the PDF is more than 1 page long.

The program does not find the image that needs to be inserted on the second page (which is the same image of the first page as it is on PAGE HEADER section).

Maybe the temporary image saved on the TMP directory is erased as soon as it is inserted on the first page, or the variable which contains the image's name and extension is getting cleared as soon as the im,age is inserted on the first page.

Regards,

Fike
Fike
Posts: 79
Joined: Thu Oct 20, 2011 9:13 pm

Re: Image on page header

Unread post by Fike »

I found a fix.

I just added this line between lines 134 and 135 of nurunpdf.php file

Code: Select all

$DATA[$s]->objects[$o]->path = $O->path;
Therefore lines 134 to 137 become:

Code: Select all

            if($O->objectType == 'image'){
			       $DATA[$s]->objects[$o]->path = $O->path;
                nuPrintImage($PDF, $DATA[$s], $DATA[$s]->objects[$o], $O);                                                           //-- print graphic
            }
Kind regards,

Fike
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: Image on page header

Unread post by admin »

.
Locked