A library to create PDF Files from a set of image files/base64 data
Project description
carol_pdf_generator is a Python library for creating PDF Files from images (png, jpg) file. Base64 encoded is also supported.
Installation
Use the package manager pip to install foobar.
pip install carol_pdf_generator
Usage
from carol_pdf_generator import get_from_file_list
from urllib import request
file_list = [
'jpgfile.jpg',
'pngfile.png'
]
base64_images.append(request.urlopen('https://pastebin.com/raw/k3VZeNHW').read().decode('latin1'))
base64_images.append(request.urlopen('https://pastebin.com/raw/CaZJ7n6s').read().decode('latin1'))
base64_images.append(request.urlopen('https://pastebin.com/raw/7Asb2iMJ').read().decode('latin1'))
from_file = get_from_file_list(file_list)
base64 = get_from_base64_list(base64_images, 'test.pdf') # Returns the PDF base64 encoded data uri and saves the PDF to test.pdf
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
History
0.1.0 (2020-09-15)
First release on PyPI.
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
Built Distribution
Close
Hashes for carol_pdf_generator-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 799625b1f08ad31646c69addbf7d61f70e79d12bd1c072d7fb351bc8d7611cfd |
|
MD5 | 5b342728e22e401411e1ad726ecc9053 |
|
BLAKE2b-256 | b70d2a7d25259d2bec0d7c8de86a166e31f90b1b5c4873b2fed5bcdf42d381a5 |
Close
Hashes for carol_pdf_generator-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2a9bd1bae6c4b56091392d89ee80b37cd80dfc54a54cfe72e2003a7a32fdc55 |
|
MD5 | 9036356f4b5aa1dabfb4ab8f2b8b606a |
|
BLAKE2b-256 | eaa1d81e4993f6e8a224b2e261d6aac88809c15c128f1b9433f498a6fa314db2 |