Commit c8897a61 authored by Martin Klimes (k11m1)'s avatar Martin Klimes (k11m1)
Browse files

fixed reportalb

parent 2ecb3ef7
reportlab @ 48cafb6d
Subproject commit 48cafb6d64ff92fd9d4f9a4dd888be6f7d55b765
[repository]
native = LF
[patterns]
**.cgi=native
**.pas=native
**.ini=native
**.in=native
**.css=native
**.htm=native
**.html=native
**.xml=native
**.rml=native
**.prep=native
**.js=native
**.tcl=native
**.py=native
**.pyw=native
**.pyx=native
**.tac=native
**.tap=native
**.c=native
**.cpp=native
**.h=native
**.sh=native
**.java=native
**.pl=native
**.asp=native
**.jsp=native
**.cat=native
**.bat=native
**.dtd=native
**/Makefile=native
**.txt=native
**.patch=native
**.dsp=CRLF
**.dsw=CRLF
**.png=BIN
**.jpg=BIN
**.jpeg=BIN
**.gif=BIN
**.bmp=BIN
**.pdf=BIN
**.eps=BIN
syntax: glob
*.o
*.lo
*.la
*.bak
*.rej
*.orig
*.pyc
*.pyo
*~
.*~
.*.swp
.DS_STORE
*.zip
*.obj
*.pdb
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
*.lib
*.sbr
*.scc
build
__pycache__
*.pyd
syntax: regexp
^reportlab.egg-info
^dist/.*
^demos/stdfonts/.*\.pdf
^docs/.*\.pdf
^docs/.*/.*\.pdf
^src/reportlab/fonts/.*\.pfb
^src/reportlab/fonts/.*\.afm
^src/reportlab/fonts/.*\.ttf
^src/reportlab/graphics/barcode/.*\.pdf
^src/reportlab/graphics/barcode/test_cbcim\..*
^src/reportlab/graphics/pmout
^tools/docco/.*\.pdf
^tests/test_.*\.pdf
^tests/test_.*\.svg
^tests/_i_am_actually_a_gif\.jpg
^tests/_i_am_actually_a_jpeg\.gif
^tests/axestest0\.svg
^tests/pythonpoint\.pdf
^tests/test_pdfgen_pycanvas_out\.txt
^tests/test_renderSVG_output\.html
^tests/test_source_chars\.txt
^tests/barcode-out
^tests/render-out
^tmp/
^patches/
00f9aea3823b5de77534446bb33a2281bac864d4 ReportLab_1_10
0660d96b826e3bbae7eccf6f82702ca125bac95e pyRXP-0-7-20020430121359
0814059bdcedb4058108cdfa46e5268384ac3cc4 pyRXP-0-9-20021028113501
09dbe26c28a578a62dd1f293356fce9aa4b75565 ReportLab_1_06
0e4c007ab45827cb91a0cfe750a8abbd4cd8c20d ReportLab_2_6
0e9eac3c68915ac0f06fe714018ade26c320ddc9 ReportLab_1_14
132245a360672a7c76d570d6e76b16ccd7de7dba ReportLab_0_93
a57692215f7c2ab95eaa90e93df971c3e2a5dad1 ReportLab_2_5
17bfd1582e1d1804fe466c92c3a68cd38a3ea2a0 ReportLab_1_09
2398e3e6b4f5730bba445dcad48159693809264b ReportLab_1_08
2608a61dcb08f490d8d84fbb6dc72fba3232d3f9 ReportLab_1_01
32b005bb68791ec49a18b172efe719b7a4051d3d ReportLab_2_2
1cfe7901ae99711c39774c2296481dad3ba8bdcb ReportLab_2_0
2b1bac113dfb7ba1bdd4e74eabe4f1da2e98ced7 ReportLab_1_00
049d6a82b49afab815eeef65cbdd62af0dac50dc jython25
3b8fe26d3d52ca88cea8dea0196682828a90e744 ReportLab_1_13
3e625ed7b80cc9b66c3ea995a929cd4d4fdabc34 ReportLab_1_07
3ecf3f66bf7d1a14d83919c7d7a279c1778d8630 ReportLab_2_3
f31a47336a0ff6b29f2f6646495c99c8a1bc0180 rtl-support
5b209abb32633159698487b73488774233bd2886 ReportLab_0_85
5caad36896873d5b49a0fe31e75e096f1cec98aa renderPM-0-9-20021028121351
b99a2247e79f7c70476b65ccd53fb015d8a21b3e ReportLab_2_1
60b7b4f355761de79eac0c92f5d0f8296c2ac19a ReportLab_1_17
686a230cd895f3a298b0dcd96f90efc7aedb0cd8 ReportLab_1_02
6eb3b0e88778afda2c378e5d35b0e9be4ab6fa5c ReportLab_1_03
6eeb7f9994c705d633e0211ec43dc6c88ab7b29e ReportLab_0_90
6f42ca4d16afbaa526e78f4fe01fa4961ddf2bd8 ReportLab_0_91
7f95ee3e4e3836f567de1e51fc8d993f9feb2757 ReportLab_1_16
8e69156a92eca7d1f3ca4ddd5023e1657ce2b277 ReportLab_1_05
90f3fe141f6ab7c29abd0b8e051f83b3ef1cd81d ReportLab_0_92
b45f391b2a6fa8af48a7418e904267845fc86794 ReportLab_1_18
d81949596070956236b22216a3788eec7da4cdbf pre-utf8-merge-trunk
bc3d35b57ed562e6ab9f714d5abe1e04135e6d16 ReportLab_1_12
a1be912dcbd40faf86566fe53c0fc41457ff18b9 fidelity-20050310T094100
a1be912dcbd40faf86566fe53c0fc41457ff18b9 fidelity-20050310T103800
c09ba00d4cfb4b040ef5c94066205b3c699734a7 ReportLab_0_95
ca9eb4f68eabb0f95b56884c3e141a3d509ffc56 Before_reportlab_package
ba8cb8ae1c041307051b16fd39a666845dde7532 ReportLab_2_4
cc5547dcdd91bd5d144c17226ddb70159dd741f1 ReportLab_1_15
cdd3591d5c1c40cf20293719a64b38f7f650c11b ReportLab_1_11
450d2bc05119303ba4521efb079bd00c40b8b1b3 ReportLab_1_20
daa62b6d12e9e045842a8ef1a95f7fd5f2e0100d ReportLab_1_19
ed379b28de00522798c2a57624e128652750e308 ReportLab_0_94
97456f60eb12ee217cbe2a57f124f8b10d6ce67f ReportLab_2_7
6382a792db9edbfa6a9bb876aa0fb92786f03b58 ReportLab_3_0
5d54c73812472eb90891686b1633a13f30fc7442 ReportLab_3_2_0
This diff is collapsed.
Please see README.txt for installation instructions.
#####################################################################################
#
# Copyright (c) 2000-2014, ReportLab Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of the company nor the names of its contributors may be
# used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE OFFICERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
#####################################################################################
=====================================
README
=====================================
(C) Copyright ReportLab Europe Ltd. 2000-2014.
See ``LICENSE.txt`` for license details.
This is the ReportLab PDF Toolkit. It allows rapid creation
of rich PDF documents, and also creation of charts in a variety
of bitmap and vector formats.
This library is also the foundation for our commercial product
Report Markup Language (RML), available in the ReportLab PLUS
package. RML offers many more features, a template-based style
of document development familiar to all web developers, and
higher development productivity. Please consider trying out
RML for your project, as the license sales support our open
source development.
Contents of this file:
1. Licensing
2. Installation
2.1 Source Distribution or Subversion
2.2 Manual Installation without C Compiler (e.g. Windows)
2.3 easy_install
2.4 Windows .exe Installer
2.5 Ubuntu and other Debian-based Systems
3. Prerequisites / Dependencies
4. Documentation
5. Acknowledgements and Thanks
1. Licensing
============
BSD license. See ``LICENSE.txt`` for details.
2. Installation
===============
In most cases, ``easy_install reportlab`` or ``pip install reportlab`` will
do the job. Full details follow below for each platform.
2.1 General prerequisites
--------------------------
You need to have installed Python (versions 2.7 or >=3.3),
and ideally PIL or Pillow with Freetype support; more notes on prerequisites
follow below.
2.2. Where to get the code
------------------------------------------
Latest builds are available from ReportLab's
open source download area::
https://www.reportlab.com/pypi/
Main releases are also available from the Python Package Index:
http://pypi.python.org/
From March 2013, the code is being hosted in Mercurial on BitBucket.
You can obtain the latest code from our Mercurial repository with::
hg clone https://bitbucket.org/rptlab/reportlab
Users of our commercial libraries, and/or anyone who registers on our site,
can also access our commercial area which has exactly the same packages,
paired with the matching commercial ones (rlextra); it is important to keep
both in sync.
2.3 Windows Packages
--------------------
We no longer made .exe or .msi files. We provide ``.whl`` files with compiled
C extensions for all supported python versions at
http://pypi.python.org/pypi/reportlab/
These may be installed using recent `pip` or other competent distribution
package. If you aren't comfortable with the command line, we recommend pip-win:
https://sites.google.com/site/pydatalog/python/pip-for-windows
This will NOT install the tests, examples and documentation. If you want
to learn your way around the package or do development with it on Windows,
we suggest you also obtain source from https://bitbucket.org/rptlab/reportlab
and work with the examples/tests within that directory.
2.4 Mac OS
-------------
On Mac OS, you will need XCode with the Command Line Tools option installed
in order to compile the C extensions. On Lion
or later, type ``clang`` at a prompt; if you get ``command not found`` or
similar, the C compiler is not installed.
We then recommend the *brew* installation tool to fetch open source packages.
You should run::
brew install freetype
before instaling *reportlab* to ensure that the Python Imaging Library gets
compiled with JPEG support.
Thereafter, you can install with ``easy_install reportlab`` or by fetching
the source and using ``python setup.py install``
2.5 Unix / Linux
-----------------
On Unix and Mac OS we assume a C compiler is available to compile the
C extensions.
On Ubuntu, you will need
*build-essential*, *libfreetype6-dev*, *python-dev* and *python-imaging*.
Most other Linux and xBSD distributions have packages with
similar names.
Thereafter, you can use ``easy_install reportlab``, ``pip install reportlab``,
or fetch the source and use ``python setup.py install``.
From Ubuntu 12.04 desktop onwards, a copy of reportlab is already installed.
Take care not to confuse it with any releases you download.
3. Prerequisites / Dependencies
===============================
This works with Python versions 2.7 or >=3.3. Older versions are available
going back to Python 1.5 or thereabouts.
There are no absolute prerequisites beyond the Python
standard library; but the Python Imaging Library (PIL or Pillow)
is needed to include images other than JPG inside PDF files.
The C extension are optional but anyone able to do so should
use _rl_accel as it helps achieve acceptable speeds when wrapping
paragraphs and measuring text string lengths. The
_renderPM extension allows graphics (such as charts) to be saved
as bitmap images for the web, as well as inside PDFs.
4. Documentation
================
Naturally, we generate our own manuals using the library.
In a 'built' distribution, they may already be present in the
docs/ directory. If not, execute ``python genAll.py`` in
that directory, and it will create three PDF manuals::
reportlab-userguide.pdf
reportlab-reference.pdf
reportlab-graphics-reference.pdf
These are also available in daily build form from the documentation
page on our web site. The manuals are very useful 'how-to' examples
if you are aiming to create long documents.
5. Test suite
=============
Tests are in the ``tests/`` directory. They can be executed by cd'ing into the
directory and executing ``python runAll.py``, or from ``python setup.py tests``.
The tests will simply try to 'import reportlab'. Be warned that if you already have a copy
of reportlab installed (which happens by default in Ubuntu 12.04 desktop), it may try to
run the installed reportlab and cause permission errors as it can't generate PDF files
without sudo rights.
If you do not have a copy insralled and run them prior to installation/compilation,
there may be one or two failures from tests which exercise the C extensions that have not
been compiled.
The tests mostly produce output files with the same name as the test, but extension
.pdf. It is worth reviewing the list of test scripts as they provide valuable 'how
to' information.
If you have no internet connection, one or two tests may fail where we try to load images
from URLs. This is normal. The next release of this package will silently skip
such tests using features only available in Python 2.7.
6. Demos
========
A small number of demo programs are included in ``demos/``, none of which are particularly
exciting, but which may have some intructional value. These were the first programs we
wrote back in 2000.
The *odyssey* demo serves as our benchmark suite. If you download the full Odyssey text,
you can generate a PDF of Homer's Odyssey with either (a) no wrapping, (b) simple paragraphs
or (c) paragraphs with enough artificial markup (bold/italic on certain words) to exercise
the parser.
7. Acknowledgements and Thanks
==============================
``lib/normalDate.py`` originally by Jeff Bauer.
Many, many contributors have helped out between 2000 and 2013.
We try to keep a list in the first chapter of the User Guide; if you
have contributed and are not listed there, please let us know.
The "master version number" lives in src/reportlab/__init__.py. Sorry!
#Copyright ReportLab Europe Ltd. 2000-2015
#see license.txt for license details
__doc__="""The Reportlab PDF generation library."""
Version = "3.2.13"
__version__=Version
__date__='20151210'
import sys, os, imp
if sys.version_info[0:2]!=(2, 7) and sys.version_info<(3, 3):
raise ImportError("""reportlab requires Python 2.7+ or 3.3+; 3.0-3.2 are not supported.""")
#define these early in reportlab's life
isPy3 = sys.version_info[0]==3
if isPy3:
def cmp(a,b):
return -1 if a<b else (1 if a>b else 0)
import builtins
builtins.cmp = cmp
builtins.xrange = range
del cmp, builtins
else:
from future_builtins import ascii
import __builtin__
__builtin__.ascii = ascii
del ascii, __builtin__
#try to use dynamic modifications from
#reportlab.local_rl_mods.py
#reportlab_mods.py or ~/.reportlab_mods
try:
import reportlab.local_rl_mods
except ImportError:
pass
def _fake_import(fn,name):
if os.path.isfile(fn):
with open(fn,'rb') as f:
imp.load_source(name,fn,f)
try:
import reportlab_mods #application specific modifications can be anywhere on python path
except ImportError:
try:
_fake_import(os.path.expanduser(os.path.join('~','.reportlab_mods')),'reportlab_mods')
except (ImportError,KeyError):
pass
This directory is a convenient place to put
fonts where Reportlab will find them. If running
in a server environment, this is a good place to
put Type 1 fonts needed by your application. If
in a desktop environment, you might prefer to add
your font directories to the T1SearchPath in
reportlab/rl_config.py instead.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any