automatical pdf generating

vasudevram vasudevram at gmail.com
Sun Jun 24 16:01:52 EDT 2007


On Jun 24, 10:03 pm, Grant Edwards <gra... at visi.com> wrote:
> On 2007-06-24, Jackie <jackie.B... at gmail.com> wrote:
>
> > For each folder, I want to print the 4 pictures into a single-paged
> > pdf file (letter sized; print horizontally). All together, I want to
> > get 50 pdf files with names: 01.pdf,02.pdf,...,50.pdf.
>
> > Is it possible to use Python to realized the above process?
>
> Yes.
>
> > I know there is a module named "reportlab". Is there any easy
> > command in the module to do my job?
>
> Yes.
>
> http://www.reportlab.org/rl_toolkit.htmlhttp://www.reportlab.com/docs/userguide.pdf
>
> --
> Grant Edwards                   grante             Yow!  You mean you don't
>                                   at               want to watch WRESTLING
>                                visi.com            from ATLANTA?

There are many different ways to do what you want, as the other
replies say.

1. If you're not a programmer, the OpenOffice suggestion is good.

2.1 If you're a programmer, read up on the ReportLab docs shown in a
previous reply by Grant Edwards, and try it out. Equivalently, you
could use Ruby and PDF::Writer. Both ReportLab and PDF::Writer have
support for creating PDFs with images, and both Python and Ruby can
automate the part of iterating over the multiple files and
directories.

2.2 Also you could try another approach - use some scripting language
like Python (or Perl or Ruby) together with one of the free PDF
creation / conversion tools that you can easily find on the Internet
by a Google search (using suitable keywords like "HTML to PDF", "PDF
conversion", etc. Make sure to try out various combinations /
variations of keywords if you don't get a solution at once - this is
fundamental to Web searching.

And ... if you're not a programmer, consider becoming one :-)
It's good fun, and will help you do a lot of things ...

Vasudev Ram
http://www.dancingbison.com
http://jugad.livejournal.com
http://sourceforge.net/projects/xtopdf




More information about the Python-list mailing list