Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2021-12-04 02:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (30 votes). Check out past polls.

    Notices?