▶ You can also watch this video at YouTube.
▶
▶ Watch more videos about related subjects: iPhone (352 videos), Shortcuts (78 videos).
Video Summary
In This Tutorial
Learn how to create an iPhone Shortcut to compress scanned PDFs into much smaller files by splitting pages, converting them to JPEGs, and recombining them into a new PDF.
iPhone Scan File Sizes Can Be Too Big (00:35)
iPhone’s built-in scan function often saves PDFs that are larger than expected. Even small receipts can be half a megabyte, while multi-page scans can be several megabytes.
Optimize PDF Action Won't Do It (01:46)
The “Optimize PDF” shortcut action only slightly reduces file size because it keeps high-resolution images. It’s not enough for heavy compression.
Split the PDF Into Pages (02:26)
- Create a new shortcut and set it to receive PDFs from the Share Sheet.
- Use the “Split PDF” action to break the document into individual pages.
- This prepares each page to be processed separately.
This Is For Scans, Not Other Types Of PDFs (02:56)
This shortcut works only for scanned PDFs, which are image-based. Using it on text-based PDFs from apps like Pages or Word will reduce quality and may increase file size.
Compress Each Page As a New JPEG Image (03:51)
- Use a “Repeat with Each” action for the PDF pages.
- Convert each page into a JPEG with “Make Image from PDF Page.”
- Set a low DPI, like 24, for maximum compression. Experiment with values like 36 or 50. Optionally switch to grayscale for text-only documents.
Create a New PDF With the Compressed JPEGs (05:41)
The repeat loop outputs a list of JPEGs. Use “Make PDF” to combine them back into a single compressed PDF.
Display Potential File Size Savings (06:23)
- Get the original file size and the new PDF file size.
- Show an alert with both values so you can compare before saving.
- Include a Cancel button to stop if the savings aren’t worthwhile.
Saving the New File (08:10)
Use “Save File” with “Ask Where to Save” enabled to choose a destination folder. This also grants the shortcut permission to save outside its default folder.
Rename the File (08:55)
- Get the original file’s name using “Get Details of Files.”
- Rename the saved file with the original name plus “-compressed” or your preferred suffix.
- This step ensures clear identification without overwriting the original.
Testing the Shortcut (10:08)
- Share a scan to the shortcut via the Files app.
- Check the alert for original and new sizes to confirm compression savings.
- Save the new file, verify the quality, and adjust DPI settings if needed.
Summary
This shortcut splits a scanned PDF into pages, compresses each page to a low-DPI JPEG, rebuilds the PDF, and optionally shows the file size reduction before saving. It’s a flexible way to shrink iPhone scan file sizes while keeping them readable.
Video Transcript
Hi, this is Gary with MacMost.com. Let me show you how to use a shortcut to compress scans on your iPhone for a smaller file size.
So a common problem I hear about is when people use their iPhone to scan things, like receipts and other documents, and they notice that the scans are pretty large. Dedicated scanning apps can sometimes produce smaller file size. The scan is the same. It is just that they are using a lot of image compression to get a smaller file. The default scanning function on the iPhone just doesn't do that.
So for instance in the Files App if I'm in folder and I want to scan a document I can tap the three dots button here and use the Scan Documents. I'll get files that look like this. You can see this one here is just a simple receipt. It's not even very large. It's not a whole piece of paper and yet it's ½ a meg in size. This one is two sheets of paper. It's a color image and all but it's still seems a little bit big at over 2½ megs. So the thing is that as long as you're using the scan function in the Files App or in another app like Notes of something you're probably not going to get anything smaller than this. You can change some settings like make it gray scale instead of color and it will improve it a little bit. But if you really want smaller sizes what you're going to have to do is either use a third party app or compress the file afterwards. Fortunately you can create a shortcut in the Shortcut's app that can compose these and make these much smaller.
So I'm going to show you how to build this shortcut from scratch. So this video has two purposes. One is to provide you with a shortcut that will do this. The other is to teach you some shortcut skills. I'll provide a download link for the shortcut as well.
I'm going to create a new shortcut here and I'm going to name it Compressed Scan. Now scans, of course, are going to produce PDF's. If we search for PDF we'll find there is Optimize File Size for PDF. Which will seem like exactly what we want to do. Unfortunately it doesn't work very well. It won't go to the extremes that we really want with a scan to make the file size smaller. It will just compress something like a PDF with very high resolution images into something with medium resolution images. So you're welcome to experiment with Optimize File Size but you'll probably end up with sizes that are just a little bit smaller or maybe not even smaller at all from the originals. Instead we're going to take a different approach.
We're going to use Split PDF into Pages. So this is going to take each page of the PDF and allow us to process it individually. So here for the document instead of tapping there and selecting a specific document I'm going to tap and Hold and I'm going to select Shortcut Input. So this will then add the recede action at the top and I can customize that to Only Use PDF's. Scans will be PDF's. Now it is important to note that this is specifically for scanned PDF's. Scanned PDF's are images. You have three pages that's three images put together into a three page PDF. You should try to use this on a regular PDF like a form you may download or something you created in Pages or Word or InDesign or something like that. Those types of PDF's actually imbed the text and the curves and the fonts and everything like that. This shortcut is just going to convert that to JPEG images which will reduce the quality and will probably make the file size larger. So this is specifically for scanned. Not all PDF's.
So now it is going to receive scanned PDF's from and then we'll tap here and we'll say, Show In Share Sheet and that's the only one we want to use here. Now it is going to take that and then pipe that into Split PDF and now that we have a list of pages what we want to do now is we want to repeat with each page. So I'm going to Search for Repeat and do Repeat with each. So it is going to repeat with each item in the PDF pages. Now I'm going to Search for Make and there's an Action here for Make Image from PDF Page. I'm going to use that and I'm going to drag that into the Repeat Loop there. Then it's going to make, and I don't want a PDF image. I want a JPEG image because we want to compress these. It is going to use Repeat Item which is exactly what we want. So every page.
You have options here. Options are the most important thing here. If you try to use this normally it is going to take a high resolution scan and give you a high resolution scan. Instead we want to convert it using the Dots Per Inch. Now you would think that, okay let's do something like 72 dots per inch for low resolution. But with my experimentation I found 24 dots per inch worked really well. It was still a readable scan but at a much smaller file size. This is a key number here. You're going to want to experiment with that. Maybe 36 is going to be better for you. Or 50, something like that. Also you may want to consider changing RGB to grayscale. In other words get rid of the color. If you're scanning documents for record keeping, like receipts or things like that, you don't necessarily need to keep the color. So, so far it is going to take the PDF, break it up into pages, repeat through it, and convert every image to a really well compressed JPEG.
If you find these videos valuable consider joining more than 2000 others that support MacMost through Patreon. You get exclusive content, course discounts and more. You can read about it at macmost.com/patreon.
Now, the way Shortcuts works is that when you have a repeat loop, the output from the repeat loop is a list of all the things done through each iteration. So, if there are five pages here it will compress each of the five pages and it the repeat loop will output a list of JPEG images. So we wanted next to go ahead and search for PDF again and there is a Make PDF action here. It is going to make PDF from the repeat results. There are some options here but the default options work well for what we want.
Now we could just go ahead and save the file if we want. But let's get a little fancy here and see how much space is going to be saved. So what I'm going to do here is I'm going to grab a text action, like this. You can put whatever you want in this text here. So, I'm going to start by typing just these words and now at this point, instead of typing more, I'm going to choose Select Variable. I'm going to select from the top here, this Shortcut Input. Then I'm going to do a Return to the next line and then type. The same thing here. I'm going to tap Select Variable and I'm going to get the result from Make PDF from, so this PDF here. Now I don't want to show the Shortcut Input and the result from PDF here. So I want to show a property of those. So I'm going to tap on Shortcut Input and say I don't want the actual PDF here. I want the file size. Then I'm going to do the same thing with the PDF here. I'm going to tap on that and choose File Size. So now original size and new size. Both the file sizes both the original PDF and the new PDF. So that is just in text now.
What I'm going to do with that text is I'm going to use Show Alert. I'm going to put that here. The Alert is actually going to be, I'm going to delete all of this, and I'm going to, instead, insert a variable. There's the variable, right there. Text. I can just have that as the text I can expand the options here. I want the title of this to be something like this. Do You Want To Save The New Version. Then, VERY IMPORTANT. I want the option Show Cancel Button to be shown. So when this alert appears if you can cancel it would just cancel the rest of the shortcut and it won't save the file. So if you notice the file size isn't much better or maybe it is larger or whatever, you can just cancel and not actually save it.
Now I'm going to look for the action, Save File, and add that here. Then I'm going to tap and hold on File and choose the PDF, the result from up here. Options are important here. I want Ask Where to Save. This is important because the shortcut will not have permission to save anywhere but the Shortcuts Folder unless you use this Ask Where to Save. When you do that you're going to be prompted with a little dialogue where you need to select a folder. So you need to do this and you are basically giving the shortcut permission to save the file. You're probably going to save it in the same place as the original scan, although you don't need to. But it is better than having it saved to the Shortcuts Folder and then having to go in there to find it.
Now the new file is going to have a generic file name. But we want to name it the same thing as the original but maybe with a little bit appended to it. So we want to get the name of the original file here. We're going to search for Details and there's Get Details of Files right there. So we want the Detail to be the name. We don't want the name of the saved file. We want the name of the actual shortcut input, the original file. Then we're going to use Rename and then tap and hold and Select Variable. Then select the saved file and then name it. Then here we're going to select variable and select this name, the original name, but we're going to keep typing and I'm to just do a dash and Compressed. You can use something different if you want. Maybe a single letter if you like. The reason we had to use Name here, instead of just using Shortcut Input, in getting the name from the Shortcut Input like we got the file size earlier is that it doesn't seem to work. So just little extra step here to get around that.
That's it! This shortcut should now allow us to Compress Scan. Let's give it a try. So here in the Files App I've got that Receipt Folder and I've got the bill right here. Let me tap and hold it. Then I can go to Share. If I scroll down a bit I'll see Compressed Scan. I'm going to select that and then it will do the compression and you can see here it will give me the original size and the new size. You can see the savings are impressive. So I'm going to tap Okay instead of cancel indicating that I want to save it. Now it is going to ask where I want to Save it. Fortunately the last place I was working with is this same Receipts Folder. But you can navigate to any other place that you want. If you Recents up here and you want to switch to Browse at the bottom or even go to another folder. So you can even scan to some sort of default folder that everything gets scanned to and then use this as a way to file away the copy you're going to keep. I'm just going to save it here inside of this Receipts Folder. So I'm going to tap Open and it's going to ask for permission. But only the first time as long as you tap Always Allowed. Now you can see I've go that dinner bill, 70K. Now here's the original. Then this is the one that should have compressed every image on every page to a 24 dots per inch JPEG. You can see it looks pretty good. Let's try it with this document here. This is what the original looks like. I can zoom in a bit and you can see how the quality is. Let's go ahead and tap and Share and let's scroll down a bit, Compressed Scan, and then you can see I'm going to get considerable scan savings there as well. Tap Okay. This is where I'm going to save it. Tap Open and now I've got that new version there. We see the size. Let's go and take a look here and look at the quality here and it looks pretty good. Notice it is still color even though I selected gray. For that reason that aspect of it didn't seem to work. But it was still able to get a considerably smaller file.
Now one of the reasons I showed you every step of creating a shortcut like this, is that I want to encourage people to customize this to their liking. Certainly experiment with the compression amount, like I showed, but also the file naming and if you're feeling really industrious you may want to experiment with allowing multiple files, instead of just one at a time. It's possible using an outer loop that will look at multiple files that come in under the Share Sheet Action.
I hope you found this useful. Thanks for watching.



Thanks bunches