export2pdf: beta2 is out

Addons for Cacti and discussion about those addons

Moderators: Developers, Moderators

Post Reply
fred-xdev
Posts: 18
Joined: Tue Nov 08, 2005 11:54 am
Location: France
Contact:

export2pdf: beta2 is out

Post by fred-xdev »

Hi,
after some very difficult starts, the beta2 is out.
you can download it from http://kalika.no-ip.com/

All descriptions are given on the site.
Regards.
fred-xdev
Posts: 18
Joined: Tue Nov 08, 2005 11:54 am
Location: France
Contact:

Post by fred-xdev »

One note more.
the account pdf/pdfpass is disabled from now.

some users may have found very funny too spam me with reports, and to delete them.

Some guyz are very curious...
User avatar
sumsum
Cacti User
Posts: 68
Joined: Mon Apr 26, 2004 7:18 am
Location: Switzerland
Contact:

Post by sumsum »

i did a fresh installation with the latest cacti version. and installed your latest beta version (with patch successful). after that i could not access to the "User "Management . then i opened the export2pdf_main.php, which welcomes me with "access denied" ;)
maybe i did something wrong. any hints or prerequisits ?
cheers
tom
http://www.lounge-radio.com/
fred-xdev
Posts: 18
Joined: Tue Nov 08, 2005 11:54 am
Location: France
Contact:

Post by fred-xdev »

Hi,
i've done a new fresh install.

after that, it's true that user_admin.php, line 536, is broken. (but i've got an error type 'T_VARIABLE not defined'...)

Just delete the "order" tha is wrong, to keep:
"order by user_auth.username");"

because the order clause "user_realms" will not function. (will be corrected in beta3)

After that, in the user admin section it should be ok. Check the export2pdf rights.

If not, tell me.

Fred.
fred-xdev
Posts: 18
Joined: Tue Nov 08, 2005 11:54 am
Location: France
Contact:

Post by fred-xdev »

Tom, i've noted that in export2pdf.sql
if you have an error, look in the file.

a coma ',' is inserted twice at the end of a line.

I've done a new install + a running install.
after having corrected export2pdf.sql and user_admin.php
all is working.

beta3 will be better. :oops:

Fred.
User avatar
sumsum
Cacti User
Posts: 68
Joined: Mon Apr 26, 2004 7:18 am
Location: Switzerland
Contact:

Post by sumsum »

hi fred
thanx for your investigation. I think about waiting for beta3 . dont like to hack around in the moment ;)
http://www.lounge-radio.com/
fred-xdev
Posts: 18
Joined: Tue Nov 08, 2005 11:54 am
Location: France
Contact:

Post by fred-xdev »

:lol: yes, you're right.

my beta2 is not very stable....

but as a man said: "I'll be back" 8) 8)
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

Hi,
I install beta 3
I can see preview but when I try to generate pdf browser shows
The page cannot be found
And browser link is:
Additionally, when I clik generate Pdf&Mail icon browser shows a message :
ERROR: Mail not sent...(Language string failed to load: file_accesstmp/pdf-438c0d30eaa1b.pdf)Click here to close
Warning: unlink(tmp/pdf-438c0d30eaa1b.pdf) [function.unlink]: No such file or directory in /www/htdocs/cacti/export2pdf_main.php on line 1351
what is wrong?
fred-xdev
Posts: 18
Joined: Tue Nov 08, 2005 11:54 am
Location: France
Contact:

Post by fred-xdev »

Hi,
did you install htmldoc?

http://www.htmldoc.org/
and choose the version 1.8xxx (because 1.9 is known to crash).

the direct link may be: http://www.htmldoc.org/software.php?VER ... rce.tar.gz

Just extract and do:
./configure --prefix=/usr
make
make install

Remember to fill in the cacti administration panel the PATH of htmldoc.

you have raised one point: i've no documentation. This will be done.

Fred.
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

I install 1.6.25
[root@cacti-test htmldoc]# which htmldoc
/usr/bin/htmldoc
[root@cacti-test htmldoc]# htmldoc -h
HTMLDOC Version 1.8.25 Copyright 1997-2005 Easy Software Products, All Rights Reserved.
This software is governed by the GNU General Public License, Version 2, and
is based in part on the work of the Independent JPEG Group.
Then I set PATH for htmldoc Binary File Path into cacti as:
/usr/bin
But I still have same problems
Additionally, I found a problem:
When I select Multi Graph selection and select graphs, I read a message in preview like this:
Warning: item index: 6 is unknwon. Item Type was: 3
Another error is when I select branch of tree I get a message like this:
***error: do not know this item type
Say hi to your problem buddy :)
fred-xdev
Posts: 18
Joined: Tue Nov 08, 2005 11:54 am
Location: France
Contact:

Post by fred-xdev »

please, read the post http://forums.cacti.net/viewtopic.php?t=10234

it answers some of your questions.
also, the problem about Multi Graph Selection is described. It's a feature implemented in the item view, not for the moment in the preview.

I must migrate to the Plugin Architecture as cigamit said, to be clean.

About your file not found problem, are you sure you have configured cacti as /usr/bin/htmldoc (Configuration =>Settings => Paths => htmldoc Binary File Path)?
It must be configured as the font for example or as the rrdtool binary path.

Fred.
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

fred-xdev wrote:please, read the post http://forums.cacti.net/viewtopic.php?t=10234

it answers some of your questions.
also, the problem about Multi Graph Selection is described. It's a feature implemented in the item view, not for the moment in the preview.

I must migrate to the Plugin Architecture as cigamit said, to be clean.

About your file not found problem, are you sure you have configured cacti as /usr/bin/htmldoc (Configuration =>Settings => Paths => htmldoc Binary File Path)?
It must be configured as the font for example or as the rrdtool binary path.

Fred.
PDF creating is ok.
I realized that tree function is note ready todays. Because in export2pdf_main.php, between line 12227 and 1233 there is no case 8 that is tree :)
And I have a last question about mail. To send a mail that produced pdf, is my linux machine has sendmail package?
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

Ok I understand that I dont need to sendmail.
But, how can I configure my SMTP server?
I have a cacti 0.8.6g IP Address is 10.200.18.39 and we have have a SMTP server (Microsoft ESMTP MAIL Service) IP Address is 10.200.123.135
I dont know how can I configure php codes about export2pdf.
Or, do I need extra application to use send mail feature?
fred-xdev
Posts: 18
Joined: Tue Nov 08, 2005 11:54 am
Location: France
Contact:

Post by fred-xdev »

Oh yes,
it's not easily configurable for now.

but you can edit the code, export2pdf_main.php, about line 1333, when $mail->Host = "127.0.0.1", just enter the IP adress of your smtp gateway.

this is a great idea to include this in the new export2pdf (with Plugin Architecture).

Fred.
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

Cool. It works.
I can send mail now.
I still have two question:

1. how can I change the charset to see correct leter in PDF? I mean I use Turkish fonts. So when I use turkish letter in schema (textbox etc.) PDF output shows some weird letter.
Is there any way to change code page to see turkish code?

2. How can I send mail more than one mail address. I try comma, semicolon space between mail addresses. ıs there any way?

AND AN IDEA:

If your plug-in can send mail automatically, in cron, could be very nice.
For example , every monday cacti sends mail defined schema. Is it nice?
:)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest