You are browsing as a guest. Sign up (or log in) to start making projects!

PDF-Toolkit

  • 3 Devlogs
  • 2 Total hours

A small Python CLI tool for working with PDF files.

Open comments for this post

24m 52s logged

PDF Toolkit — DevLog 3

Text Extraction & Final Polish

The PDF Toolkit is starting to feel like a real application now.

After finishing the main PDF operations and the interactive CLI, I focused this time on adding text extraction and improving the overall reliability of the program.

PDF → Text

I added a new PDF → Text operation using PyMuPDF.

The tool goes through the pages of a PDF, extracts the text and saves everything into a .txt file.

This makes it possible to quickly get the text from a PDF without manually copying it page by page.

The extracted text keeps the content from all pages in the document.

CLI Improvements

I also spent some time making the CLI more reliable.

The program now handles common problems such as:

  • Cancelled file selection
  • Missing input files
  • Missing output paths
  • Invalid page numbers
  • Invalid page ranges
  • Errors during PDF operations

Instead of crashing immediately, the CLI can display an error and return to the main menu.

Better User Feedback

The CLI now gives clearer feedback when an operation finishes.

For example:

✓ PDF merged successfully!

If an operation fails, the user gets an error message instead of being left with a Python traceback.

This makes the tool much easier to use, especially for someone who doesn’t know how the code works internally.

Command-Line Options

I also added basic command-line options to make the program easier to use outside of the interactive menu.

The application now supports:

--help

for displaying information about the available commands and options, and:

--version

for displaying the current version of PDF Toolkit.

These are small additions, but they make the project feel much more like a proper command-line application.

Current Features

At this point, PDF Toolkit supports:

  • Merge PDFs
  • PDF → Image
  • Split PDF
  • Extract Pages
  • PDF → Text
  • Interactive CLI
  • --help
  • --version
  • Input validation
  • Error handling
  • Cancel handling

The project is now much more complete than when I started.

Testing

I’ve been testing the different operations both individually and through the CLI.

The main goal is to make sure that the normal workflow works correctly while also handling common user mistakes without crashing the application.

There are still things I want to test more thoroughly before calling the project finished, especially when packaging it for other computers.

What’s Next

The core functionality is now basically finished.

The next step is no longer about adding lots of new features. I want to focus on actually shipping the project.

The next stage will be:

  • Final testing
  • Packaging PDF Toolkit as a Windows .exe
  • Cleaning up the project
  • Final README updates
  • Preparing the first release

Next milestone: v1.0.0 🚀

The goal is to have a version that someone can download and use without needing to manually set up the Python environment.

0
0
23
Open comments for this post

34m 25s logged

PDF Toolkit — Development Log 2

CLI Complete

The first usable version of the PDF Toolkit CLI is now complete.

I created cli.py and connected all of the PDF operations that were already implemented to a single interactive interface.

The CLI is built using Questionary for the terminal menu and Tkinter file dialogs for selecting input and output files.

Available Operations

The CLI currently supports:

  • Merge PDFs
  • PDF → Image
  • Split PDF
  • Extract Pages
  • Exit

Each operation can now be selected directly from the terminal.

File Selection

Instead of requiring users to manually type file paths, the CLI uses Tkinter file dialogs to select files and folders.

For example, when merging PDFs, the user can:

  1. Select multiple PDF files
  2. Choose the output location
  3. Create the merged PDF

The same approach is used for the other operations where appropriate.

PDF → Image

The CLI asks the user for the page number and then allows them to choose where the generated image should be saved.

Split PDF

For splitting PDFs, the user can select:

  • The input PDF
  • The output folder
  • The output filename prefix

This keeps the generated files organized.

Extract Pages

The CLI also supports the page selection syntax implemented in the extraction function.

For example:

1-5

or:

1,3,5-8

The selected pages are then saved into a new PDF.

Current Status

The core PDF operations are now implemented and accessible through the CLI.

The project has moved from individual PDF functions to an actual usable command-line application.

What’s Next

The next step is to improve the CLI experience and make the tool more reliable.

Possible improvements include:

  • Better error handling
  • Input validation
  • Success/error messages
  • Cleaner terminal output
  • More tests
  • Additional PDF operations
  • Packaging the project for easier installation and distribution
0
0
16
Open comments for this post

36m 58s logged

PDF Toolkit — Devlog 1

Current Progress

I’ve started building PDF Toolkit, a small Python command-line utility for working with PDF files.

The goal is to keep it simple and modular, while gradually adding useful PDF operations.

Project Structure

PDF-Toolkit/
├── main.py
├── requirements.txt
├── operations/
│   ├── __init__.py
│   ├── merge.py
│   ├── convert.py
│   ├── split.py
│   └── extract.py
└── tests/
    ├── __init__.py
    └── test_merge.py

The PDF operations are separated into individual modules instead of putting everything into one file.

Implemented Features

Merge PDFs

Added support for combining multiple PDF files into a single PDF.

The merge operation uses PyMuPDF and accepts multiple input files.

PDF → Image

Added support for converting a specific PDF page into an image.

Current options include:

  • Selecting a specific page
  • PNG output
  • JPG output
  • Custom DPI

Split PDF

Added support for splitting a PDF into individual pages.

For example, a multi-page PDF can be split into separate files:

page_1.pdf
page_2.pdf
page_3.pdf
...

Extract Pages

Added support for extracting selected pages into a new PDF.

Pages can be specified individually or as ranges.

Example:

2,5,8-10

This creates a new PDF containing pages 2, 5, 8, 9 and 10.

CLI

The next step is to connect all the existing operations through a simple CLI interface.

The user will be able to start PDF Toolkit and select an operation from a menu:

PDF Toolkit

1. Merge PDFs
2. PDF → Image
3. Split PDF
4. Extract Pages
5. Exit

This will make the current features easier to use without having to call the Python functions manually.

What’s Next

After the CLI is working, I plan to continue expanding the toolkit with more PDF operations.

Planned features:

  • Rotate Pages
  • Delete Pages
  • Reorder Pages
  • Images → PDF
  • PDF information / metadata
  • PDF compression
  • Password protection

For now, the focus is on getting the existing features working properly and making them easy to use through the CLI.

0
0
36

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…