Pdfgrid is a Python command-line tool and module for adding a regular grid on top of all pages of an existing PDF document. It will mostly be used for measuring individual parts of PDF pages like graphics or paragraph widths. For the time being, only a rectangular grid with major and minor lines is supported, and their colour and line widths can be set individually.
NOTE: This is an initial release. The API is likely to change and for the time being the grid size is limited to A4, but this will change in future releases.
Pdfgrid depends on two Open Source libraries, namely pyPdf, a package written by Mathieu Fenniak and reportlab by ReportLab, Ltd.
This version fixes an issue with the manual installation.
Features
add regular rectangular grid over all pages of a PDF document
define grid origin on all PDF pages
define grid styles containing grid step, line width and colour
use multiple grids at once with different styling
install a Python module named pdfgrid.py
install a Python command-line script named pdfgrid
provide a Unittest test suite
Examples
You can use pdfgrid as a Python module e.g. like in the following interactive Python session:
>>> from reportlab.lib.colors import red
>>> from reportlab.lib.units import cm
>>> from pdfgrid import grid
>>> grid("foo.pdf", origin=(0, 0), styles=[(1*cm, 0.1, red)])
written: foo-grid.pdf
In addition there is a script named pdfscript, which can be used from the system command-line e.g. like this:
$ pdfgrid -h $ pdfgrid -v $ pdfgrid --origin "0,0" --styles "1*cm,0.1,colors.red" foo.pdf written: foo-grid.pdf
Metadata
Release files for pdfgrid 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pdfgrid-0.2.0.tar.gz | 38.9 kB | Without provenance | Details for pdfgrid-0.2.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdfgrid-0.2.0-py2.6.egg | Legacy Egg format | - | - | Details for pdfgrid-0.2.0-py2.6.egg |
| pdfgrid-0.2.0-py2.5.egg | Legacy Egg format | - | - | Details for pdfgrid-0.2.0-py2.5.egg |
Total release size: 54.2 kB
Release files / pdfgrid-0.2.0.tar.gz
| Download URL | pdfgrid-0.2.0.tar.gz |
|---|---|
| Size | 38.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
937bd9b9d20c4f240b09da6c77204fc96fc0ebc13f6b9f3dd8d14339023054a9
|
|
BLAKE2b-256 checksum How to use checksums |
e74bec11d40aa55f4d039e799bb8d38f8e5fb06b5534b994cb2bf854a37b94f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pdfgrid-0.2.0-py2.6.egg
| Download URL | pdfgrid-0.2.0-py2.6.egg |
|---|---|
| Size | 7.7 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
ba299ea4743eafc13221c9bd577336f4b4f932f7f45dd959fa7c3afa74f45bf6
|
|
BLAKE2b-256 checksum How to use checksums |
c4a340f0f608c41f5b6a7f312b0e7b4808faab7a5bb4c769692495ff669a6774
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pdfgrid-0.2.0-py2.5.egg
| Download URL | pdfgrid-0.2.0-py2.5.egg |
|---|---|
| Size | 7.7 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
3ffb93d31a6314ac2c98c3fdfb0f62d3aa1f421b9c8b1e1fcce0449b7b08f10e
|
|
BLAKE2b-256 checksum How to use checksums |
7d80799bfc5cfce8f1c6311118c721209042694caac7c4c540e2f799f9eec27c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pdfgrid 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.