Skip to content

michaelgale/pdfdoc-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pdfdoc-py

python version https://github.com/michaelgale/pdfdoc-py/blob/master/LICENSE Code style: black

Python utility library for compositing PDF documents with reportlab.

Installation

The pdfdoc-py package can be installed directly from the source code:

    $ git clone https://github.com/michaelgale/pdfdoc-py.git
    $ cd pdfdoc-py
    $ python setup.py install

Usage

After installation, the package can imported:

    $ python
    >>> import pdfdoc
    >>> pdfdoc.__version__

Example of making a label sheet with 25 labels on Avery 5262 self-adhesive label sheets:

from pdfdoc import *

ld = LabelDoc("my_labels.pdf", style=AVERY_5262_LABEL_DOC_STYLE)
labels = [i for i in range(25)]
for label, row, col in ld.iter_label(labels):
    tr = TextRect(withText="Label %d" % (label))
    # tr can be any derived ContentRect or TableVector class
    ld.set_table_cell(tr, row, col)

Requirements

  • Python 3.6+
  • reportlab
  • toolbox-py

Authors

pdfdoc-py was written by Michael Gale

About

Python utility library for compositing PDF documents with reportlab.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published