Image on page header

Image on page header

Postby Fike » Tue Apr 08, 2014 2:24 am

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: Fri Oct 21, 2011 4:43 am

Re: Image on page header

Postby Fike » Tue Apr 08, 2014 4:26 am

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: Fri Oct 21, 2011 4:43 am

Re: Image on page header

Postby Fike » Tue Apr 08, 2014 5:25 am

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: Fri Oct 21, 2011 4:43 am

Re: Image on page header

Postby Fike » Tue Apr 08, 2014 9:38 am

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
Fike
 
Posts: 79
Joined: Fri Oct 21, 2011 4:43 am

Re: Image on page header

Postby admin » Fri Feb 20, 2015 1:42 pm

.
admin
Site Admin
 
Posts: 3162
Joined: Mon Jun 15, 2009 9:53 am


Return to Report Writer