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

[OT] LaTeX for PDF? Re: Ordering Template cards

by bliako (Monsignor)
on Jan 24, 2021 at 20:41 UTC ( [id://11127403]=note: print w/replies, xml ) Need Help??


in reply to Ordering Template cards

Hi, this is irrelevant to your questions but I thought I mention one of the many ways to produce PDF output from your cards, e.g. for attaching to these email reports. This is of course LaTeX. It produces exceptional PDF/PS documents using a simple html-like (ok ok!) language which loves to be template-ed. You first need to install latex (TexLive will be called in your package manager) on your webserver. Then there are some Template plugins for it, e.g. Template::Latex (also Template::Plugin::Latex) and you have a Template-like interface to producing PDF files. The caveat is that you must now maintain both HTML and LaTeX templates. The latter is a pleasure though...

If there was a Nobel for Computer Programs, more than one would have been awarded to the humble, open-source and free TeX/LaTeX - created by a true scientist with an eye for aesthetics and detail.

Apropos your multiple templates dilemma. I would go with as many templates as possible if that would not hinder performance. For example, you can find out that card_call_center and card_sales have some common parts, let's say customer address. Well that part can be templated and re-used. Again, I don't know what effect this ultra-fine templating will have on performance.

bw, bliako

Replies are listed 'Best First'.
Re: [OT] LaTeX for PDF? Re: Ordering Template cards
by Bod (Parson) on Jan 24, 2021 at 21:17 UTC

    Thanks bliako, I shall look at LaTeX as I have had need to dynamically generate PDFs in the past. They are not needed for this application but no doubt I'll need them again one day.

    Apropos your multiple templates dilemma. I would go with as many templates as possible if that would not hinder performance.

    Performance really is not an issue here. The process of collecting together the information is quite slow as some of it calls web APIs. It is an ultra low traffic web page and, as they are done by CRON in the early hours of the morning, creating the emails is not something where time is important.

    It was more the block of conditional subroutines that seemed to be a rather inelegant way of doing things.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-24 03:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found