Skip to main content

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

carol_pdf_generator-0.1.0.tar.gz (1.3 MB view hashes)

Uploaded Source

Built Distribution

carol_pdf_generator-0.1.0-py2.py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 2 Python 3

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