Skip to main content

Populate a PDF with data from Microsoft Excel

Project description

Automate PDF population with pdfpop

License Release CI/CD Tests Codecov Size


Automate PDF population with pdfpop.

Installation

You can install pdfpop with:

pip install pdfpop

Usage

The pdfpop usage consists of two steps: (1) form configuration and (2) execution.

Step 1. Form Configuration

ℹ️ This step only needs to be run once for each unique form.

This step generates a form-specific configuration file that allows you to inform pdfpop how data should be routed from the data file to the PDF form. You can generate this file with the config command:

# Usage: pdfpop config <form>
pdfpop config examples/example-form.pdf

This will output a pdfpop- prefixed JSON file in your current working directory (e.g., pdfpop-example-form.json). By default, all fields will be assigned a value of null and, therefore, will be ignored until the null value is replaced with instructions on how to populate the field. An example of an edited configuration file is available here.

Step 2. Exectuion

Once you have a form configuration file you can populate your PDF form using the run command:

# Usage: pdfpop run <config> <data>
pdfpop run examples/example-form.json examples/example-data.xlsx

This will generate a populated PDF form at the location prescribed by the values of<output_dir>/<output_name> in the configuration file (e.g., examples/pdfpop-example-form.pdf).

License

Copyright (C) 2022 Ian Dinwoodie

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdfpop-0.5.0.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

pdfpop-0.5.0-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file pdfpop-0.5.0.tar.gz.

File metadata

  • Download URL: pdfpop-0.5.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pdfpop-0.5.0.tar.gz
Algorithm Hash digest
SHA256 ac5ac12df161c13a0f4ed0f2ae4746b74b50d23294ba4d5fad941bdbd1067120
MD5 de98937d9ccd4f68ed6c2776bbb0abbc
BLAKE2b-256 0856813ad6e22233c0664890493370f45433cb4b50374d6b84d6428955a01a21

See more details on using hashes here.

File details

Details for the file pdfpop-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: pdfpop-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pdfpop-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 692f5f610959b1d870579a0bc0e4c75b0a21f4e76bc188e608144dc3b9d656c2
MD5 986317c0b0ce35f90987c8687a6711b0
BLAKE2b-256 876137c5a5d62efc4074ddc181d3e548c6560bdbdd546bae0494f734405c5702

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page