Code Monkey home page Code Monkey logo

nphausg / pixelx Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.59 MB

๐Ÿ“ฆ The Image to PDF Converter is a simple Python application that allows users to convert multiple images into a single PDF file. It provides a graphical user interface (GUI) built using the Tkinter library, making it easy for users to selec

Home Page: https://levelup.gitconnected.com/python-converting-multiple-images-to-pdf-made-easy-with-python-344441862ffc

License: Apache License 2.0

Python 97.33% Shell 2.67%
gui image pdf pil python reportlab

pixelx's Introduction

Images to PDF Converter

-----------------------------------------------------

๐Ÿ‘‰ Overview

The Image to PDF Converter is a simple Python application that allows users to convert multiple images into a single PDF file. It provides a graphical user interface (GUI) built using the Tkinter library, making it easy for users to select a folder containing images and generate a PDF document from them. The application supports various image formats such as JPG, JPEG, PNG, GIF, and BMP. Additionally, it maintains the aspect ratio of the images within the PDF file to ensure accurate representation.

๐Ÿš€ Key Features:

  • Select Folder: Users can select a folder containing images using a file dialog.

  • Convert Images: The application converts all images in the selected folder into a single PDF document.

  • Maintain Aspect Ratio: Images maintain their aspect ratio within the PDF file to preserve their original appearance.

  • Display Status: The GUI displays status messages to inform users about the conversion process and the location of the generated PDF file.

  • Calculate Total Files Size: Optionally, the application calculates and displays the total size of all files in the selected folder before converting them to PDF.

๐Ÿš€ How to use

Cloning the repository into a local directory and checkout the desired branch:

git clone [email protected]:nphausg/images2pdf.git
git checkout master
source .venv/bin/activate
.venv/bin/python images2pdf.py
  1. Run the Python script image_to_pdf_converter.py.
  2. Click the "Select Folder" button to choose a folder containing images. Once a folder is selected, the application converts the images into a PDF file and displays the status message. Optionally, users can view the total size of all files in the selected folder before conversion.

๐Ÿš€ How to distribute

Dependencies

  • Python 3.x
  • Tkinter
  • reportlab
  • Pillow

Distribution

  • Step 1: Install PyInstaller, If you haven't already installed PyInstaller, you can do so using pip: pip install pyinstaller

  • Step 2: Prepare Your Python Script. Make sure your Python script (image_to_pdf_converter.py) is ready for distribution. Ensure it includes all necessary dependencies and functionality.

  • Step 3: Run PyInstaller, Navigate to the directory containing your Python script in the command line and run PyInstaller with your script as an argument:

    pyinstaller image_to_pdf_converter.py
  • Step 4: Test the Executable. Navigate to the dist directory and run the generated executable to test it:

    • On Windows: Run image_to_pdf_converter.exe
    • On macOS: Run image_to_pdf_converter
    • On Linux: Run ./image_to_pdf_converter

    Make sure the executable behaves as expected and includes all required functionalities.

  • Step 5: Distribute Your Executable

    You can distribute your executable by sharing the generated file (image_to_pdf_converter.exe on Windows, image_to_pdf_converter on macOS and Linux). Users can run it directly without needing Python or any additional dependencies installed.

๐Ÿฒ Screenshots

Images to PDF

PixelX

โœจ Contributing

Contributions to this project are welcome. Feel free to submit issues, suggest improvements, or create pull requests.

โœจ Acknowledgments:

Special thanks to the developers of the Tkinter, reportlab, and Pillow libraries for providing the tools necessary to build this application.

๐Ÿ‘€ Author

pixelx's People

Contributors

nphausg avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.