Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi everyone,
I would like to know if is possible to create a pdf an fill it from a database and then send it from email.
Everything in a linux server without desktop, only shells
Personally I'd use Perl.
Extracting data from a DB & formatting it is std stuff.
You could then use http://search.cpan.org/~szabgab/PDF-.../PDF/Create.pm to create the PDF. As it says, if you need a really complex PDF, see the link to PFD::API2.
Last edited by chrism01; 10-01-2015 at 07:02 PM.
Reason: Typo
Personally I'd use Perl.
Extracting data from & DB & formatting it is std stuff.
You could then use http://search.cpan.org/~szabgab/PDF-.../PDF/Create.pm to create the PDF. As it says, if you need a really complex PDF, see the link to PFD::API2.
Hi Chrism01,
thanks for your answered.
I love the standard ways,i will take your recommendation.
Cheers!
Last edited by HeartStroke; 10-01-2015 at 07:16 AM.
I have this error, dont let me install the module.
Quote:
cpan[11]> test PDF::Create
Running test for module 'PDF::Create'
Running make for S/SZ/SZABGAB/PDF-Create-1.10.tar.gz
Has already been unwrapped into directory /root/.cpan/build/PDF-Create-1.10-7UCs8w
---- Unsatisfied dependencies detected during ----
---- SZABGAB/PDF-Create-1.10.tar.gz ----
Test::LeakTrace [requires]
Test::More [requires]
Running make test
Delayed until after prerequisites
Running test for module 'Test::LeakTrace'
Running make for G/GF/GFUJI/Test-LeakTrace-0.15.tar.gz
Has already been unwrapped into directory /root/.cpan/build/Test-LeakTrace-0.15-dVDaSJ
Could not make: Unknown error
Running make test
Can't test without successful make
Running test for module 'Test::More'
Running make for E/EX/EXODIST/Test-Simple-1.001014.tar.gz
Has already been unwrapped into directory /root/.cpan/build/Test-Simple-1.001014-lCQ41D
Has already been made
Running make test
Has already been tested successfully
Running make for S/SZ/SZABGAB/PDF-Create-1.10.tar.gz
Has already been unwrapped into directory /root/.cpan/build/PDF-Create-1.10-7UCs8w
Warning: Prerequisite 'Test::LeakTrace => 0.14' for 'SZABGAB/PDF-Create-1.10.tar.gz' failed when processing 'GFUJI/Test-LeakTrace-0.15.tar.gz' with 'make => NO'. Continuing, but chances to succeed are limited.
Warning: Prerequisite 'Test::More => 1.00' for 'SZABGAB/PDF-Create-1.10.tar.gz' already built but the result looks suspicious. Skipping another build attempt, to prevent looping endlessly.
Has already been made
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01-basic.t .......... ok
t/02-string.t ......... ok
t/03-image.t .......... ok
t/04-drawing.t ........ ok
t/05-outline.t ........ ok
t/06-annotation.t ..... ok
t/07-fonts.t .......... ok
t/09-cgi.t ............ 1/2 # t/09-cgi.pdf
t/09-cgi.t ............ ok
t/11-encode.t ......... ok
t/50-versioning.t ..... ok
t/51-memory-leak.t .... Can't locate Test/LeakTrace.pm in @INC (@INC contains: /root/.cpan/build/PDF-Create-1.10-7UCs8w/blib/lib /root/.cpan/build/PDF-Create-1.10-7UCs8w/blib/arch /root/.cpan/build/Test-Simple-1.001014-lCQ41D/blib/arch /root/.cpan/build/Test-Simple-1.001014-lCQ41D/blib/lib /root/.cpan/build/Test-Simple-1.001014-lCQ41D/blib/arch /root/.cpan/build/Test-Simple-1.001014-lCQ41D/blib/lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at t/51-memory-leak.t line 7.
BEGIN failed--compilation aborted at t/51-memory-leak.t line 7.
t/51-memory-leak.t .... Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t/99-wifi-parabola.t .. ok
Test Summary Report
-------------------
t/51-memory-leak.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
Files=12, Tests=158, 1 wallclock secs ( 0.04 usr 0.01 sys + 0.47 cusr 0.07 csys = 0.59 CPU)
Result: FAIL
Failed 1/12 test programs. 0/158 subtests failed.
make: *** [test_dynamic] Error 255
SZABGAB/PDF-Create-1.10.tar.gz
one dependency not OK (Test::LeakTrace); additionally test harness failed
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports SZABGAB/PDF-Create-1.10.tar.gz
Failed during this command:
SZABGAB/PDF-Create-1.10.tar.gz : make_test NO one dependency not OK (Test::LeakTrace); additionally test harness failed
what is the problem?
Last edited by HeartStroke; 10-02-2015 at 02:09 AM.
yum info perl-pdf-api2
Available Packages
Name : perl-PDF-API2
Arch : noarch
Version : 2.021
Release : 1.el6
Size : 2.0 M
Repo : epel
Summary : Perl module for creation and modification of PDF files
URL : http://search.cpan.org/dist/PDF-API2/
License : LGPLv2+
Description : A Perl Module Chain to facilitate the Creation and Modification of
: High-Quality "Portable Document Format (aka. PDF)" Files.
Maybe just use that; note the repo is EPEL; not sure if that's avail under v7 but you can try it.
yum info perl-pdf-api2
Available Packages
Name : perl-PDF-API2
Arch : noarch
Version : 2.021
Release : 1.el6
Size : 2.0 M
Repo : epel
Summary : Perl module for creation and modification of PDF files
URL : http://search.cpan.org/dist/PDF-API2/
License : LGPLv2+
Description : A Perl Module Chain to facilitate the Creation and Modification of
: High-Quality "Portable Document Format (aka. PDF)" Files.
Maybe just use that; note the repo is EPEL; not sure if that's avail under v7 but you can try it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.