QuoteC:\Perl-Tools\FSK-Nummern-Schreiben>perl reuse-letter.pl
defined(@array) is deprecated at C:/strawberry/perl/site/lib/PDF/Reuse.pm line 9
93.
(Maybe you should just omit the defined()?)
defined(@array) is deprecated at C:/strawberry/perl/site/lib/PDF/Reuse.pm line 9
93.
(Maybe you should just omit the defined()?)
An error occurred
at reuse-letter.pl line 19.
The file sample-letter.pdf can't be found, aborts
More information might be found in
error.log
at reuse-letter.pl line 19.
C:\Perl-Tools\FSK-Nummern-Schreiben>pause
Drücken Sie eine beliebige Taste . . .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
#!/usr/bin/perl #http://www.perl.com/pub/2007/09/20/pdf-processing-with-perl.html # file: examples/reuse-letter.pl use PDF::Reuse; use Date::Formatter; use strict; my $date = Date::Formatter->now(); $date->createDateFormatter("(DD).(MM). (YYYY)"); my $n = 1; my $incr = 14; my $infile = 'customer.txt'; prFile("sample-letters.pdf"); prCompress(1); prFont('Arial'); prForm("sample-letter.pdf"); open (my $fh, "<$infile") || die "Couldn't open $infile, $!\n aborts!\n"; while (my $line = <$fh>) { my $x = 60; my $y = 760; my ($first, $last, $street, $zipCode, $city, $country) = split(/,/, $line); last unless $country; prPage() if $n++ > 1 ; prText($x, $y, "$first $last"); $y -= $incr; prText($x, $y, $street); $y -= $incr; prText($x, $y, $zipCode); prText(($x + 40), $y, $city); $y -= $incr; prText($x, $y, $country); prText(60, 600, "Dear $first $last,"); prText(400, 630, "Berlin, $date"); } prEnd(); close $fh;
QuoteC:\Perl-Tools\FSK-Nummern-Schreiben>perl reuse-letter.pl
An error occurred
at reuse-letter.pl line 19.
sample-letter.pdf_1 can't be used as a form. See the documentation
under prForm how to concatenate streams
More information might be found in
error.log
at reuse-letter.pl line 19.
C:\Perl-Tools\FSK-Nummern-Schreiben>pause
Drücken Sie eine beliebige Taste . . .