We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Compress images in a pdf document

I would like to compress all of the images in a pdf document (see this thread for background). Is it possible using Pdf.Kit to extract each image in a pdf document and then (after compressing using .NET classes) update each image with a compressed version?

I see that you have the PdfExtractor class which can be used for extracting images, and the PdfContentEditor.ReplaceImage method which can be used for updating an image. The ReplaceImage method requires a page number and an image index to specify which image is being replaced. I see how the page number can be specified with the PdfExtractor class, but how can the image index be specified or determined when extracting an image?

Thank you!
Ken

Hi Ken,

I’m very much hopeful that the following two topics can be helpful in your scenario:
Manipulating Images in an Existing PDF File
Getting Image Information and Replacing Particular Images

If you need any further assistance please do let us know.
Regards,