Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

PDF::Template page_width/page_height

by mhearse (Chaplain)
on Jan 10, 2008 at 13:45 UTC ( #661614=perlquestion: print w/replies, xml ) Need Help??

mhearse has asked for the wisdom of the Perl Monks concerning the following question:

I've another PDF::Template question. I see in PageDef.pm that if both the page_width and page_height pagedef attributes are set, a user defined page size can be created. Unfortunately, I can't get it to work. Does anyone see anything with this template? I'm using PDFlib Lite 7.02 and the latest version of PDF::Template.
<pdftemplate h="8"> <pagedef page_width="5000" page_height="700" margins="1i"> <font face="Courier" size="12"> <header header_height="1i" /> <row h="10"> <textbox w="136.8" text="Date/Time" /> <textbox w="79.2" text="Search Time" /> <textbox w="28.8" text="Qual" /> <textbox w="79.2" text="User" /> <textbox w="79.2" text="Origin/Dest" /> <textbox w="64.8" text="Commodity" /> <textbox w="50.4" text="Service" /> <textbox w="64.8" text="Acct Code" /> <textbox w="50.4" text="Results" /> <textbox w="50.4" text="Carrier" /> <line /> </row> <footer footer_height="1i"> <row> <textbox w="100%" justify="right">Page <var value="__PAGE__" +/></textbox> </row> </footer> </font> </pagedef> </pdftemplate>

Replies are listed 'Best First'.
Re: PDF::Template page_width/page_height
by dragonchild (Archbishop) on Jan 10, 2008 at 16:24 UTC
    *sighs* Nothing's wrong with your template. I haven't used PDF::Template in about 4 years. In that time, it's accumulated rather significant bitrot. Specifically, there are methods that have been removed in PDFlib7 that portions of PDF::Template depend on. Plus, there's bugs that I haven't had the tuits to write failing tests for. And, to top it all off, I've been looking for another maintainer for P::T for about a year now. I just don't have the time to maintain it (which I don't use) and the other stuff (which I sometimes use). I'm still looking for someone to take the reins, if you're interested.

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
      Hmm... Before I commit to that I'll need to take a hard look at the code. I do intend to fix this bug though.
        IMHO it looks like the custom page_width, page_height elements weren't getting passed to the render method in the PageDef module. My solution was to create a method in Template.pm which returned the custome width/height. Probably not the best solution, but it works for me.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://661614]
Approved by moritz
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2021-09-23 06:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?