DEV Community

Cover image for PDFme, the offline PDF toolkit I built after my college fest nearly broke me
Parnita Singh
Parnita Singh

Posted on

PDFme, the offline PDF toolkit I built after my college fest nearly broke me

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission 🦥

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

PDFme is a local, offline PDF toolkit for large print designs. It can:

  • compress a huge PDF down to a size you can actually share
  • remove image backgrounds with an open-source AI model (ISNet, through rembg, with other models to pick from)
  • label pages with Gemma, a local open-weight model run through Ollama
  • merge and split PDFs by size or by page range Everything runs on your own computer. Your files are never uploaded, and there is no account, no cloud service and no internet needed after the one-time downloads (details in the serious part at the bottom).

Now, it sounds cool. When I needed it, it was nowhere near cool.

Backstory

I was half dead, one step away from zombie. That is what a university cultural fest does to you: endless banners, posters and artifacts, each one due to a vendor at a specific time, in a specific size, in a specific file type, with background or without background.

Send a Drive link? Not enough. Email? 25 MB limit. WhatsApp? 2 GB limit, so my merged PDF could not go in one piece. I had to sort through everything, pick the right files, and send each one carefully, one by one.

All of that went blaaaaaaaast in my head at once. I did not give up, because I knew what I had to fix. The fest ended on the 23rd, I started PDFme on the 24th, and as I write this on the 25th, I feel better. Now whenever I see someone struggling with a PDF, I get my cool moment: "check out PDFme." It works, and I will tell you exactly where it doesn't, in the serious part below.

Demo

https://drive.google.com/file/d/1llPMxIo_e7WeAXF99xMnBpahq783xIrf/view?usp=sharing

File Before After What it did
Fest standee, BIBB 3x6 515.9 MB 39.0 MB Print copy
Fest standee, BIBB 3x6 515.9 MB 284.9 MB Fit to size at 300 dpi

Code

https://github.com/parnita-Singh/PDFme-week3

How I Built It

I used Cursor. I started with Grok 4.6 (medium), and when it hit its monthly limit, I took a pause, screamed and switched to Claude Haiku 5.5.

The open pieces:

  • Gemma through Ollama, for page labels
  • Background removal with rembg, using the ISNet model by default
  • PDF libraries: pikepdf and pypdf for reading and writing PDFs, Pillow for images, pypdfium2 for rendering pages, and Gradio for the web page

Along the way I learned things I did not know before: how an image has layers, what an SMask is, and how DPI affects image quality.

Why Does Open Innovation Matter?

You can always argue, "just give it to GPT." My counter question: would you trust your Aadhaar card, passbook and cheque book details to a cloud chatbot?

That is where PDFme enters, ladies and gentlemen. yeahhhhaaa!

Because the models run on your own machine:

  • your private files never leave your computer
  • it works without internet once the models are downloaded
  • it costs nothing to run
  • you can pick a different background model from a list, and set a different Gemma model name

I know I'm writing like a crazy person, but this post is 100% human written.

This was also the first time I built something outside the rat race of having a project on my resume or GitHub. I built it for a problem I actually hit, and I would bet other people hit it too. It is 2026, we have AI that writes code, and people still lose hours to PDFs. I solved it, and I love it.

It is cool. I will give you a minute. Admit it 😎

Now the serious part

What I tested: 15 real fest PDFs, each 510 to 700 MB. I verified background removal, splitting, merging and compressing on all of them.

Limits:

  • Tested on files of 510 to 700 MB.
  • "Fit to size" uses a 2000 MB default, the same as WhatsApp's 2 GB document limit. It steps the resolution down from 300 dpi to 100 dpi, and writes no file if nothing reaches the limit.
  • Background removal changes only the images you choose. A photo covering 90% or more of the page is skipped by default. You can raise that limit, or tick the image you want to process.
  • Images that already have transparency, and vector art, are left alone.
  • Gemma page labels need Ollama and a one-time model download. I haven't checked them on the banner yet.
  • I switched off Wi-Fi and ran the print copy and page-range split with no internet connection. The background model needs a one-time download first, so it must be on the computer before you go offline.

Do not forget to star the repo ⭐, because you are gonna love PDFme.
heeehheee

Top comments (6)

✨ อัปเดตล่าสุด: parnita singh /pdfme the offline pdf toolkit i built after my college fest nearly broke me n - สรุปดราม่าล่าสุด
 
pristine_saught_f0381642a profile image
Pristine Saught •

I idea is really cool, but how you use gemma without internet ?

✨ อัปเดตล่าสุด: parnita singh /pdfme the offline pdf toolkit i built after my college fest nearly broke me n - สรุปดราม่าล่าสุด
 
parnita_singh_73778510977 profile image
Parnita Singh •

Hi Pristine, Ollama downloads the Gemma model once. After that, the labelling runs on your own machine, with no server involved, so it works with Wi-Fi off. The only time PDFme needs internet is the one-time download. I hope that answers your question

✨ อัปเดตล่าสุด: parnita singh /pdfme the offline pdf toolkit i built after my college fest nearly broke me n - สรุปดราม่าล่าสุด
 
priyanshi_7e961b3078add56 profile image
PRIYANSHI •

It's really good, good job keep it up 👏🏻👍🏻

✨ อัปเดตล่าสุด: parnita singh /pdfme the offline pdf toolkit i built after my college fest nearly broke me n - สรุปดราม่าล่าสุด
 
robertpaschal profile image
Odinaka Robert Nnamani •

offline-first for a fest tool. the venue wifi failing is the whole test.

✨ อัปเดตล่าสุด: parnita singh /pdfme the offline pdf toolkit i built after my college fest nearly broke me n - สรุปดราม่าล่าสุด
 
parnita_singh_73778510977 profile image
Parnita Singh •

Exactly why I built it. A fest venue is the worst place to depend on a connection, so the offline part was the test I cared about most. Have you had a fest where the wifi gave up?

✨ อัปเดตล่าสุด: parnita singh /pdfme the offline pdf toolkit i built after my college fest nearly broke me n - สรุปดราม่าล่าสุด
 
robertpaschal profile image
Odinaka Robert Nnamani •

venue wifi failing is the test, not the edge case.