[hobbit] PDF Reports
Thomas Séglard
tsg at bluekiwi-software.com
Wed Mar 10 19:17:43 CET 2010
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
>
>
>
>
More information about the Xymon
mailing list