dear members, I wrote a perl script to write a pdf file. I am stuck in writing a value from a variable. Please help. thanks in advance.
Here is my script: #!/usr/local/bin/perl use CGI qw(:standard); use strict; use PDF::API2; my $endDate2 = $time{'dd-mm-yyyy', time + 86400 * 14}; my $startDate2 = $time{'dd-mm-yyyy', time - 86400 * 0}; # Create a blank PDF file my $pdf = PDF::API2->new(-file => 'C:/HRMS/cgi-bin/testPDF.pdf'); # Add a blank page my $page = $pdf->page(); # Set the page size $page->mediabox('A4'); # Add a built-in font to the PDF my $font = $pdf->corefont('Arial'); # Add some text to the page my $text = $page->text(); $text->font($font, 10); $text->translate(30, 750); $text->text('Periode :', $startDate2 - $endDate2, autoflow => 'on'); # Save the PDF $pdf->save(); $pdf->end; -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/