I can't help you with the module installation (I don't use strawberry perl), but here's a way to convert your data from an XML file into a PDF:
use strict; use warnings; use Data::Dumper; use PDF::API2; my $var1 = <<<<< set up your data here >>>>> my $pdf = PDF::API2->new(); $pdf->mediabox('Letter'); my $font = $pdf->corefont('Helvetica-Bold'); my $page = $pdf->page(); my $cnt=0; for my $line (split /\n/, Dumper($var1)) { if ($cnt > 46) { $page = $pdf->page(); $cnt=0; } my $text = $page->text(); $text->font($font,14); $text->translate(72, 720-$cnt*14); $text->text($line); ++$cnt; } $pdf->saveas('veerubiji.pdf');
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re: perl script to convert xml to pdf
by roboticus
in thread perl script to convert xml to pdf
by veerubiji
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |