LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-30-2015, 05:39 PM   #1
HeartStroke
LQ Newbie
 
Registered: Sep 2015
Distribution: Centos 7.0
Posts: 5

Rep: Reputation: Disabled
PDF and fill DB - Sendmail


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

Thanks in advanced!

Cheers!
 
Old 09-30-2015, 07:18 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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
 
Old 10-01-2015, 07:10 AM   #3
HeartStroke
LQ Newbie
 
Registered: Sep 2015
Distribution: Centos 7.0
Posts: 5

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by chrism01 View Post
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.
 
Old 10-02-2015, 01:15 AM   #4
HeartStroke
LQ Newbie
 
Registered: Sep 2015
Distribution: Centos 7.0
Posts: 5

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-02-2015, 04:53 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
you could try
Code:
yum info perl-pdf-create
but my Centos 6.7 says no..
otoh
Code:
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.
 
Old 10-02-2015, 08:39 AM   #6
HeartStroke
LQ Newbie
 
Registered: Sep 2015
Distribution: Centos 7.0
Posts: 5

Original Poster
Rep: Reputation: Disabled
Unhappy

i will try in Epel repo

Last edited by HeartStroke; 10-02-2015 at 08:40 AM.
 
Old 10-02-2015, 08:51 AM   #7
HeartStroke
LQ Newbie
 
Registered: Sep 2015
Distribution: Centos 7.0
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by chrism01 View Post
you could try
Code:
yum info perl-pdf-create
but my Centos 6.7 says no..
otoh
Code:
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.
You're right!.
Code:
yum install epel-release
and then
Code:
yum install perl-PDF-API2
now i can keep on it!, thanks you chrism01!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to fill PDF forms (even "read-only"; better than Acroread v9 for Linux) KWTm LinuxQuestions.org Member Success Stories 12 11-08-2019 03:45 PM
Learning about .PDF on linux & How to fill out broken bureaucratic forms jago25_98 Linux - Software 1 03-07-2012 09:01 AM
Software to use fill in pdf forms taylorkh Linux - Software 2 09-11-2010 03:41 PM
LXer: GNU PDF to fill missing gap in functionality LXer Syndicated Linux News 0 11-30-2007 01:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration