Skip to content

H3xano/bulk_docx2pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bulk DOCX to PDF Converter

A lightweight, user-friendly desktop application for converting Microsoft Word (.docx) files to Portable Document Format (.pdf) files. It supports single or multiple file conversions, preserves original filenames, and provides progress tracking.

Screenshot 1: Main Application Window

Features

  • DOCX to PDF Conversion: Core functionality to convert .docx files.
  • Batch Processing: Convert multiple files at once.
  • Drag & Drop: Easily add files by dragging them onto the application.
  • File Selection Dialog: Standard file browser to select files.
  • Clear Selection: Quickly clear the list of selected files.
  • Custom Output Directory: Choose a specific folder for saving PDF files, or default to the source file's directory.
  • Progress Bar: Visual feedback on the overall conversion progress.
  • Detailed Log: See the status of each file conversion and any errors encountered.
  • Preserves Filenames: Output PDF files will have the same base name as their original DOCX files (e.g., document.docx -> document.pdf).
  • Overwrite Handling: Automatically renames output files (e.g., document (1).pdf) if a PDF with the same name already exists in the output location.
  • Lightweight GUI: Built with Python's native Tkinter library for minimal overhead.

Prerequisites (for Users of the .EXE)

  • Operating System: Windows (tested on Windows 10/11).
  • Microsoft Word OR LibreOffice: This application utilizes docx2pdf, which in turn relies on either Microsoft Word (via COM automation) or LibreOffice being installed on your system to perform the conversion.
    • If Word is installed, it will typically be used by default on Windows.
    • If Word is not installed, ensure LibreOffice is installed and its soffice command is accessible in your system's PATH.

Installation and Usage (Using the .EXE)

  1. Download: Go to the Releases page and download the latest BulkDocxToPdf-vX.X.X.exe file.
  2. Run: Double-click the downloaded .exe file. No installation is required.
  3. Select Files:
    • Click the "Select DOCX Files" button to browse and choose your .docx files.
    • Or, drag and drop .docx files directly onto the "Selected Files" area or the listbox.
  4. (Optional) Choose Output Folder:
    • Click "Browse..." next to the "Output Folder" field to select a custom directory for your PDFs.
    • If left blank, PDFs will be saved in the same folder as their original .docx files.
  5. Convert: Click the "Convert to PDF" button.
  6. Monitor Progress: Observe the progress bar and the log area for updates.
  7. Find PDFs: Once completed, your PDF files will be in the specified output location.

Screenshot 2: Conversion in Progress

For Developers / Running from Source

Prerequisites

  • Python 3.7+
  • pip (Python package installer)
  • Git (for cloning the repository)
  • Microsoft Word or LibreOffice installed (as per user prerequisites).

Setup

  1. Clone the repository:

    git clone https://github.com/H3xano/bulk_docx2pdf.git
    cd YOUR_REPOSITORY_NAME
  2. Create and activate a virtual environment (recommended):

    python -m venv venv
    # On Windows
    venv\Scripts\activate
    # On macOS/Linux
    source venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt

Running the Application

python main.py

Building the Executable (Manually)

If you want to build the executable yourself:

  1. Ensure PyInstaller is installed:

    pip install pyinstaller
  2. Create an assets folder (optional, for icon):

    • Place an icon file (e.g., icon.ico) in an assets subfolder if you want to include it.
  3. Run PyInstaller: From the project root directory:

    pyinstaller --name DocxToPdfConverter --onefile --windowed --icon=assets/icon.ico main.py
    • --onefile: Creates a single executable file.
    • --windowed (or -w): Prevents the console window from appearing.
    • --icon=assets/icon.ico: (Optional) Specifies an icon for the executable. Adjust path if needed or remove if no icon.
    • If you encounter issues with tkinterdnd2 not being found in the packaged app, you might need to explicitly include its Tcl/Tk parts. This often involves finding the tkdnd directory within your tkinterdnd2 site-package and using PyInstaller's --add-data flag. For example: --add-data "path/to/venv/Lib/site-packages/tkinterdnd2/tkdnd:tkinterdnd2/tkdnd" (The exact path will vary based on your Python installation and virtual environment.)

    The executable will be found in the dist folder.

Contributing

Contributions are welcome! If you have suggestions or find bugs, please open an issue or submit a pull request.

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages