Skip to main content

No project description provided

Project description

To create the content for the README.md file of your Python package, you can include the following information:

PDF Generator

A Python package for converting JSON data to HTML and generating PDFs.

Description

This package provides functionality to convert JSON data to HTML using a customizable template and then generate PDF files from the HTML content. It allows users to provide their own JSON data and template file to customize the output.

Features

  • Convert JSON data to HTML - anyName.json
  • Support for custom HTML templates - template.html
  • Generate PDF files from HTML - output.html
  • Merge multiple PDF files into a single PDF - merged_output.pdf

Installation

You can install the package using pip:

pip install oneoneoneexample==0.6

Note: Replace "version-number" with the recent version number of the package, ex: 0.6 -> latest.

Usage

from pdf_generator.convert import generate

# Specify the paths and file names for JSON data, template, output HTML, and new PDF file
json_file = 'path/to/json/data.json' (complete path of json file)
template_directory = 'path/to/template/directory' (only template directory)
output_html_path = 'path/to/save/output/html' (only output html directory)
new_pdf_path = 'path/to/save/new/pdf' (only pdf saving directory)

# Generate HTML and PDF files
generate(json_file, template_directory, output_html_path, new_pdf_path)

Make sure to replace the placeholders with the actual paths and file names.

Dependencies

This package relies on the following dependencies:

  • pandas
  • jinja2
  • pdfkit
  • PyPDF2

Please make sure to install these dependencies before using the package. You can install them using the following command:

pip install pandas jinja2 pdfkit PyPDF2

Note: The pdfkit library requires an external tool called Wkhtmltopdf. This package will automatically add the path for Wkhtmltopdf still error of Wkhtmltopdf installation, add path to your system's PATH before using this package.

License

This package is licensed under the MIT License.

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

json2pdf-0.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

json2pdf-0.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file json2pdf-0.1.tar.gz.

File metadata

  • Download URL: json2pdf-0.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for json2pdf-0.1.tar.gz
Algorithm Hash digest
SHA256 25509a959370a7f2138beeab808f4c101842caea07800b0984e46b08e13e0410
MD5 0844decdc836bfd22b76d4ba295e2129
BLAKE2b-256 b4e90e0f4eaf85d8c332ece7410492abd6f9bc491e2ceec623fa062c78a221aa

See more details on using hashes here.

File details

Details for the file json2pdf-0.1-py3-none-any.whl.

File metadata

  • Download URL: json2pdf-0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for json2pdf-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 38dbba4ae4ca0291b92e815096c2da2770f7cf0f0ee9f6969b2bc042709de280
MD5 0c98581f1b717183fa4fb72c54534703
BLAKE2b-256 d5d24134f2ba7182ddb7feeae278fdff02397c5b0ff26aa64cc211d4d0acaf70

See more details on using hashes here.

Supported by

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