Hidden layers significantly increase exported PDF file size even when Illustrator editing capabilities are disabled
When saving an Illustrator document as PDF, hidden layers appear to remain embedded in the resulting PDF and significantly increase its file size.
I have a document containing several dozen layers. Only one layer is visible at a time and is intended to be exported as a single A4 page.
When I save the document as PDF with all unnecessary PDF options disabled, including Preserve Illustrator Editing Capabilities, the resulting single-page A4 PDF is approximately 200 MB.
I then tested the same document by physically deleting all hidden layers and leaving only the visible layer. After saving the PDF again using exactly the same PDF settings, the resulting file size dropped from approximately 200 MB to just 7 MB.
This strongly suggests that Illustrator is retaining a very large amount of data from hidden layers in the PDF even though those layers are not visible and Preserve Illustrator Editing Capabilities is disabled.
Steps to reproduce:
- Create or open an Illustrator document containing multiple layers with artwork.
- Hide all layers except one.
- Save the document as an Adobe PDF.
- Disable Preserve Illustrator Editing Capabilities.
- Check the resulting PDF file size.
- Return to the Illustrator document and physically delete all hidden layers.
- Save the PDF again using exactly the same settings.
- Compare the file sizes.
Actual result:
The PDF created while the unused layers are merely hidden is dramatically larger.
In my case:
Hidden layers present: ~200 MB
Hidden layers physically deleted: ~7 MB
This means that removing artwork which should not be included in the final PDF reduces the file size by approximately 96.5%, despite using exactly the same PDF export settings.
Expected result:
When Preserve Illustrator Editing Capabilities is disabled, artwork contained on hidden layers should not be embedded in the exported PDF and should not affect its file size.
A PDF containing only one visible A4 composition should have approximately the same file size regardless of whether unrelated, invisible Illustrator layers still exist in the source document.
Workaround:
Physically deleting all hidden layers before saving the PDF reduces the file size from approximately 200 MB to 7 MB.
This is particularly problematic for documents where multiple design variants or pages are stored as separate layers, because exporting each visible layer currently requires physically deleting all other layers instead of simply hiding them.
-
Well, hidden means hidden, not absent... hidden objects and layers become hidden PDF objects in the raw PDF stream, dead and unmapped... even with the 'Create Acrobat Layers' being disabled. As far as I know, this is a sane requirement of the PDF format, the object tree should remain as it is, regardless of visibility settings (these objects potentially can influence how the document looks and behaves, even when hidden).
However these hidden objects can be deleted in Acrobat, but it’s an extra step.I certainly agree that deleting something before exporting is a super dangerous process, hard to automate, prone to errors and data loss if done manually.
The topic is not new at all, and had been discussed at forums many times:
— https://community.adobe.com/questions-652/saving-illustrator-as-pdf-without-the-hidden-layers-783968
— https://community.adobe.com/questions-652/save-as-adobe-pdf-includes-hidden-sublayers-775107
— https://community.adobe.com/questions-652/which-information-is-lost-when-saving-ai-as-hi-res-pdf-790981
— and even this bug: https://www.reddit.com/r/AdobeIllustrator/comments/1sr26ka/hidden_layers_appeared_after_pdf_file_is_printed/I think there should be an option, but I expect it to be a very tough thing to do.
I change this into a feature request — and thank you for raising this up.