Re: PDF Template Solution- Why is this so hard?
by marto (Cardinal) on Aug 10, 2010 at 15:58 UTC
|
Have you looked at using something like PDF::Reuse? If so what have you tried and what problems did you experience, purely so we don't all reply listing things you've already looked at.
| [reply] |
|
|
I did start trying PDF::Reuse a bit ago. One of the things that made me nervous is that it appeared like it is no longer and active project and only worked with older versions of PDF documents. Sounded like Acrobat 5 version? I don't fully get the different versions yet but it struck me as something that could make it an issue with PDFs created in newer programs? Am I thinking wrong about this, or is this not a big deal and most programs still use the older version of PDF?
I'm obviously struggling some to wrap my arms around this...
Thanks for the help!!!
| [reply] |
|
|
Modern versions of PDF readers will be able to read older pdf file formats. I think I'm pretty safe in saying that they are backwards compatible. Various topics exist here on the subject of PDF version support among modules (see Extracting content text from PDFs and Extracting text from PDF. No really among others), even Open Office (v3.2 on Linux) exports PDF v1.4 files. Is there a particular feature of the PDF format (greater than v1.4) that you need to accommodate? IF all you are doing is mass populating text within a template PDF, ensure the person supplying the template is aware of your version restrictions.
I'm sure others will pitch in with their experiences on this subject.
| [reply] |
Re: PDF Template Solution- Why is this so hard?
by psini (Deacon) on Aug 10, 2010 at 16:13 UTC
|
I've written a module for templating ODT files (OpenOffice documents) in order to do exactly the thing that you ask: I write a template using OpenOffice, a perl program expands the template using data from a given structure, then OpenOffice converts the resulting ODT in a PDF file.
The module is in pre-alpha stage: it works (mostly) but has no test suite and poor documentation, but if you are interested in it I can make it downloadable somewhere.
Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."
| [reply] |
|
|
Sounds interesting but probably won't work for this project yet. I'm hoping to turn over the template to the layout people and it sounds like I would have to hand hold (i.e. do) most of the templates for them if trying this;-)
Thank-you for the very generous offer!!!
| [reply] |
|
|
Why? My templates are valid OpenOffice documents and the markup is something like "{$var}" to interpolate a variable, {if $var para} to have a conditional paragraph, and so on. The skills needed to generate a template file should be at the same level than those for using TT to generate HTML pages.
Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."
| [reply] |
|
|
|
|
| [reply] |
|
|
I've posted the code in my scratchpad psini's scratchpad for anyone interested in it. Any feedback will be greatly appreciated.
I wrote the module about one year ago, but I'll start using it next month in a project, so chances are high that it will be largely improved and/or modified in the next two or three months.
Update:
The code for the module is now exported nightly from SVN into OpenOffice-Template.zip
Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."
| [reply] |
|
|
| [reply] |