in reply to Array of Text to PDF
First off, if you want us to help you, you'll need to give us a little more information. Maybe you're having issues with handling arrays. It happens to the best of us. Next time, posting the smallest snippet that demonstrates the problem will go a long way ...
You could use PDF::Template for both issues. (Well, you could if Weblinks were containers and not elements. *sighs*)
use strict; use PDF::Template; my @array = ( 'Line 1', 'Line 2', 'Line 3', 'Line 4', ); my $some_url = "http://..."; my @data = map { { line => $_, url => $some_url . $_, } } @array; my $template = PDF::Template->new( file => 'foo.xml' ); $template->param( LOOPY => \@data, ); $template->write_file( 'foo.pdf' ); -------- foo.xml -------- <pdftemplate> <pagedef> <font name="Courier" h="8"> <loop name="loopy"> <row> <textbox w="100%" text="$line" /> <row> </loop> </font> </pagedef> </pdftemplate>
|
|---|