Hey, as long as you're addressing PDF templating with a complete rewrite, I have a humble request (that is, one I'm not nearly good enough to implement myself if I *did* have the time). I'd like to see a PostScript::Template module, and then have the PDF::Template module implement the same interface for similar capabilities. Obviously, the PDF module would also have more features and options, because PDF can do a bit more than PS.

This would make it really easy to write code that generates PS files for whatever reason (say as targets to a PostScript printer), and trivially cause that code to write a PDF instead. It would be as simple as, say:

my $writer; if ($cgi->param('mode') eq 'pdf') { $writer = PDF::Template->new(@params); } elsif ($cgi->param('mode') eq 'ps') { $writer = PS::Template->new(@params); } else { ht_error("I don't know about mode '".$cgi->param('mode')."'"); }

I realize that's quite a bit more work. All I can offer is that I would use it almost immediately, and be a good source of test-driven bug reports.

tilly and dragonchild both make excellent points below. I would still very much like a way to specify whether I'm dealing with PS or PDF inside a templating system. dragonchild's solution re. placement is probably for the best. tilly's solution works well for *NIX applications, but (a)I'm cautious about depending on external apps, and (b)there's never a guarantee that thing work the same on Win32. All that said, this node's specific request is withdrawn.

<-radiant.matrix->
A collection of thoughts and links from the minds of geeks
The Code that can be seen is not the true Code
"In any sufficiently large group of people, most are idiots" - Kaa's Law

In reply to Re: PDF::Template redesign - I want your ideas! by radiantmatrix
in thread PDF::Template redesign - I want your ideas! by dragonchild

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.