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
while (@a = $A->fetchrow_array) { #------------------------- # File öffnen #----------------------------- $pdfdir = $zeile[6]; $pdfpath = $zeile[5]; $filename = "xxxxxxx_" . $a[0] . ".pdf"; $pdfname = $filename; &newPage_Quer(); &head(); $seite = 1; $hoch = "490"; $abda = "30"; &writeLine ( $abda, $hoch, "Helvetica", 12, $a[0], "left"); $hoch = $hoch - 20; &writeLine ( $abda, $hoch, "Helvetica", 12, "xxxxxxxx", "left"); $pdf->saveas($pdfpath . $pdfname); $pdf->end; if ($a[1] ne '') { &sendEmail($a[1],$filename,$a[0]); }; };
1
2
$pdf->saveas($file)
Save the document to $file and remove the object structure from memory.
QuoteCan't call method "val" on an undefined value at D:/Dev/Perl/perl/site/lib/PDF/API2/Resource.pm line 64.
1
2
3
4
5
6
7
sub name {
my $self = shift @_;
if (scalar @_ and defined $_[0]) {
$self->{'Name'} = PDFName($_[0]);
}
return $self->{'Name'}->val();
}