I had ChatGPT build me a free PDF editor because I didn’t trust it to change my files – it worked!


img-9754b

David Gewirtz/ZDNET

Follow ZDNET: Add us as a preferred source on Google.


ZDNET’s key takeaways

  • Yellow sheet music can confuse playback apps.
  • A command-line Python script solved the PDF problem.
  • Sometimes AI is best used to write the tool.

Recently, my wife, Denise, started singing with her church’s choir. She has a lovely singing voice. She needed to practice all the new songs. The songs came in booklets, about the size of a trade paperback, printed on yellow paper. She wanted to scan those booklets into her computer as a PDF, remove the color, and reprint them larger, on 8.5-by-11-inch paper so she wouldn’t have to wear her reading glasses to see them.

So one afternoon she came to me. She asked how she could remove the yellow background, but preserve the music itself, so that she could print it out without wasting a huge amount of color printer ink. If she printed it out in black and white, she’d still be using a lot of ink to print out a gray background, which would be even harder to see.

Also: How to use ChatGPT: A beginner’s guide to mastering OpenAI’s chatbot in 2026

She was also planning to feed the music into PlayScore 2, an app that plays the sheet music so that you can sing along to it. She was concerned the software might not like the background color.

I initially suggested removing the yellow background in Photoshop, but the procedure turned out to be too fiddly. Each image needed slightly different slider settings. It was just too annoying and time consuming to do it that way.

So, I suggested she use ChatGPT. She has a ChatGPT Plus account, so this seemed like a fair option.

Deterministic vs. non-deterministic

I did some tests, using prompts like:

Give me back a PDF I can download where the yellow background has been removed and replaced with white.

You did it correctly, but unfortunately, the text quality is very low resolution. Can you regenerate it in full resolution, please?

These tests worked, but ChatGPT subtly altered the resulting PDFs. My wife was concerned that ChatGPT might change the notes the words or some other aspect of the original music. She didn’t want to sight read and practice it wrong.

ChatGPT and other AIs are “non-deterministic.” Webster’s defines determinism as, “occurrences in nature, or social or psychological phenomena [that] are causally determined by preceding events or natural laws.” In other words, the input always predicts the output.

Also: This easy prompt trick gave me better AI-generated images – no matter the model

Algorithmic programming, unlike AI, is deeply deterministic. Granted, programs can go off the deep end, but they do so in a way that can ultimately be predicted from the exact arrangement of code and variables.

AIs are non-deterministic. This means that you could feed in the exact same input three or four times, and get three or four different results back. It’s kind of like talking to a plumber or an electrician. AIs base their results on a complex series of probability calculations, so the results can change with each pass.

Denise has experienced this in her interactions with ChatGPT. She most definitely didn’t want to give ChatGPT her music and get back something where ChatGPT took liberties with the masters.

She wanted a tool to remove background color that was strictly deterministic.

Python can do that

For my final program in my Harvard Python programming certification, I wrote an interactive image management tool that was able to do individual Photoshop-like image transformations, and batch them together in sequences. So I knew that Python has the libraries to accomplish what Denise wanted.

Also: I stopped using ChatGPT for everything: These AI models beat it at research, coding, and more

I, on the other hand, didn’t have the time to write a Python program to do that. It was a very busy week. I had a long backlog of work-related projects I needed to power though.

But ChatGPT has all the time in the world. This is where things get cool. You can use a non-deterministic tool like ChatGPT to generate a deterministic program, like a Python decoloring tool. If you want to read a really interesting article on AI determinism vs. non-determinism, read this by former ZDNETer Jason Perlow.

In any case, I decided to ask ChatGPT to write a Python script that would do the color removal. To create the script, I gave it this prompt, and then went into the kitchen to help my wife prepare dinner.

Write a python script that takes in a jpeg and sets any pixels that are not gray or black to white, saving it back out as name-decolor.jpg where name is the file name. Allow slightly tinted grays so that black text on a colored background will render properly as black text. Can you do the same thing if a PDF is presented? It also needs to work if the PDF is multiple pages.

By the time dinner was done, so was ChatGPT. The first version of the script had a few issues because I needed to install a Python library. But after that, it just ran.

It works very simply. You execute the program decolor_pdf.py from the command line, feeding it a single PDF file. It outputs a new PDF file with the background color removed.

% python decolor_pdf.py input.pdf

Does it work?

Yeah, it does. If you want to download a copy for yourself, it’s on my GitHub repo. My wife was concerned about me using screenshots in this article from the copyrighted church hymnals, so visited the New York Public Library’s website and grabbed a public domain song to demonstrate.

side-by-side

Image: New York Public Library (and my Python program)

This is a song by jazz great Fats Waller, who also wrote several musicals. It’s a bit of a racy song, using horse racing metaphors to describe changing lovers. It was co-written with Andy Razaf, known for writing the lyrics to songs as “Ain’t Misbehavin'” and “Honeysuckle Rose”.

Helpful lessons

So there are a few helpful takeaways from this experience.

  • If you want the AI’s help, you don’t always need to rely on non-deterministic processing. Sometimes, you can just ask for it to write you a program that works based on a reliable algorithm.
  • You also don’t have to spend a lot of time on creating a look or UI. Sometimes creating a simple command-line tool will get the job done.
  • Don’t be afraid to refine your spec with the AI. Try out what it creates and then ask for tweaks and fixes.
  • Python can do a lot. There are many, many libraries so if you’re not sure what you want to use, build it in Python.

So there you go. If you need a quick solution to something, try asking ChatGPT to write it for you. Worked for me and I was able to give my wife a workable tool and help de-chickelate a rotisserie chicken at the same time.

Also: I tested ChatGPT Images 2.0 vs. Gemini Nano Banana to see which is better – this model wins

Have you ever avoided using AI directly because you were worried it might subtly change the original file? Let us know in the comments below.


You can follow my day-to-day project updates on social media. Be sure to subscribe to my weekly update newsletter, and follow me on Twitter/X at @DavidGewirtz, on Facebook at Facebook.com/DavidGewirtz, on Instagram at Instagram.com/DavidGewirtz, on Bluesky at @DavidGewirtz.com, and on YouTube at YouTube.com/DavidGewirtzTV.





Source link

Leave a Reply

Subscribe to Our Newsletter

Get our latest articles delivered straight to your inbox. No spam, we promise.

Recent Reviews


iPhone 17 Pro Max vs Samsung Galaxy S26 Ultra

Prakhar Khanna and Jason Hiner/ZDNET

Follow ZDNET: Add us as a preferred source on Google.


It’s been several months since Samsung launched its Galaxy S26 series of phones, so now that the dust has settled, I’m reevaluating them against the industry’s best. That starts with the flagship Galaxy S26 Ultra

Between it and the best iPhone available, the iPhone 17 Pro Max, you might be wondering which one is the better investment. The easy answer is, “Stick with whichever OS you have now,” but in all honesty, both phones are good enough to justify a switch. If you’re going to go, go big! It doesn’t get much bigger than these two powerhouses, so let’s dive in and see which one is the winner.

Also: Google Pixel vs. Samsung Galaxy: I’ve tested both brands extensively, and there’s a clear winner

As it happens, I carry the iPhone 17 Pro Max, and also the latest Android phone, and it doesn’t get much more “latest” than the S26 Ultra, so these opinions are based on prior experience with the S25 Ultra, a good amount of hands-on review time with the S26 Ultra, and the specs we have on hand. 


You should buy the iPhone 17 Pro Max if…

iPhone 17 Pro Max in Cosmic Orange

Jason Hiner/ZDNET

1. You (or your family) are in the Apple ecosystem

Platform lock-in is a thing, and Apple has it better than most. Apple provides an entire ecosystem of devices and cross-device functionality that most other OEMs can’t match. It’s not that Samsung doesn’t have an ecosystem of its own, but Apple’s devices are designed from the ground up to work together. They’re on a level of detail that other ecosystems — including Samsung’s — can’t really compete with.

Also: I tested the iPhone Air for a week, and here’s why 17 Pro Max users shouldn’t sleep on it

Then, there’s the 800-pound gorilla in the room. If your family is also in the Apple ecosystem, there’s even more reason to stay there. One of the reasons I carry an iPhone everywhere is that my kids also have iPhones. “Dad, can you ring my phone?” is a common refrain in my house. Add iMessage and parental controls to that, and there are enough roadblocks to make not carrying an iPhone a pretty big headache.

There are software workarounds for just about everything an iPhone can do with other devices, but they’re just that — workarounds. If you want to be embedded in the Apple ecosystem, there is only one phone category you can carry.

2. You want a phone that just works

It’s a cliché, but it exists for a reason. Apple has a long history of being late to the party with a lot of features, but typically, when they get the feature, it’s very polished. Apple doesn’t take half-steps, and it rarely (though not never) treats its users like beta testers. It will take in the landscape, identify a feature that people like, and make it significantly better than the competition.

Also: I’ve tried every iPhone 17 model, and my golden rule for upgrading is changing in 2025

That philosophy extends to apps built for the platform as well. Apple maintains high standards for its App Store and approval process. I routinely encounter the same app on both platforms: it works flawlessly the first time on an iPhone but struggles on an Android phone. There’s a lot that goes into app development, especially on a platform like Android that can have multiple versions and flavors, so there’s no shade. Apple just delivers a better and more consistent experience.

3. You’re a video shooter

There are multiple reasons why the iPhone 17 Pro Max is the phone to use for video. First and foremost, it is storage. Put simply, the iPhone can get up to 2TB of onboard storage; the S26 Ultra maxes out at 1TB. A terabyte of storage seems like a lot — and it is, but if you’re shooting a ton of 8K or even 4K video, that’s going to chew up your storage in a hurry. This is also a solid argument if you’re a hardcore gamer, as they take up a lot of space these days.

Also: I’ve got one big reason to recommend a year-over-year upgrade to Apple’s iPhone 17 Pro Max

The iPhone also offers a really great video experience. From shooting in dedicated ProRes Raw mode to open gate shooting, if you’re a filmmaker, you want options, and the iPhone gives you a ton. There are also numerous apps in the App Store that you can use to capture, enhance, and edit your videos. 

Sure, there are apps in the Play Store for Android, but this combination of tools built for filmmakers makes the iPhone 17 Pro Max the phone to get for video enthusiasts.

You should buy the Samsung Galaxy S26 Ultra if…

Prakhar Khanna holding the Samsung Galaxy S26 Ultra.

Prakhar Khanna/ZDNET

1. You want the raw power

As recently as two years ago, this heading would have belonged under the iPhone category. But after Qualcomm rolled out the Snapdragon 8 Elite processor for the Galaxy, things changed. Of course, we’re talking about raw numbers here — user experience and vertical integration go a long way on Apple’s side, but Qualcomm’s processors have started to outperform Apple’s on benchmarking apps, and that’s a big deal.

Also: Samsung Galaxy S26 Ultra vs. Galaxy S25 Ultra: I’ve tried both flagships, and here’s my choice

Processing power is important in the realm of video processing/editing, gaming, and AI. If those are important categories for you, Samsung is the best game in town. The iPhone is a powerful machine, make no mistake, but the Samsung Galaxy S26 Ultra is currently the most powerful phone you can buy at the moment. 

2. You’re all-in on AI 

Samsung Galaxy S26

Prakhar Khanna/ZDNET

Unfortunately, Apple Intelligence has seen a few false starts now. Meanwhile, Samsung and Google keep rolling out AI-powered features one after another. This generation of Samsung phones is no exception, with Galaxy AI taking most of the headlines from this lineup of S26 smartphones. From editing images to the new Now Nudge feature, AI is all over this software release.

One particularly intriguing new feature is Gemini’s ability to summon an Uber with a command. Just tell Gemini where you want to go, and it’ll launch Uber, input the destination, and once you confirm, it’ll summon the car. This is the first of potentially numerous apps and services that can be further automated with AI. 

3. You value your privacy

Apple has always prided itself as a privacy-first company, and that’s fair enough. But Samsung is upping the ante with Privacy Screen, a hardware/software combination that could potentially change how people think about their phones and privacy. Samsung redesigned its screen to feature wide and narrow-angle pixels that the company can, through software, turn off individually to obscure the screen.

Also: Samsung Galaxy S26 Ultra vs. S24 Ultra: I compared both models, here’s who should upgrade

It doesn’t just block looky-loos in the airplane seat next to you from reading your texts, but because it’s software-driven, you can selectively block specific elements on your screen. So your whole screen is bright and beautiful, but a notification rolls in and only blocks the area where it appears. 

Writer’s choice

Both of these phones are downright fantastic — there’s no question. But at the end of the day, if I had to pick, I’d go with the Samsung Galaxy S26 Ultra. I have a dual-wielding phone lifestyle, but while I value the iPhone 17 Pro Max for its consistency and its comfort, Samsung and Android in general have a wider variety of fun form factors to play with, and that includes a multitude of accessories that you can buy into.

Apple works great within its ecosystem, and it’s just OK with everyone else. Android works very well with just about everything from Windows PCs to a wide variety of smartwatches and Bluetooth accessories. For everything an iPhone can connect to, an Android phone can connect to more. Plus, I didn’t even talk about the stylus here, because while I’m not a huge stylus person, I’m definitely a believer in the “it’s better to have it and not need it” philosophy.

Of course, as I mentioned before, I carry both. But I’m ultimately on Team Android, where I feel there’s more freedom. 

Specifications

iPhone 17 Pro Max

Samsung Galaxy S26

Display

6.9 AMOLED with 120Hz, 3000 nits peak

6.9″ QHD AMOLED 120Hz, TBD nits peak

Weight

233g

214g

Processor

Apple A19 Pro

Qualcomm Snapdragon 8 Elite Gen 5 for Galaxy

Storage

256GB, 512GB, 1TB, 2TB

256GB, 512GB, 1TB

Battery

5,088mAh, 25W wired charging and 25W wireless charging

5,000mAh, 60W wired charging and 25W wireless charging

Camera

48MP wide / 48MP Ultra Wide / 48MP telephoto (4xx) / 18MP front

200MP wide / 50MP telephoto (5x) / 10MP telephoto (3x) / 50 MP ultrawide / 12MP front

Price

Starting at $1,199

Starting at $1,299





Source link