[Zope] PDF and barcodes

Martijn Pieters mj@antraciet.nl
Tue, 28 Sep 1999 09:57:29 +0200


At 17:27 28/09/99 , Ping Lau wrote:
> >> > Unless you want to generate PDF or Postscript files on the fly, you are
> >> > *not* going to get what you want from a browser-based application,
> >> > regardless of the server.  Neither Zope nor any other Web App can
> >> > control how your browser will print an HTML page (AFAIK).
> >>
> >>There is a PDF package for Perl, but I don't know of any for Python.
> >>If there are, then you can relatively easily generate PDF on the fly.
> >
> >There is an excelent library at:
> >
> >   http://www.pdflib.com/
> >
> >that comes with a Python interface. It has a pricetag for commercial use
> >however.
>
>I like to first thank all of you for your suggestions.  But I still can't
>quite figure out how PDF can solve my problem.  The first problem I am
>facing is printing reports to pre printed forms loaded in dot matrix
>printers.  The program has to drive the printer to print the info at the
>right spot on the form.  The second problem is how to print barcode(Code39
>symbology) on some documents.  The barcode encodes the document number.  I
>have found a barcode class written in Java.  Is there a way to use Java
>class within Zope?

With PDF you can position very precisely, and consistently across 
platforms. With it you can generate a printable document that would fit 
perfectly into your pre-printed form. You wll have to experiment a bit with 
the fonts and a dot-matrix printer though, to see what works best.

As for barcodes: They are only lines of different widths. If you have the 
source of that Java class, you could reimplement it in Python, and, if they 
are part of the documents you are going to print with PDF, integrate that 
with your generated document. Both PDF libraries mentioned allow you to 
directly draw lines of a specified width, and import a GIF.

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------