http://www.perlmonks.org?node_id=93175


in reply to XML2PDF

That looks very interesting. I'd never heard of PDFLib.pm (or, indeed, pdflib). I'll be taking a closer look at them.

One question tho'. You declare a number of package variables with this code:

use vars qw ( $TOPMARGIN $BOTTOMMARGIN $LEFTMARGIN $RIGHTMARGIN $PAGEHEIGHTPOINTS $PAGEWIDTHPOINTS );

And then later you declare a number of lexical variables with the same names with this code:

my $PAGEHEIGHTPOINTS = 842; my $PAGEWIDTHPOINTS = 595; # the size of your page my ($TOPMARGIN, $BOTTOMMARGIN, $LEFTMARGIN, $RIGHTMARGIN) = (10, 10, 15, 15);

You then go on to use the lexical variables, but never the package variables. Is this left over from an earlier version of the code?

--
<http://www.dave.org.uk>

Perl Training in the UK <http://www.iterative-software.com>

Replies are listed 'Best First'.
Re: Re: XML2PDF
by holygrail (Scribe) on Jul 02, 2001 at 18:28 UTC
    Absolutely! And thank you, I've updated it now!

    --HolyGrail