Forum Thread - Avoid extract shared images if they are not in use

Our PDF file has a lot of share images as reference in the pdf file, when we extract just a few pages, all the shared images are also brought into the new pdf files. It make file size almost as large as the original pdf file. Is there any way we can avoid extract images if they are not in use?

Thank you very much for your quick reply. The following are the sample code we use to extract pages. version is 8.0.1.40, run time version is v4.0.30319. it is 32 bit.
Our PDF is highly confidential, and can not provide them. sorry about that.

We would need to look at the PDF in order to understand the issue with the shared images and to accurately answer your question. In any case, you may try the following suggestions and see if they help:

1. Update the dll to the latest (v8.0.4) as you are using an old build. You can download the latest installer in the customer area.

2. Try the code suggested in “Combining Images” listed here. The code shows how to use DocumentOptimization class, this class will only remove duplicate image objects if any present. It probably won’t remove the shared images you are talking about.

After reviewing the PDF, it has been found that the file size of the extracted PDF is remaining the same as the original PDF due to hundreds of form objects being referenced in each page of the original PDF. Our product can remove duplicate image objects if any present in the PDF, but our product is not capable of removing form objects.