Toolvix
Toolvix is a Python library for simple file, PDF, PowerPoint, Word, and image automation. Most functions automatically discover matching files in the current working folder, so users do not need to pass input filenames.
Installation
pip install toolvix
For PowerPoint/Word to PDF conversion on Windows, Microsoft PowerPoint and Microsoft Word must be installed, and install the Windows extra:
pip install "toolvix[windows]"
Quick start
from toolvix import *
pdfMerge("final.pdf")
pdfExtract([1, 2], "extract.pdf")
pdfProtect("protected.pdf", "12345")
imageTopdf("photos.pdf")
imageResize(1920, 1080)
imageWatermark("PREETAM")
imageCompressor(1)
fileEncrypt()
fileDecrypt()
API
| # | Library | Package | Module | Function | Parameters | Dynamic Input | Output | Example |
|---|---|---|---|---|---|---|---|---|
| 1 | toolvix |
filetools |
encrypt.py |
fileEncrypt() |
None | All non-.encrypted files |
Encrypted .encrypted files |
fileEncrypt() |
| 2 | toolvix |
filetools |
decrypt.py |
fileDecrypt() |
None | All .encrypted files |
Decrypted original files | fileDecrypt() |
| 3 | toolvix |
pdftools |
merge.py |
pdfMerge() |
output_file |
All PDFs | One merged PDF | pdfMerge("final.pdf") |
| 4 | toolvix |
pdftools |
extract.py |
pdfExtract() |
pages, output_file |
First PDF | Extracted PDF | pdfExtract([1, 2], "extract.pdf") |
| 5 | toolvix |
pdftools |
protect.py |
pdfProtect() |
output_file, password |
First PDF | Protected PDF | pdfProtect("protected.pdf", "12345") |
| 6 | toolvix |
pdftools |
pdftoword.py |
pdfToword() |
output_file (optional) |
All PDFs | Word file(s) | pdfToword() |
| 7 | toolvix |
pdftools |
pdftoppt.py |
pdfToppt() |
output_file (optional) |
All PDFs | PowerPoint file(s) | pdfToppt() |
| 8 | toolvix |
pdftools |
ppttopdf.py |
pptTopdf() |
output_file (optional) |
All PPTX files | PDF file(s) | pptTopdf() |
| 9 | toolvix |
pdftools |
wordtopdf.py |
wordTopdf() |
output_file (optional) |
All DOCX files | PDF file(s) | wordTopdf() |
| 10 | toolvix |
imagetools |
imgtopdf.py |
imageTopdf() |
output_file |
All supported images | One PDF | imageTopdf("photos.pdf") |
| 11 | toolvix |
imagetools |
imgresize.py |
imageResize() |
width, height |
All supported images | Resized image(s) | imageResize(1920, 1080) |
| 12 | toolvix |
imagetools |
imgwatermark.py |
imageWatermark() |
watermarkText, textSize, transparency, angle |
All supported images | Watermarked image(s) | imageWatermark("PREETAM") |
| 13 | toolvix |
imagetools |
imgcompress.py |
imageCompressor() |
targetSizeMB |
All supported images | Compressed JPG(s) | imageCompressor(1) |
| 14 | toolvix |
imagetools |
pdftoimg.py |
pdfToimage() |
None | All PDFs | Page image(s) | pdfToimage() |
Parameters
PDF tools
pdfMerge(output_file="Merged.pdf"): merges every PDF in the current folder in sorted filename order.pdfExtract(pages, output_file="extracted.pdf"): extracts selected 1-based page numbers from the first PDF.pdfProtect(output_file="protected.pdf", password="12345"): password-protects the first PDF.pdfToword(output_file=None): converts every PDF to DOCX. With one input PDF,output_filecan set its output name.pdfToppt(output_file=None): converts every PDF to PPTX. With one input PDF,output_filecan set its output name.pptTopdf(output_file=None): converts every PPTX to PDF. With one input PPTX,output_filecan set its output name. Windows + Microsoft PowerPoint required.wordTopdf(output_file=None): converts every DOCX to PDF. With one input DOCX,output_filecan set its output name. Windows + Microsoft Word required.
Image tools
imageTopdf(output_file="photos.pdf"): combines all supported images into one PDF.imageResize(width=1920, height=1080): resizes all supported images without cropping; aspect ratio is preserved.imageWatermark(watermarkText="PREETAM", textSize=100, transparency=45, angle=25): adds centered watermark text.transparency=0is invisible and255is fully opaque.imageCompressor(targetSizeMB=1): compresses all supported images to JPG, targeting approximately the requested size in MB.pdfToimage(): converts every PDF page to a PNG image.
File tools
fileEncrypt(): asks once for a password and encrypts every non-.encryptedfile in the current folder.fileDecrypt(): asks once for a password and decrypts every.encryptedfile. Successfully decrypted files replace their.encryptedversions with the original filenames.
Output folders
Toolvix keeps generated files in separate folders such as merged pdf, converted word files, resized images, and compressed images.
Notes
- Input files are discovered from
Path.cwd(). Run your script from the folder containing the files you want Toolvix to process. - Do not store passwords or sensitive files in the working folder when using
fileEncrypt().
Release files for toolvix 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| toolvix-0.1.0.tar.gz | 9.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| toolvix-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.7 kB
Release files / toolvix-0.1.0.tar.gz
| Download URL | toolvix-0.1.0.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2f99223169138d72f0b28d322533618917c0498c96272048a09f56f9d9a81bd
|
|
BLAKE2b-256 checksum How to use checksums |
c96d696296fcfa6bc3d9672c05877a3e444441e2f18faad2782768a798bcdae5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / toolvix-0.1.0-py3-none-any.whl
| Download URL | toolvix-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2982527d67c0ba5d0944189daffd55ca84ad6b3d95a5b3bbd514640866c85949
|
|
BLAKE2b-256 checksum How to use checksums |
2dd86f4ac9b544540547910cb70085684d6b97e192ecc6ba53d1473e8ea1dd86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|