Reducing PDF File Size

I seem to get into this more often than I need to. I was preparing a report this weekend that grew to ~500 pages and 80 MB in size. I wanted to transmit the report as a .pdf via email. Using services like OneDrive work, but they are annoying when they require an external user to verify who they are. I also tried reducing the file size with a few other options, including:

  1. PDFCompress, an old app on my Mac
  2. Preview, using it’s Export option
  3. Others I’m forgetting to list here

None of the options above produced a small enough .pdf file or at least not one that was less than 50 MB. Finally I turned to Ghostscript, but first I had to install and configure it:

1. Open Terminal.app and enter: brew install ghostscript
2. After Ghostscript installs, use Terminal to navigate to the folder containing your .pdf, in my case: ls ~Desktop
3. Insert this command into Terminal, replacing input.pdf and output.pdf with the file names you prefer:

gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile="output.pdf" "input.pdf"

The above-command produced a file about 38 MB and I was able to get it down to 36 MB using the following command:

gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dEmbedAllFonts=true -dSubsetFonts=true -dColorImageDownsampleType=/Bicubic -dColorImageResolution=144 -dGrayImageDownsampleType=/Bicubic -dGrayImageResolution=144 -dMonoImageDownsampleType=/Bicubic -dMonoImageResolution=144 -sOutputFile="output.pdf" "input.pdf"

I found these references helpful in developing this approach:
https://gist.github.com/ahmed-musallam/27de7d7c5ac68ecbd1ed65b6b48416f9
https://www.cisdem.com/resource/shrink-pdf-file-size-on-mac.html

Dyson DC17 Absolute Animal Repair

Our above-referenced vacuum wasn’t producing as much vacuum and we found that its filter was clogging faster. I figured portions of its cyclone, where air moves upward its path to ultimately reach the motor’s impellers and debris falls downward to the collection canister, had become blocked. While taking apart the cyclone, I published my journey here:

https://www.ifixit.com/Guide/Dyson+DC17+Cyclone+Cleaning/168779

After reassembling the cyclone and putting it back in the DC17 the vacuum cleaner is running like its brand-new again.

Node Upgrade with Brew

One of the Homebridge plugins was whining about “node” being out of date. Sure enough, when running this with Terminal:

node –version

Showed my Mac mini was running “v16….” and it needed to be upgraded to 20. Easy enough with brew:

brew install node@20
brew unlink node@16
brew link node@20 –force –overwrite
nano ~/.zshrc

In nano I edited the following line from:

export PATH=”/usr/local/opt/node@16/bin:$PATH”

to

export PATH=”/usr/local/opt/node@20/bin:$PATH”

Exit and save with:

Control (key) and X
Yes

Next I closed the Terminal window, opened a new Terminal window, and typed in:

node -v

Which now proudly says:

v20.9.0

Yes!

Apple Watch Series 4 Repairs

In February, I swapped the Taptic Engine and then moved the NFC chip from Tina’s old (broken) Apple Watch Series 4 display to a new display. The NFC transfer had me on edge, but Circuit Trama’s instructions and technique were fabulous. One improvement to Circuit Trama’s approach, like this video I placed droplets of alcohol on a razor blade and gradually slid it in, no heat, and it worked so much better and it was much faster. I’ve got some pics I can post later.

Prior to these improvements, the watch entered a recovery mode and I figured I’d make the improvements before restoring it, since it was mostly broken anyway. After the hardware improvements the watch refused to restore, instead erupting with a “Failed to setup Apple Watch” alert. There are several options to get past this:

Option 1: Access the hidden lightning port where the watch band slides in and complete a wired restore. Unfortunately, the adapter fetches $100 or more plus more time, bleh.

Option 2 (failed approach): the trade-in value for the Series 4 is $60 and mine appeared to meet all the requirements, so I decided to take Apple up on the offer and FedEx took it off my hands. I replaced it with an Apple Watch Series 8 in Product Red that was heavily discounted by Amazon Prime Days. I looked at iFixit’s battery replacement guide and it appears battery replacements will be easier in the future and I should have all the tools to do it. Let’s hope the first battery lasts at least 3 years. Unfortunately, several days later, Apple returned the Series 4 to me, because they said they couldn’t restore it! What a joke. They obviously didn’t try Option 3, below.

Option 3 (worked for me): I wished I had learned of this before trying Option 1 and 2. During a hard restore, I put my iPhone on the older 802.11b network in our house and then the Apple Watch Series 4 properly restored! I didn’t record all the steps I used to implement this, as I’m writing this a couple months later, but it ultimately worked and my daughter is now rocking the Apple Watch Series 4.

The only side effect of my NFC transfer, was that I used a bit too much heat during the soldering process and now the side of the screen no longer responds to touch. The portion that doesn’t work isn’t required for most interface tasks and my daughter doesn’t mind – we also enabled Assistive Touch, so she can always get past interface hitches if the screen doesn’t respond to touches. If I have extra time on my hands, I may replace the layers between the screen and the glass to correct this unresponsive touch issue, but for now I’m moving on.

I also still have a bag of parts for one more Apple Watch 4. It needs a new battery connector soldered to the board, a new screen, and its NFC soldered to a new screen. If used parts dip low enough, I may give it a whirl or dump the parts on eBay while they still have value to others.

Ventura and FAT16

My daughter likes her old digital camera, yet Ventura’s Disk Utility doesn’t seem to show FAT16 as a default partitioning format. Never fear, others have already encountered this. First, I verified that the Compact Flash card’s location using this command:

diskutil list

This showed me it was sitting at /dev/disk2. Next, I executed this command to create a single 1 GB partition on the memory card and while leaving the remaining disk capacity as free space:

diskutil partitionDisk /dev/disk2 MBR “MS-DOS FAT16” NONAME 1024M free “” 0B

Finally I executed this command to create 15 2 GB partitions on the memory card while leaving the remaining disk capacity as free space:

diskutil partitionDisk /dev/disk2 MBR “MS-DOS FAT16” NONAME 2048M “MS-DOS FAT16” NONAME2 2048M “MS-DOS FAT16” NONAME3 2048M “MS-DOS FAT16” NONAME4 2048M “MS-DOS FAT16” NONAME5 2048M “MS-DOS FAT16” NONAME6 2048M “MS-DOS FAT16” NONAME7 2048M “MS-DOS FAT16” NONAME8 2048M “MS-DOS FAT16” NONAME9 2048M “MS-DOS FAT16” NONAME10 2048M “MS-DOS FAT16” NONAME11 2048M “MS-DOS FAT16” NONAME12 2048M “MS-DOS FAT16” NONAME13 2048M “MS-DOS FAT16” NONAME14 2048M “MS-DOS FAT16” NONAME15 2048M free “” 0B

All these disk partitions mounted without a hitch on my Mac, but the Kodak EasyShare M530 refused to see any of them. Boo hiss. I must have done something wrong with the formatting type. For now, I’m sending her to Denmark, Sweden and France with a Lightning to USB-B and mini USB-A to micro-USB so that she can use her phone to import all of her photos. I tested it with my XS Max and it works great – she’s going to love it, especially since her 13 Pro has 512 GB of storage.

Along the way, I found this source helpful.

Homemade Sealant Recipe

For a simple, easy-to-make, and mostly homemade bike tire sealant I’ve resorted to the following recipe where the parts are mixed by mass:

3 parts Splash Original Blue windshield washer fluid (-20 degree F formula)
1 part FX Latex, Molding Liquid Latex, HV-65 (UPC 811832013546, 16-ounce bottle)

Splash’s Safety Data Sheet notes the windshield washer fluid is mostly water followed by methanol (to reduce freeze point), denatonium benzoate (a bittering agent), and patent Blue Dye L85000 (for coloring). The SDS also notes that the product’s methanol content is 30-32% by weight, which may be important should Splash ever stop manufacturing this product and we need a replacement.

It’s frustrating when people don’t post updates or additional details on how their homemade sealant works or how much it costs. I plan to report back here with updates on its performance as I use it. I mixed up a batch last week and plan to pour it into my Big Dummy’s Surly Extraterrestrial tubeless tires before RAGBRAI L. Ride on!

On cost I was curious if this recipe is any cheaper, per ounce, than name-brand sealant. This spreadsheet shows average per ounce costs at a local bike shop for 8-ounce and 16-ounce bottles of Orange Sealant. Based on those costs, the homemade recipe costs half the price of Orange Sealant’s 8-ounce bottle and it is about 30% less than their 16-ounce bottle.

** UPDATE 3-12-2024 **
I made 4 bottles of sealant and already used all of it up plus an 8-ounce bottle of Orange Sealant that I had to buy. I made a few tire replacements and helped others. I’m glad I have this recipe, I’m going to make another 4 bottles tonight or until I run out of time. After making the sealant, I poured about 3 ounces into my rear Surly Extraterrestrial tire.

** UPDATE 3-14-2024 **
Sealant in the rear Extraterrestrial is working great. The tire had been slowly going flat over three days before I added sealant on 3-12. After 3-12, the tire is holding pressure just fine again.

** UPDATE 3-15-2024 **
I think a contributing reason the recipe above is so successful is because of the ingredients, specifically the ammonia-free liquid latex. How do I know it’s ammonia free? Safety first is my motto. I contacted the manufacturer, Liquid Latex Fashions, to request a Safety Data Sheet and their brilliant customer service promptly provided one to me. Thanks, Liquid Latex Fashions!

Restore Safari Tabs and Windows

I posted about this earlier and had it happen again: I foolishly had 4 Safari windows with a zillion tabs open, updated macOS Ventura to 13.4.1 and Safari 16.5.1, patched with Opencore Legacy Patcher, and when I reopened Safari I noticed all my windows and tabs were gone. No sweat I had a Time Machine backup.

1. Click on your desktop, press Command Shift G, and paste this file path:

~/Library/Containers/com.apple.Safari/Data/Library/Safari

2. Go up to the Time Machine icon in the menu bar and choose “Browse Time Machine Backups”.

3. Click the up arrow to go back in time for the Safari window, I chose the previous night just before I had initiated the Ventura system upgrade.

4. Hold down the Command key and select/tap on each of the files highlighted below, then click the “Restore” button. Here’s a list of the files while I try to post the screenshot:

CloudTabs.db
CloudTabs.db-shm
CloudTabs.db-wal
SafariTabs.db
SafariTabs.db-shm
SafariTabs.db-wal

5. Quit Safari and when you’re prompted choose to Overwrite the existing files.

6. After the copying is complete, launch Safari and from the menu bar choose History->Reopen All Windows from Last Session.

Boom, your windows from the previous session should now be restore. I’m leaving my previous post up just in case Apple fiddles with Safari’s structure in the future. Also note, following these instructions does not erase your history, even information between the tabs you’re recovering the current time – this history remains.

* Sorry for the lack of a screenshot, I have it, but WordPress is giving me some fits. Must be a permissions issue I’ll fix later. *

macOS and Outlook Group Mailboxes

Bleh, Microsoft’s Public Folders feature worked wonderfully on Outlook for Mac. My company recently moved to Group Mailboxes when Microsoft deprecated Public Folders. We were told that it would be possible to archive messages from an inbox to a Group Mailbox on iPhones (and Macs) just like Windows, but six months in and the feature does not exist outside Windows. Microsoft Support recommends that we request the feature and folks did 7 months ago, but there’s still no official word for if or when this feature will show up. Microsoft, please bring feature parity across platforms.