Copy link to clipboard
Copied
Hi,
I am using a vector graphics pdf created with Matplotlib consisting of many objects (a couple of thousand). The original file size (as created by Matplotlib) is 41KB. See the attached snippet for an example of the information I use. When I load this pdf into Illustrator and save it (without making any modifications), the new file size is 2.6MB (saved with the smallest file size option). Any ideas on what can be done to improve the file size of Illustrator? Fidgeting with the menu options did not help much.
1 Correct answer
Probably Matplotlib just writes some very basic PDF.
Illustrator writes PDFs that can be used for printing.
With your initial file from the opening post, which options exactly are turned on when saving the file?
You will have to live with at least some file increase. You cannot expect Illustrator to write exactly the same code as the other tool does.
Explore related tutorials & articles
Copy link to clipboard
Copied
What size is an empty (blank) page saved from Illustrator in the same way? This may just be the standard overhead.
Copy link to clipboard
Copied
A blank page created with Matplotlib has a 1KB size. After Illustrator, the new file is of size 10KB.
Copy link to clipboard
Copied
Probably Matplotlib just writes some very basic PDF.
Illustrator writes PDFs that can be used for printing.
With your initial file from the opening post, which options exactly are turned on when saving the file?
You will have to live with at least some file increase. You cannot expect Illustrator to write exactly the same code as the other tool does.
Copy link to clipboard
Copied
Maybe Matplotlib writes very efficient PDF.
In a PDF you can have repeating elements that are only described once; a form XObject. Comparable to a static Symbol in Illustrator. Unfortunately Illustrator does save Symbols as form XObjects in a PDF, but does not read form XObjects in a PDF as Symbols. That may explain the difference in file size.

