Leser: 7
|< 1 2 >| | 18 Einträge, 2 Seiten |
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
48
49
50
51
52
53
54
55
56
#! /usr/bin/perl -w
use strict;
use warnings;
use diagnostics;
use lib qw(../perllib/);
use PDF::Create;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
#use DBI;
my $cgi = CGI->new();
#print $cgi->header(-type => 'text/html');
print $cgi->redirect(-url => 'http://www.urlaub-im-ferienpark.de/tmp/testpdf.pdf');
my $pdf = new PDF::Create('filename' => '../tmp/testpdf.pdf',
'Version' => 1.2,
'PageMode' => 'UseOutlines',
'Author' => 'Renee Baecker <webmaster@urlaub-im-ferienpark.de>',
'Title' => 'Ferienparkdetails');
my $root = $pdf->new_page('MediaBox' => $pdf->get_page_size("a4"));
# Add a page which inherits its attributes from $root
my $page = $root->new_page;
# Prepare 2 fonts
my $f1 = $pdf->font('Subtype' => 'Type1',
'Encoding' => 'WinAnsiEncoding',
'BaseFont' => 'Helvetica');
my $f2 = $pdf->font('Subtype' => 'Type1',
'Encoding' => 'WinAnsiEncoding',
'BaseFont' => 'Helvetica-Bold');
my $logo = $pdf->image('../tmp/EULE1.jpg');
my $arrow = $pdf->image('../tmp/arrow.gif');
$page->stringl($f2,15,20,780,'Informationen zum Ferienpark');
$page->image('image' => $logo, 'xpos' => 30 , 'ypos' => 600); # add the logo of parc
$page->image('image' => $arrow, 'xpos' => 400, 'ypos' => 690); # add arrow of navigation
$page->stringl($f1, 10, 420, 765, 'Beschreibung');
$page->image('image' => $arrow, 'xpos' => 400, 'ypos' => 660); # add arrow of navigation
$page->stringl($f1, 10, 420, 735, 'Kontakt');
$page->image('image' => $arrow, 'xpos' => 400, 'ypos' => 630); # add arrow of navigation
$page->stringl($f1, 10, 420, 705, 'Bewertungen');
$page->image('image' => $arrow, 'xpos' => 400, 'ypos' => 600); # add arrow of navigation
$page->stringl($f1, 10, 420, 675, 'Sonstiges');
$page->stringc($f2, 8, 300, 2, "Created by http://www.Urlaub-im-Ferienpark.de");
# Add the missing PDF objects and a the footer then close the file
$pdf->close;
print $cgi->h2('PDF erzeugt');
Can't use an undefined value as a symbol reference at /usr/local/share/perl/5.6.1/PDF/Create.pm line 56.
|< 1 2 >| | 18 Einträge, 2 Seiten |