Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Use a PDF generating module and/or program. There are a variety of commercial modules and programs available that you can use but if you can put up with little notices in footers then you can normally use these for free.

A quick look through my bookmarks turned up PDFLib. Though I know there are many, many others. Google is your friend here.

Generating a report as an image is not a good idea for many, many reasons not least of which are the ones you have already discovered. Your goal, then, is to automate the method of generating the report but if you are already doing this then you should just be able to plug in the PDF functionality right away and change the code generator.

I've not played with anything strictly like this in the past but my instincts tell me you have two options. Either create a single script per report type or create a meta language (possibly XML like Docbook, possibly something else like TT) which can then be processed by your script. The latter option may be more useful to you as you only have one processor script and a single format.

The advantage to the latter approach is that you have a nice, generic way of doing things. However it may be a little slower (well ok more than a little) than doing a specific program.

Your other option, perhaps, is to interface with something like Jade and use XSL-FO to generate the report. Here you can either use the stuff from the Cocoon project or you can just interface with the command line tool. But this is probably not what you want.

In reply to Re: Generating beautiful reports by simon.proctor
in thread Generating beautiful reports by kappa

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 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?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-03-29 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found