I'm looking for a way to reduce PDF size that I generate with Quartz. I'm drawing images with CGContextDrawImage in a CGPDFContext. What I'm afraid of is that the images are saved as Bitmap and not JPEG. Is there a way to check for that and a way to control that when writing the PDF?
I also tried reducing downscaling the image before writing it to the PDF context but I end up with an even larger file (although the page size in pixels is smaller).
Thanks!
In the latest version of Adobe Acrobat, open the PDF you wish to re-save as a smaller file, choose File, Save as Other, and then Reduced Size PDF. You'll be prompted to select the version compatibility you need — it defaults to Retain existing to keep the current file settings — and then you can click OK to save.
There is no public API for setting CGPDFContext
's image compression settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With