Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Simple Perl PDF Creation

by chrestomanci (Priest)
on Dec 13, 2011 at 21:34 UTC ( #943425=note: print w/replies, xml ) Need Help??

in reply to Simple Perl PDF Creation

I posted a question about pdf generation from templates about a year ago, it might be worth reading the answers I got.

My eventual solution was to to go via SVG. I prepared an SVG template by drawing it in a graphics program and then opening the SVG file in an editor and replacing elements with template tags. I then filled in the template with perl Text::Template (I dare say other templating systems such as Catalyst's favourite Template::Toolkit would work as well). Once I had an SVG file I fed it through svg2pdf (that comes with Inkscape) to convert to PDF.

Bear in mind that my project involved a lot of vector & bitmaped graphics, and not a lot of text. If you need to put a lot of text into your PDF files then my solution may not work as well as you are likely to have to do things like line breaks yourself.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://943425]
[hippo]: Are you any good at perl?

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2018-06-23 09:10 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (125 votes). Check out past polls.