reportlab/README
author rgbecker
Thu, 20 Jul 2000 13:54:58 +0000
changeset 404 2b1bac113dfb
child 494 54257447cfe9
permissions -rw-r--r--
Release 1.00 Administration
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
404
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
     1
Release 1.0
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
     2
===========
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
     3
This is release 1.0 or the ReportLab toolkit. It includes usable if
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
     4
rough documentation as PDF documents and has a solid layout API
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
     5
in reportlab.platypus (which if not frozen is certainly not totally
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
     6
fluid).
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
     7
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
     8
Installation
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
     9
============
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    10
Either unpack reportlab.zip or reportlab.tgz to some directory say
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    11
d:\ReportLab. If you can, ensure that the  line terminator style is
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    12
correct for your OS (man zip programs have a text mode option eg -a).
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    13
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    14
Create a .pth file, say reportlab.pth in your Python
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    15
home directory.  It should have one line:
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    16
d:/ReportLab.
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    17
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    18
Alternatively unpack the archive into a directory which is already on your
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    19
python path.
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    20
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    21
Then reportlab.pdfbase, reportlab.pdfgen and reportlab.platypus are
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    22
available packages.
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    23
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    24
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    25
Existing PDFGEN Code
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    26
=============
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    27
Modifying existing code to work with the package structure:
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    28
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    29
import pdfmetrics   ->  from reportlab.pdfbase import pdfmetrics
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    30
import pdfutils     ->  from reportlab.pdfbase import pdfutils
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    31
import pdfdoc       ->  from reportlab.pdfbase import pdfdoc
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    32
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    33
import pdfgeom      ->  from reportlab.pdfgen import pdfgeom
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    34
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    35
import pdfgen       ->  from reportlab.pdfgen import canvas
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    36
                    ->  from reportlab.pdfgen import pathobject
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    37
                    ->  from reportlab.pdfgen import textobject
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    38
                        then pdfgen.Canvas   -> canvas.Canvas
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    39
                        pdfgen.PDFPathObject -> pathobject.PDFPathObject
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    40
                        pdfgen.PDFTextObject -> textobject.PDFTextObject
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    41
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    42
import platypus     ->  from report.platypus import Flowable, Table
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    43
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    44
Testing
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    45
=======
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    46
You can run all python scripts in directories named test or tests.
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    47
At present there are tests in reportlab/pdfgen/test, reportlab/platypus/test
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    48
and reportlab/demos/tests.
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    49
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    50
The scripts in other subdirectories of demos are fairly useful.
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    51
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    52
Other executable scripts are
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    53
	./pdfbase/pdfdoc.py
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    54
	./pdfgen/canvas.py
2b1bac113dfb Release 1.00 Administration
rgbecker
parents:
diff changeset
    55
	./platypus/tables.py