Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl read form, output to PDF and mail it

Status
Not open for further replies.

Irishsteve

Programmer
Jul 30, 2008
1
IE
Hi,

New to PERL, a couple of scripts came with an E-shop that I'm working with.

At the moment, it's sending a text mail to the order address, and also to the mailbox at the shop, and I'd like to put the data into a PDF which is a bit more professional looking, and then attach that to the mail that's sent to the addresses.

2 Issues, are there any PERL scripts that can put form data into a PDF template, and how does the attachment get attached to the mail?

Thanks

Steve
 
Yes. Tiny elves.. trust me..

Try searching on cpan.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
As you are new to Perl, is the world repository for modules that do useful stuff, and their documentation. There are thousands on there, some more popular and useful than others.

Steve

[small]"Every program can be reduced by one instruction, and every program has at least one bug. Therefore, any program can be reduced to one instruction which doesn't work." (Object::perlDesignPatterns)[/small]
 
i working quite a lot with something similar. unfortunately we're using php insted of perl, but in this case it doesn't really matter either way. of course, cpan definately is the first place to check out. i don't know if theres something useful on cpan, but we do it like this.
1) read and process form data with script
2) insert the required data into a suitable LaTeX-Template
3) compile it by running "pdflatex" on it
4) send the email using "mutt"
of course you'll have to know your way around in latex -- at least up to a certian point, because you'll probably taylor the latex doc to meet your specific demands. all the script would do is to load the template, replace placeholders with the values received by the form (and maybe insert or omitt additional things, you can pretty much do anything you want to), and write it back to a tex file. pdflatex and mutt would be external programs.
not sure what of the above is new to you and what not, so i just wrote it all. i don't want to make anyone look stupid, maybe one could get the impression.
whatever, i hope this was at least remotely helpful! :)
cheers
michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top