FAQ
Good afternoon,

Both of these seem to be almost identical.

Catalyst::View::PDF::Reuse
Catalyst::View::PDF::API2

Is one better to use than the other? C::V::PDF::API2 has been
updated more recently, but other than that I can't see why I
would choose one over the other.

Or is really a choice of PDF::Reuse vs PDF::API2 which then
dictates the View to use? It looks like PDF::Reuse might be a
wrapper for PDF::API2, but I'm not really sure.

I'm not looking to create PDFs from code, I'll be using an
existing PDF and replacing values. And both C::V::P::Reuse &
C::V::P::API2 seem to handle that in effectively the same way.

Thanks,
Charlie

--
? Charlie Garrison ? <garrison@zeta.org.au>
? PO Box 141, Windsor, NSW 2756, Australia

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
http://www.ietf.org/rfc/rfc1855.txt

Search Discussions

  • Tomas Doran at Mar 5, 2010 at 9:28 am

    On 5 Mar 2010, at 05:38, Charlie Garrison wrote:

    I'm not looking to create PDFs from code, I'll be using an existing
    PDF and replacing values. And both C::V::P::Reuse & C::V::P::API2
    seem to handle that in effectively the same way.
    Yeah, they're both basically just wrappers..

    PDF::Reuse is supposed to make it easier to reuse PDFs, whereas API2
    is more powerful (and more cryptic :)..

    They're both being used successfully by people as far as I know, so
    pick whichever one appeals most :)

    Cheers
    t0m
  • Felix Antonius Wilhelm Ostmann at Mar 5, 2010 at 10:15 am
    We use simple View::TT and then a Filter:

    [%- USE Latex; FILTER latex("pdf") -%]

    Its perfekt!

    Tomas Doran schrieb:
    On 5 Mar 2010, at 05:38, Charlie Garrison wrote:

    I'm not looking to create PDFs from code, I'll be using an existing
    PDF and replacing values. And both C::V::P::Reuse & C::V::P::API2 seem
    to handle that in effectively the same way.
    Yeah, they're both basically just wrappers..

    PDF::Reuse is supposed to make it easier to reuse PDFs, whereas API2 is
    more powerful (and more cryptic :)..

    They're both being used successfully by people as far as I know, so pick
    whichever one appeals most :)

    Cheers
    t0m


    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/

    --
    Mit freundlichen Gr??en

    Felix Antonius Wilhelm Ostmann
    -----------------------------------------------------------
    Websuche Search Technology GmbH & Co. KG
    Martinistra?e 3, D-49080 Osnabr?ck, Germany
    -----------------------------------------------------------
    Tel.: +49 541 40666-0, Fax: +49 541 40666-22
    Email: info@websuche.de, Web: www.websuche.de
    -----------------------------------------------------------
    AG Osnabr?ck - HRA 200252, Ust-IdNr.: DE814737310
    -----------------------------------------------------------
    Komplement?rin: Websuche Search Technology Verwaltungs GmbH
    AG Osnabr?ck - HRB 200359, Gesch?ftsf?hrer: Ansas Meyer
    -----------------------------------------------------------
  • Charlie Garrison at Mar 5, 2010 at 10:41 am
    Good evening,

    On 5/03/10 at 11:15 AM +0100, Felix Antonius Wilhelm Ostmann
    wrote:
    We use simple View::TT and then a Filter:

    [%- USE Latex; FILTER latex("pdf") -%]

    Its perfekt!
    I like that conceptually, but just to be clear, that is latex
    code being converted to PDF, correct? Due to time constraints I
    can't learn another formatting language for this project. I may
    choose to learn it for another project though (which does have
    more complex PDF requirements).
    Tomas Doran schrieb:
    They're both being used successfully by people as far as I
    know, so pick whichever one appeals most :)
    So for now I'll follow t0m's advice and choose one of the
    C::V::PDF modules.

    Thanks to both of you for the feedback.


    Charlie

    --
    ? Charlie Garrison ? <garrison@zeta.org.au>
    ? PO Box 141, Windsor, NSW 2756, Australia

    O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
    http://www.ietf.org/rfc/rfc1855.txt
  • Felix Antonius Wilhelm Ostmann at Mar 5, 2010 at 12:24 pm

    Charlie Garrison schrieb:
    I like that conceptually, but just to be clear, that is latex code being
    converted to PDF, correct?
    Yes, you must write latex ... this do always my coworkers for me ;)




    --
    Mit freundlichen Gr??en

    Felix Antonius Wilhelm Ostmann
    -----------------------------------------------------------
    Websuche Search Technology GmbH & Co. KG
    Martinistra?e 3, D-49080 Osnabr?ck, Germany
    -----------------------------------------------------------
    Tel.: +49 541 40666-0, Fax: +49 541 40666-22
    Email: info@websuche.de, Web: www.websuche.de
    -----------------------------------------------------------
    AG Osnabr?ck - HRA 200252, Ust-IdNr.: DE814737310
    -----------------------------------------------------------
    Komplement?rin: Websuche Search Technology Verwaltungs GmbH
    AG Osnabr?ck - HRB 200359, Gesch?ftsf?hrer: Ansas Meyer
    -----------------------------------------------------------
  • S.A. Kiehn at Mar 5, 2010 at 9:32 pm
    I am not a very experienced developer, but I was able to learn and use PDF::Reuse. I made a PDF template (11 page report) that I needed to intersperse data throughout. Using Catalyst::View::PDF::Reuse I was able to achieve a good result. I believe it is intended to be a reuse (of a PDF template) rather than a PDF creation tool, but it would work for that as well.  To use with a report was a little tougher as I had to be creative to do wrapping. It is probably best to use where the location to place values on a template remains consistent (invoice, certificate).

    I use Debian stable, and there is a package of PDF::Reuse, libpdf-reuse-perl, that can be installed. Catalyst::View::PDF::Reuse can then be install with dh-make-perl.

    S. Kiehn


    --- On Fri, 3/5/10, Charlie Garrison wrote:

    From: Charlie Garrison <garrison@zeta.org.au>
    Subject: [Catalyst] Which C::View::PDF should I use?
    To: "The elegant MVC web framework" <catalyst@lists.scsys.co.uk>
    Date: Friday, March 5, 2010, 5:38 AM

    Good afternoon,

    Both of these seem to be almost identical.

        Catalyst::View::PDF::Reuse
        Catalyst::View::PDF::API2

    Is one better to use than the other? C::V::PDF::API2 has been
    updated more recently, but other than that I can't see why I would choose one over the other.

    Or is really a choice of PDF::Reuse vs PDF::API2 which then dictates the View to use? It looks like PDF::Reuse might be a wrapper for PDF::API2, but I'm not really sure.

    I'm not looking to create PDFs from code, I'll be using an existing PDF and replacing values. And both C::V::P::Reuse & C::V::P::API2 seem to handle that in effectively the same way.

    Thanks,
    Charlie

    --    � Charlie Garrison ♊ <garrison@zeta.org.au>
       〠 PO Box 141, Windsor, NSW 2756, Australia

    O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
    http://www.ietf.org/rfc/rfc1855.txt

    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/




    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100305/b852eb20/attachment.htm
  • Charlie Garrison at Mar 6, 2010 at 3:13 am
    Good afternoon,
    On 5/03/10 at 1:32 PM -0800, S.A. Kiehn wrote:

    I am not a very experienced developer, but I was able to learn
    and use PDF::Reuse. I made a PDF template (11 page report) that
    I needed to intersperse data throughout. Using
    Catalyst::View::PDF::Reuse I was able to achieve a good result.
    I believe it is intended to be a reuse (of a PDF template)
    rather than a PDF creation tool, but it would work for that as
    well.? To use with a report was a little tougher as I had to
    be creative to do wrapping. It is probably best to use where
    the location to place values on a template remains consistent
    (invoice, certificate).
    And I apparently mis-read the POD before. I thought there was a
    function to *replace* text in an existing PDF with values from
    my app. (I should not have stared researching this so late in
    the day.)

    So how do people insert values into an existing PDF? Do you have
    to determine X/Y position for each value to be added to the PDF?

    I was expecting to be able to replace a unique string from the
    PDF with a value from my app. For some reason I though
    Catalyst::View::PDF::Reuse was doing more magic than it really is.

    Is there a simpler approach (other than C::V::PDF::Reuse) for
    creating PDFs with values from my app?

    Once I hand this app to my customer, they need to be able to add
    new fields to a dynamically generated form config. My plan was
    to have a html 'template' version of the form with unique values
    for each field, which the customer can print to PDF and then
    re-use in the app.

    Is there some way to determine the X/Y position of existing text
    in the PDF at runtime?


    On 5/03/10 at 11:15 AM +0100, Felix Antonius Wilhelm Ostmann
    wrote:
    We use simple View::TT and then a Filter:
    [%- USE Latex; FILTER latex("pdf") -%]
    Can anyone advise how long the learning curve is for latex (for
    basic usage)? Would I be better off spending my time learning that?


    Thanks,
    Charlie

    --
    ? Charlie Garrison ? <garrison@zeta.org.au>
    ? PO Box 141, Windsor, NSW 2756, Australia

    O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
    http://www.ietf.org/rfc/rfc1855.txt
  • Kieren Diment at Mar 6, 2010 at 3:40 am

    On 06/03/2010, at 2:13 PM, Charlie Garrison wrote:
    On 5/03/10 at 11:15 AM +0100, Felix Antonius Wilhelm Ostmann wrote:

    We use simple View::TT and then a Filter:
    [%- USE Latex; FILTER latex("pdf") -%]
    Can anyone advise how long the learning curve is for latex (for basic usage)? Would I be better off spending my time learning that?

    Depends how specific your layout requirements are and the kind of document you want to produce. LaTeX is pretty straightforward really, but you don't really have the fine grained control that other document formats have, so if you have exotic layout requirements it's going to be annoying.

    http://stp.lingfil.uu.se/~zrajm/nerd/LaTeX/quickguide.html is a good enough start. You don't need to know all of that.
  • Charlie Garrison at Mar 6, 2010 at 4:40 am
    Good afternoon,
    On 6/03/10 at 2:40 PM +1100, Kieren Diment wrote:

    Depends how specific your layout requirements are and the kind
    of document you want to produce. LaTeX is pretty
    straightforward really, but you don't really have the fine
    grained control that other document formats have, so if you
    have exotic layout requirements it's going to be annoying.

    http://stp.lingfil.uu.se/~zrajm/nerd/LaTeX/quickguide.html is a
    good enough start. You don't need to know all of that.
    Thanks, that was a good intro. It looks like I could almost get
    away with a simple LaTeX table for the form. But I can see
    myself getting bogged down by the details; I think latex is
    going to be "too hard" for this project. I may still come back
    to it as best option though.

    And it was good to get the LaTeX basics, I can start thinking
    about how I can use it for the next project.

    Thanks again for the info.

    Charlie

    --
    ? Charlie Garrison ? <garrison@zeta.org.au>
    ? PO Box 141, Windsor, NSW 2756, Australia

    O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
    http://www.ietf.org/rfc/rfc1855.txt
  • Bill Moseley at Mar 6, 2010 at 2:58 pm

    On Friday, March 5, 2010, Charlie Garrison wrote:
    Good afternoon,
    Thanks, that was a good intro. It looks like I could almost get away with a simple LaTeX table for the form. But I can see myself getting bogged down by the details; I think latex is going to be "too hard" for this project. I may still come back to it as best option though.
    If your needs are pretty simple there's HTMLDOC. I've used it for
    simple reports and invoices.
    http://www.easysw.com/htmldoc/

    It doesn't sound like it would be right in this case (modifying
    existing pdf) but it's worth knowing about.



    --
    Bill Moseley
    moseley@hank.org
  • Charlie Garrison at Mar 7, 2010 at 12:44 am
    Good morning,
    On 6/03/10 at 6:58 AM -0800, Bill Moseley wrote:

    Thanks, that was a good intro. It looks like I could almost get away with a simple LaTeX table for
    the form. But I can see myself getting bogged down by the
    details; I think latex is going to be "too hard" for this
    project. I may still come back to it as best option though.

    If your needs are pretty simple there's HTMLDOC. I've used it for
    simple reports and invoices.
    http://www.easysw.com/htmldoc/
    Thanks for that. I've looked at various html 2 pdf tools (I used
    html2ps for a project about 10 years ago). But lack of even
    basic CSS support makes the them useless for creating "pretty" PDFs.

    In reality, this project doesn't really need PDF output (HTML
    would work fine), but $customer says it's a requirement, so I've
    got to make it work for creating "pretty" PDFs.

    Thanks again for all the input.

    Charlie

    --
    ? Charlie Garrison ? <garrison@zeta.org.au>
    ? PO Box 141, Windsor, NSW 2756, Australia

    O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
    http://www.ietf.org/rfc/rfc1855.txt
  • Chris at Mar 7, 2010 at 10:06 pm
    Hi Charlie,
    Thanks for that. I've looked at various html 2 pdf tools (I used html2ps for
    a project about 10 years ago). But lack of even basic CSS support makes the
    them useless for creating "pretty" PDFs.

    In reality, this project doesn't really need PDF output (HTML would work
    fine), but $customer says it's a requirement, so I've got to make it work
    for creating "pretty" PDFs.
    I've found that a simple way to put values into a PDF is to use PDF
    forms - position the form fields in the appropriate location in the
    template doc, and to generate the output update the form fields and
    write a 'flattened' version of the doc. This means you can use visual
    tools to layout the doc, and your code doesn't need to know anything
    except the field names.

    If you're considering non-perl tools, then iText does a pretty good
    job of both creating PDF from scratch and updating PDF form fields,
    and would be easy to wrap to call from a view.

    Chris
    --
    chris@hutchinsonsoftware.com
    Armidale, NSW, 2350, Australia
  • Charlie Garrison at Mar 8, 2010 at 12:20 am
    Good morning,
    On 8/03/10 at 9:06 AM +1100, Chris wrote:

    I've found that a simple way to put values into a PDF is to use PDF
    forms - position the form fields in the appropriate location in the
    template doc, and to generate the output update the form fields and
    write a 'flattened' version of the doc. This means you can use visual
    tools to layout the doc, and your code doesn't need to know anything
    except the field names.
    Thanks for that tip. And I later realized thats where I got
    confused with my first read-through of the docco (thinking I
    could do a simple 'replace value'). For this project though,
    it's not practical for someone to create a PDF 'form'. I've got
    an action generating a blank html form which $customer can print
    to pdf (hopefully they can at least do that, I'm still working
    through it with them) which PDF::Reuse loads as the template.

    I'm still working out how to best specify the X/Y coords for
    each value though. I've got it all working; the hard part is
    next, explaining it all to the customer.

    Thanks,
    Charlie

    --
    ? Charlie Garrison ? <garrison@zeta.org.au>
    ? PO Box 141, Windsor, NSW 2756, Australia

    O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
    http://www.ietf.org/rfc/rfc1855.txt
  • Octavian Rasnita at Mar 8, 2010 at 6:41 am
    To: "The elegant MVC web framework" <catalyst@lists.scsys.co.uk>
    Hi Charlie,
    Thanks for that. I've looked at various html 2 pdf tools (I used html2ps
    for
    a project about 10 years ago). But lack of even basic CSS support makes
    the
    them useless for creating "pretty" PDFs.

    In reality, this project doesn't really need PDF output (HTML would work
    fine), but $customer says it's a requirement, so I've got to make it work
    for creating "pretty" PDFs.
    I've found that a simple way to put values into a PDF is to use PDF
    forms - position the form fields in the appropriate location in the
    template doc, and to generate the output update the form fields and
    write a 'flattened' version of the doc. This means you can use visual
    tools to layout the doc, and your code doesn't need to know anything
    except the field names.

    Do you know if there is a way of creating PDFs in the same way the HTML
    templates are created, by just putting a variable name in a certain place
    and render that pdf file by replacing that variable with its value? (Without
    needing to specify the position where those variables will be placed)

    Thanks.

    Octavian


    __________ Information from ESET NOD32 Antivirus, version of virus signature database 4923 (20100307) __________

    The message was checked by ESET NOD32 Antivirus.

    http://www.eset.com
  • Charlie Garrison at Mar 8, 2010 at 7:40 am
    Good evening,

    On 8/03/10 at 8:41 AM +0200, Octavian Rasnita
    wrote:
    Do you know if there is a way of creating PDFs in the same way
    the HTML templates are created, by just putting a variable name
    in a certain place and render that pdf file by replacing that
    variable with its value? (Without needing to specify the
    position where those variables will be placed)
    I don't. That's exactly what I was hoping to do, but I couldn't
    find a way to do it (without expensive commercial solutions, or
    without using hand-crafted PDF 'forms').

    I've got a form config which $customer can change (add fields,
    etc) and I've included X/Y coords as part of the config. That
    was the only way I could get it working in limited time I've got.

    I can share code with you if it will help (maybe offlist would
    be better).


    Charlie

    --
    ? Charlie Garrison ? <garrison@zeta.org.au>
    ? PO Box 141, Windsor, NSW 2756, Australia

    O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
    http://www.ietf.org/rfc/rfc1855.txt
  • Octavian Rasnita at Mar 8, 2010 at 8:27 am
    Hi Charlie,

    From: "Charlie Garrison" <garrison@zeta.org.au>
    Good evening,

    On 8/03/10 at 8:41 AM +0200, Octavian Rasnita
    wrote:
    Do you know if there is a way of creating PDFs in the same way the HTML
    templates are created, by just putting a variable name in a certain place
    and render that pdf file by replacing that variable with its value?
    (Without needing to specify the position where those variables will be
    placed)
    I don't. That's exactly what I was hoping to do, but I couldn't
    find a way to do it (without expensive commercial solutions, or
    without using hand-crafted PDF 'forms').

    I've got a form config which $customer can change (add fields,
    etc) and I've included X/Y coords as part of the config. That
    was the only way I could get it working in limited time I've got.

    I can share code with you if it will help (maybe offlist would
    be better).
    Charlie


    Unfortunately I don't know if it can help me, because I am blind and I can't
    see if the manually configured positions are displayed correctly. That's why
    I was hoping that there is a solution that works like the common TT
    templating system.

    Thank you.

    Octavian





    __________ Information from ESET NOD32 Antivirus, version of virus signature database 4923 (20100307) __________

    The message was checked by ESET NOD32 Antivirus.

    http://www.eset.com
  • Charlie Garrison at Mar 8, 2010 at 10:40 am
    Good evening,

    On 8/03/10 at 10:27 AM +0200, Octavian Rasnita
    wrote:
    Unfortunately I don't know if it can help me, because I am
    blind and I can't see if the manually configured positions are
    displayed correctly. That's why I was hoping that there is a
    solution that works like the common TT templating system.
    Wow, that certainly would make it more challenging. And I can't
    think of any way around needing to see where the values get
    printed. I'm having to position them through trial and error.
    (My current solution feels *very* hackish.)

    Sorry I can't offer anything more useful.


    Charlie

    --
    ? Charlie Garrison ? <garrison@zeta.org.au>
    ? PO Box 141, Windsor, NSW 2756, Australia

    O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
    http://www.ietf.org/rfc/rfc1855.txt
  • Matthias Dietrich at Mar 14, 2010 at 10:04 am
    Hi,

    Am 08.03.2010 um 09:27 schrieb Octavian Rasnita:
    On 8/03/10 at 8:41 AM +0200, Octavian Rasnita
    wrote:
    Do you know if there is a way of creating PDFs in the same way the HTML templates are created, by just putting a variable name in a certain place and render that pdf file by replacing that variable with its value? (Without needing to specify the position where those variables will be placed)
    Unfortunately I don't know if it can help me, because I am blind and I can't see if the manually configured positions are displayed correctly. That's why I was hoping that there is a solution that works like the common TT templating system.
    there is a commercial solution called PDFlib PPS ( http://www.pdflib.com/products/pdflib-family/pps/ ) which may help you. With the PPS and the "PDFlib block plugin" you can define text and/or image areas in your PDF within Acrobat Professional. You can drag them everywhere in the PDF and set a name for each. In your Perl code you just write text or place an image into such a named area easliy.

    I used the PDFlib in a previous job and it worked really nice and had lots of features! The bad thing is that it is a bit expensive (EUR 2390 / USD 3345) and a license is limited to one server/cpu. But you can download, develop and test the PDFlib with the PPS addon for free if you can accept having a stamp on each PDF you produce.

    Regards,
    matt

    --
    rainboxx Software Engineering
    Matthias Dietrich, Freelancer

    rainboxx | Mobil: +49 151 / 50 60 78 64
    K?nigsallee 43 | Phone: +49 7141 / 2 39 14 71
    71638 Ludwigsburg | WWW : http://www.rainboxx.de

    XING: https://www.xing.com/profile/Matthias_Dietrich18
    GULP: http://www.gulp.de/profil/rainboxx.html
  • Steve Kleiman at Mar 14, 2010 at 4:01 pm
    I've been using iText (http://itextpdf.com/) after using PDF::API2 for years. API2 hasn't grown and even once you know it, it's tricky to use. The community is inactive.

    iText is Java and the community is vibrant. I'll have my Catalyst app assemble a whole bunch of data and ship it to iText as a JSON object (iText reads XML, too). Then I have a program I wrote in Java suck in the JSON and render the PDF. It's way faster than Perl and there's all sorts of handy features that make doc generation easier.

    -steve

    On Mar 14, 2010, at 3:04 AM, Matthias Dietrich wrote:

    Hi,

    Am 08.03.2010 um 09:27 schrieb Octavian Rasnita:
    On 8/03/10 at 8:41 AM +0200, Octavian Rasnita
    wrote:
    Do you know if there is a way of creating PDFs in the same way the HTML templates are created, by just putting a variable name in a certain place and render that pdf file by replacing that variable with its value? (Without needing to specify the position where those variables will be placed)
    Unfortunately I don't know if it can help me, because I am blind and I can't see if the manually configured positions are displayed correctly. That's why I was hoping that there is a solution that works like the common TT templating system.
    there is a commercial solution called PDFlib PPS ( http://www.pdflib.com/products/pdflib-family/pps/ ) which may help you. With the PPS and the "PDFlib block plugin" you can define text and/or image areas in your PDF within Acrobat Professional. You can drag them everywhere in the PDF and set a name for each. In your Perl code you just write text or place an image into such a named area easliy.

    I used the PDFlib in a previous job and it worked really nice and had lots of features! The bad thing is that it is a bit expensive (EUR 2390 / USD 3345) and a license is limited to one server/cpu. But you can download, develop and test the PDFlib with the PPS addon for free if you can accept having a stamp on each PDF you produce.

    Regards,
    matt

    --
    rainboxx Software Engineering
    Matthias Dietrich, Freelancer

    rainboxx | Mobil: +49 151 / 50 60 78 64
    K?nigsallee 43 | Phone: +49 7141 / 2 39 14 71
    71638 Ludwigsburg | WWW : http://www.rainboxx.de

    XING: https://www.xing.com/profile/Matthias_Dietrich18
    GULP: http://www.gulp.de/profil/rainboxx.html







    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/
  • Chris at Mar 14, 2010 at 10:04 pm

    On Mon, Mar 15, 2010 at 3:01 AM, Steve Kleiman wrote:
    I've been using iText (http://itextpdf.com/) after using PDF::API2 for years. API2 hasn't grown and even once you know it, it's tricky to use. The community is inactive.

    iText is Java and the community is vibrant. I'll have my Catalyst app assemble a whole bunch of data and ship it to iText as a JSON object (iText reads XML, too). Then I have a program I wrote in Java suck in the JSON and render the PDF. It's way faster than Perl and there's all sorts of handy features that make doc generation easier.
    I confirm that iText works well. I've been using the C#/.NET version
    which is API-identical to the Java version, and it's very good for
    producing templated PDFs. Plenty of docs and examples too, plus the
    'iText in Action' book.

    - Chris
  • Aristotle Pagaltzis at Mar 15, 2010 at 2:58 pm

    * Steve Kleiman [2010-03-14 17:10]:
    I've been using iText (http://itextpdf.com/) after using
    PDF::API2 for years. API2 hasn't grown and even once you know
    it, it's tricky to use. The community is inactive.

    iText is Java and the community is vibrant. I'll have my
    Catalyst app assemble a whole bunch of data and ship it to
    iText as a JSON object (iText reads XML, too). Then I have
    a program I wrote in Java suck in the JSON and render the PDF.
    It's way faster than Perl and there's all sorts of handy
    features that make doc generation easier.
    On our project, we dropped some cash coin to buy a licence for
    PrinceXML <http://princexml.com/>. That thing is totally awesome,
    you give it pretty much any old XHTML with CSS and it spits out
    a PDF that looks the way you?d expect. It also supports a bunch
    of custom CSS rules for even more control. It?s not cheap, but
    for our purposes the price was completely worth it ? I spent some
    time integrating it, but it has completely eliminated all further
    work related to producing PDFs. (In contrast, our Excel exports
    f.ex. have consistently consumed non-trivial amounts of work.)

    As a rule I don?t like closed-source, binary stuff, but PrinceXML
    has proven to be an exception.

    Regards,
    --
    Aristotle Pagaltzis // <http://plasmasturm.org/>
  • Peter Edwards at Mar 15, 2010 at 3:32 pm
    JJ Allen gave MiltonKeynes.pm a good talk on what he uses to generate PDF
    invoices etc. for Penny's Arcade website
    http://www.pennysarcade.co.uk/files/Creating_PDF_files_with_Catalyst.pdf

    To use it

    1. Install OpenOffice, use Writer to create a PDF form, export as PDF
    http://danilop.wordpress.com/2008/07/02/how-to-create-pdf-forms-with-openoffice/

    2. Use http://search.cpan.org/perldoc?Catalyst::View::PDF::Reuse to
    mail-merge the PDF document to output


    Regards, Peter
    http://perl.dragonstaff.co.uk
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100315/fa225f1d/attachment.htm
  • Curtis "Ovid" Poe at Mar 16, 2010 at 10:20 am

    --- On Mon, 15/3/10, Aristotle Pagaltzis wrote:

    From: Aristotle Pagaltzis <pagaltzis@gmx.de>
    As a rule I don?t like closed-source, binary stuff, but
    PrinceXML has proven to be an exception.
    Holy crap. After going through samples on their site, I'm very impressed. And trying to pass Acid2 in a PDF renderer? Wow.

    Cheers,
    Ovid
  • Aristotle Pagaltzis at Mar 16, 2010 at 10:52 am

    * Ovid [2010-03-16 11:25]:
    And trying to pass Acid2 in a PDF renderer? Wow.
    Yeah, it was one of the first renderers to pass the test suite,
    beating out several of the big browsers. A magical piece of work.

    Regards,
    --
    Aristotle Pagaltzis // <http://plasmasturm.org/>
  • Gabriel Andrade at Mar 16, 2010 at 3:33 pm

    On Tue, Mar 16, 2010 at 7:52 AM, Aristotle Pagaltzis wrote:
    * Ovid [2010-03-16 11:25]:
    And trying to pass Acid2 in a PDF renderer? Wow.
    Yeah, it was one of the first renderers to pass the test suite,
    beating out several of the big browsers. A magical piece of work.

    Regards,
    --
    Aristotle Pagaltzis // <http://plasmasturm.org/>
    There's also an open-source solution based on Webkit rendering engine,
    and if you have no excuses to use a binary you should give it a try.
    I'm pretty sure it passes Acid2, does CSS3, Javascript and won't hurt
    your pocket. : )

    http://code.google.com/p/wkhtmltopdf/

    Try it and see:
    $ wkhtmltopdf http://www.nytimes.com/ nyt.pdf

    And thanks to maluco++ we have a perl interface for it:

    http://search.cpan.org/~tbr/WKHTMLTOPDF-0.02/lib/WKHTMLTOPDF.pm

    Cheers

    --

    Gabriel Andrade
    Perl developer at Aware IT (http://www.aware.com.br)
  • Aristotle Pagaltzis at Mar 16, 2010 at 6:53 pm

    * Gabriel Andrade [2010-03-16 16:50]:
    http://code.google.com/p/wkhtmltopdf/
    That looks interesting, thanks!


    * Adam Sj?gren [2010-03-16 18:15]:
    An alternative could perhaps be CutyCapt:

    * http://cutycapt.sourceforge.net/
    It requires an X11 server, so it isn?t.

    The wkhtmltopdf doesn?t make it easy either: it requires
    a patched Qt for that. But at least it?s possible at all.

    Regards,
    --
    Aristotle Pagaltzis // <http://plasmasturm.org/>
  • Wade Stuart at Mar 22, 2010 at 9:31 pm

    On Tue, Mar 16, 2010 at 2:53 PM, Aristotle Pagaltzis wrote:

    * Gabriel Andrade [2010-03-16 16:50]:
    That looks interesting, thanks!


    * Adam Sjøgren [2010-03-16 18:15]:
    An alternative could perhaps be CutyCapt:

    * http://cutycapt.sourceforge.net/
    It requires an X11 server, so it isn’t.

    Xvfb has been the solution to this forever.
    -Wade


    The wkhtmltopdf doesn’t make it easy either: it requires
    a patched Qt for that. But at least it’s possible at all.

    Regards,
    --
    Aristotle Pagaltzis // <http://plasmasturm.org/>

    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive:
    http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100322/17dfc29d/attachment.htm
  • Aristotle Pagaltzis at Mar 25, 2010 at 4:01 pm

    * Wade Stuart [2010-03-22 22:35]:
    On Tue, Mar 16, 2010 at 2:53 PM, Aristotle Pagaltzis wrote:
    * Adam Sj?gren [2010-03-16 18:15]:
    An alternative could perhaps be CutyCapt:

    * http://cutycapt.sourceforge.net/
    It requires an X11 server, so it isn?t.
    Xvfb has been the solution to this forever.
    And how is Xvfb (which is an X11 server) a solution the problem
    of requiring an X11 server?

    Regards,
    --
    Aristotle Pagaltzis // <http://plasmasturm.org/>
  • Wade Stuart at Mar 26, 2010 at 12:33 am

    On Mar 25, 2010, at 12:01 PM, Aristotle Pagaltzis wrote:

    * Wade Stuart [2010-03-22 22:35]:
    On Tue, Mar 16, 2010 at 2:53 PM, Aristotle Pagaltzis <pagaltzis@gmx.de
    wrote:
    * Adam Sj?gren [2010-03-16 18:15]:
    An alternative could perhaps be CutyCapt:

    * http://cutycapt.sourceforge.net/
    It requires an X11 server, so it isn?t.
    Xvfb has been the solution to this forever.
    And how is Xvfb (which is an X11 server) a solution the problem
    of requiring an X11 server?
    It is a virtual frame buffer that allows x11 requiring apps to run
    without a full display/head. What besides that is your issue around
    the x11 requirement on servers?

    Regards,
    --
    Aristotle Pagaltzis // <http://plasmasturm.org/>

    _______________________________________________
    List: Catalyst@lists.scsys.co.uk
    Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
    Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
    Dev site: http://dev.catalyst.perl.org/
  • Peter Edwards at Mar 26, 2010 at 12:51 am
    On Mar 25, 2010, at 12:01 PM, Aristotle Pagaltzis <pagaltzis@gmx.de>
    And how is Xvfb (which is an X11 server) a solution the problem
    of requiring an X11 server?
    I've used it before to run unit tests from batch under Solaris where no
    interactive X display is attached for code targeted to run using WxWidgets
    on Windows.
    Unless you actually need a display to look at it's useful to be able to run
    libraries that expect a display.

    Regards, Peter
    http://perl.dragonstaff.co.uk
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100326/f7099553/attachment.htm
  • Aristotle Pagaltzis at Mar 29, 2010 at 8:56 am

    * Wade Stuart [2010-03-26 01:45]:
    * Aristotle Pagaltzis [2010-03-25 17:05]:
    And how is Xvfb (which is an X11 server) a solution the
    problem of requiring an X11 server?
    It is a virtual frame buffer that allows x11 requiring apps to
    run without a full display/head. What besides that is your
    issue around the x11 requirement on servers?
    Either you start one per CutyCapt instance which can get quite
    expensive quickly, or you have a new d?mon to manage. And either
    way you need to install a metric ton of X11 crap on the server.

    Regards,
    --
    Aristotle Pagaltzis // <http://plasmasturm.org/>
  • Adam Sjøgren at Mar 16, 2010 at 5:06 pm

    On Mon, 15 Mar 2010 15:58:24 +0100, Aristotle wrote:

    On our project, we dropped some cash coin to buy a licence for
    PrinceXML <http://princexml.com/>. That thing is totally awesome,
    you give it pretty much any old XHTML with CSS and it spits out
    a PDF that looks the way you?d expect.
    An alternative could perhaps be CutyCapt:

    * http://cutycapt.sourceforge.net/

    which is based on WebKit, free software, and seems to generate quite
    nice output.


    Best regards,

    Adam

    --
    "It isn't modern just because it's electric. Country Adam Sj?gren
    music was electric too." asjo@koldfront.dk

Related Discussions

People

Translate

site design / logo © 2022 Grokbase