Thank you tod222 and roboticus for your input.

After careful consideration, I decided to go for drawing my SVG templates in inkscape, adding template tags into the xml by hand, and then using Text::Template to fill in the template for each page to generate the SVG for each page, which then gets converted to PDF and joined into one big PDF via pdftk.

The final PDF file weighs in at about 300 megs, takes a while to render and probably contains a fair bit of waste, but it does what I need it to do. Disc space is cheap and I don't expect to email the thing any time soon.

One small glitch with using a templating system, is that on occasion I would like some elements of the SVG to not appear at all, and it does not appear to be possible to hide an element by template, nor is there a 'visible' property in SVG. (at least I can't find one), that would let me hide things. Instead I will probably end up controlling the colour of object by the template, and change their colours to transparent if I want to hide them.

tod222: You suggested I might consider TeX, Postscript, DVI or ODF. The reason I did not consider them (apart from familiarity) is that while I am developing, I want to be able to preview what the script has created, and PDF or SVG are very good for that. Also while there are a great number of modules on CPAN for those formats, not many of them looked that useful. The first page of the CPAN search for postscript contains such gems at PostScript::Graph::Paper, PostScript::MailLabels and PostScript::CDCover. All very useful modules I am sure, but only if you are trying to solve those specific problems. Sometimes a large number of search results from CPAN is a bad thing, if you are trying to solve a problem quickly, and you have to many choices to evaluate.


In reply to Re: Generating multi page PDF with bitmap images, vector graphics and text. by chrestomanci
in thread Generating multi page PDF with bitmap images, vector graphics and text. by chrestomanci

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.