[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [hobbit] PDF Reports



DING DING DING!!

That is one of the things I nneded to do to get  my graphs to work - remove the "-woalpha" from the imagePNG statements.

Regards,
Chris 

-----Original Message-----
From: Thomas Séglard [mailto:tsg (at) bluekiwi-software.com] 
Sent: 10 March 2010 18:18
To: hobbit (at) hswn.dk
Subject: Re: [hobbit] PDF Reports

I think something is broken - again - in the transparency conversion. I quote Johan Grotherus (thanks to him) who said something very useful about this. Could you try his workaround, please ?

"--start of quote

I have checked the scripts and found the problem to be in the analysis.skel.php and report.skel.php files.

This is the original code from report.skel.php

//
// Place the cpu load graph and text here //
       $pdf->SetXY(25,30);
       $pdf->Image($imageload,10,26,0,13) ;
       $pdf->Titre($titreload);
       if (file_exists($graphload)) {
               $img = ImageCreateFromPNG($graphload) ;
               imageAlphaBlending($img, false);
               imageSaveAlpha($img, false);
               imagePNG($img, "$graphload-woalpha.png");
               
$pdf->Image("$graphload-woalpha.png",10,40,190,60,$extn,'', true, 72) ;
               unlink("$graphload-woalpha.png");
       } else {
               $pdf->Cell(10,20,$nograph,0,1) ;
               $pdf->Ln(80);
       }

I simply used the sed command to change the imagePNG($img, "$graphload-woalpha.png"); to imagePNG($img, "$graphload"); to get it to work. I did that for every section.

--end of quote
"

Cheers,

Thomas Séglard

wiskbroom (at) hotmail.com a écrit :
>   
>> 1) could you please, try an older version of TCPDF ? I suspect an 
>> incompatibility between your RRDTOOL version and TCPDF.
>>     
>
> I haven't done this yet, but I will try after sending you the data 
> below, but I am only able to see the two most recent at 
> http://sourceforge.net/projects/tcpdf/files/
>
>   
>> 2) could you give me the output for this command :
>> shell$ file pdf/graphrrd/CLIENT/load.CLIENT-year.png
>>     
>
> [root (at) xymon-1 graphrrd]# file ./CLIENT/load.CLIENT-2week.png
> ./CLIENT/load.CLIENT-2week.png: PNG image data, 697 x 193, 8-bit/color 
> RGBA, non-interlaced
>
>   
>> For your information, here is mine :
>> graphrrd/www01/cputil.www01-2day.png: PNG image data, 697 x 255, 
>> 8-bit/color RGBA, non-interlaced
>>     
>
> Looks quite similiar.
>
>   
>> Then, green circle you saw on second page, is generated with the 
>> values on the left. These values are calculated by the "master.sh" 
>> script. You should see in your "graphrrd" directory csv files. You 
>> can open csv to look at the values. If you have none, maybe something 
>> has changed in Xymon 4.3.x ? I'm using the following command to generate csv :
>>     
>
>
> Not sure about this, BUT if I point my browser at:
>
> http://xymon-1.example.com/pdf/graphrrd/CLIENT/load.CLIENT-2week.png
>
> It displays a beautiful graph generated using RRD.  I am not sure why 
> it is not displaying properly within the tcpdf report, perhaps a 
> misconfiguration somewhere?  (I've searched hard..)
>
>
>
>  		 	   		  
> To unsubscribe from the hobbit list, send an e-mail to 
> hobbit-unsubscribe (at) hswn.dk
>
>
>
>   


To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe (at) hswn.dk



**************************************************************************** 
The information contained in this email is intended only for the use of the intended recipient at the email address to which it has been addressed. If the reader of this message is not an intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination or copying of the message or associated attachments is strictly prohibited. If you have received this email in error, please contact the sender by return email or call 01793 877777 and ask for the sender and then delete it immediately from your system.Please note that neither the RWE Group of Companies nor the sender accepts any responsibility for viruses and it is your responsibility to scan attachments (if any). 

*****************************************************************************