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

RE: [hobbit] PDF Reports




OK, I feel like a WINNER!!!!  (The bells helped a great deal ;-)

My graphs are starting to show up, although I needed to remove "-woalpha.png", otherwise it was searching for something.png.png.

On another note, does anyone know how I can convert my companies logo (in JPEG format) to PNG?  For some reason TCPDF does not show my company logo, but does work for the sample_logo.png.


Thank you!

.vadim

> 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..)
>>