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

Re: Playing with PDFs

by andreychek (Parson)
on Feb 13, 2003 at 04:14 UTC ( [id://234897]=note: print w/replies, xml ) Need Help??


in reply to Playing with PDFs

Hi there,

You are most definitely looking for PDF::Template. You would create a template using XML, and the program will fill in variables at run-time, much the same way that HTML::Template works.

There is one issue you may run into -- there are certain page sizes predefined that will work. Things like Letter, Legal, A3, A4, etc. You may have to do a quick edit to the PDF::Template file to add the appropriate definition for your business card size. But that should be simple.

PDF::Template does require PDFLib, a C library for manipulating PDF files. You'll want to grab the source at the very bottom of that page. It's released under the Aladdin license.

Good luck!
-Eric

--
Lucy: "What happens if you practice the piano for 20 years and then end up not being rich and famous?"
Schroeder: "The joy is in the playing."

Replies are listed 'Best First'.
Re: Re: Playing with PDFs
by BigLug (Chaplain) on Feb 13, 2003 at 04:21 UTC
    I've looked at PDF::Template, but it seems to only create PDF files. I don't want to have to work out my design in XML just to put it all together. I want the PDF file to already exist (created from Quark) and the tool will just replace text in the file.

    If I'm wrong, and it can read PDF files as a base, let me know. I'd really rather just replace text WITHIN the PDF file rather than descripbing exactly where the text should go using XML.

      As PDF is just an output format for PostScript, I don't see why you don't just create a PostScript file, which is able to be read and written to by Perl or indeed any other application, then transform the .PS file into PDF?
      --
      “Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.”
      M-J D

Log In?
Username:
Password:

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

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

    No recent polls found