Generate diplomas using images and CSV Files
Project description
python_diploma_generator
Generate PDF diplomas using images and a CSV file
Install
pip install diploma_generator
Usage as module
Params:
- background_image_path: path to the background image
- x: x position of the name in cm
- y: y position of the name in cm
- w: width of the name in cm
- h: height of the name in cm
- font_size: font size of the name
- font_path: path to the font
from diploma_generator import DiplomaGenerator
diploma_generator = DiplomaGenerator(
background_image_path,
x, y,
w, h,
font_size, font_path
)
diploma_generator.add_diploma_page(person_name, Optional[qr_code_text])
diploma_generator.save("output.pdf")
Usage as CLI single diploma
diploma_generator \
--background_image_path <path> \
-n <name> \
-xy "1,11" \
-wh "24,1" \
-o "output.pdf"
Usage as CLI multiple diplomas
diploma_generator \
--background_image_path <path> \
--csv <path> \
-xy "1,11" \
-wh "24,1" \
-o "output.pdf"
Example CSV (name, qr, output)
Nombre 1,Para el QR,diploma1
Nombre 2,,diploma.pdf
Nombre 3,,
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for diploma_generator-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad98b0ed905c337915ec3e726e4d73724721a559fd0bba56ca41eb1d8291674d |
|
MD5 | cd5c812fe47341a22428c612b20f0834 |
|
BLAKE2b-256 | f912f640fa54faa9660733ab416cc5d6d3f53d500b656dacc32edadd08bd5415 |