• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

importing matplotlib vector graphics with many objects into illustrator increases file size

New Here ,
May 18, 2023 May 18, 2023

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.

 

 

Snip20230519_2.png

TOPICS
Import and export

Views

604

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 21, 2023 May 21, 2023

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. 

Votes

Translate

Translate
Adobe
LEGEND ,
May 19, 2023 May 19, 2023

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 20, 2023 May 20, 2023

Copy link to clipboard

Copied

A blank page created with Matplotlib has a 1KB size. After Illustrator, the new file is of size 10KB.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 21, 2023 May 21, 2023

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. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 21, 2023 May 21, 2023

Copy link to clipboard

Copied

LATEST

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.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines