Convert your Excel invoices into Pdf invoices.
Project description
Invoicing-Python-Package
excel-invoice-to-pdf
Overview
excel-invoice-to-pdf
is a Python package that allows users to easily convert Excel invoices into PDF format. This package supports the processing of multiple Excel files stored in a directory, converting them into PDFs with the same filenames as the original Excel files. The PDF invoices include a company logo and display the total price of the products in a neatly formatted table.
This package is available on PyPI, and you can install it using:
pip install excel-invoice-to-pdf
Features
- Converts multiple Excel invoices into PDFs.
- Preserves the exact names of the original Excel files in the generated PDFs.
- Includes a company logo on each invoice.
- Displays essential details like invoice number, date, and total price in the PDF.
- Automatically creates the destination directory for PDF files if it does not exist.
- Licensed under the MIT License.
Installation
To install the package, simply run:
pip install excel-invoice-to-pdf
Usage
After installing the package, you can import and use it in your Python project as follows:
import invoicing
# or
from invoicing import invoice
Example Usage
The invoice
module contains a generate
function that converts Excel invoices into PDF files. Here is how you can use it:
from invoicing import invoice
invoice.generate(
invoices_path="path_to_excel_invoices_folder",
pdfs_path="path_to_output_pdfs_folder",
logo_image_path="path_to_company_logo_image",
product_id_col="Product ID",
product_name_col="Product Name",
amount_purchased_col="Amount Purchased",
price_per_unit_col="Price per Unit",
total_price_col="Total Price"
)
Parameters
invoices_path
: The directory where Excel invoice files are stored.pdfs_path
: The directory where the generated PDF invoices will be stored.logo_image_path
: The path to the company logo image file to be included in the PDFs.product_id_col
: The column name in the Excel files containing the product IDs.product_name_col
: The column name in the Excel files containing the product names.amount_purchased_col
: The column name in the Excel files containing the quantities of purchased products.price_per_unit_col
: The column name in the Excel files containing the price per unit.total_price_col
: The column name in the Excel files containing the total price of products.
The function will process all Excel files in the specified invoices_path, generate PDFs with the same names as the Excel files, and save them in the pdfs_path folder. If the pdfs_path directory does not exist, it will be created automatically.
License
This package is open-source and available under the MIT License.
Contribute
Developers are welcome to contribute, suggest new features, or report issues.
To contribute:
- Fork the repository.
- Create a new branch with your feature or fix.
- Submit a pull request for review.
You can check out the source code and additional documentation on PyPI:
excel-invoice-to-pdf on Github
Feel free to contribute and help improve the package!
Enjoy using excel-invoice-to-pdf
!
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
File details
Details for the file excel-invoice-to-pdf-1.0.2.tar.gz
.
File metadata
- Download URL: excel-invoice-to-pdf-1.0.2.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bccd9f90ffcd07ceccb0c0c0e5e26ee8cf47df3278d71e0ae91a68d39ac62ef7 |
|
MD5 | 1ab973c0158c75bfe0252b1d597cf850 |
|
BLAKE2b-256 | ef7e5db3757f04bac90b5728a998efed83d20cafc6e6008a29928e70636d29d5 |