Part of #868: PDFs saved with the reference app's editing data open from it, as .ai files do

A PDF saved with the reference app's editing data keeps that data in
streams named AIPDFPrivateData1, AIPDFPrivateData2, ..., where a .ai
file uses AIPrivateData1, AIPrivateData2, .... illustrator_data read
only the .ai names, so such a PDF opened like any other PDF: plain
groups opened ungrouped, and hidden objects and guides were missing. The
import gave no warning that the PDF's editing data went unread.

illustrator_data now reads the AIPDFPrivateData streams when the file
has no AIPrivateData1, and the PDF opens from its editing data as a .ai
file does. editingData: false still opens it like any other PDF.
has_private_data still looks for AIPrivateData keys only.

layered_ai also returns whether it read the layers. When it did, art
reaching past a PDF's page opens whole, and through_editing_data drops
the PDF importer's note that such art was clipped (PAST_PAGE_NOTE, now
public) as it drops the off-artboard note. When it didn't, both notes
stay. On main, a .ai whose editing data can't be decoded or has no
layers opened from its PDF part without the off-artboard note.

testkit::ai::pdf writes the .ai file of testkit::ai::ai with the PDF
key names. The editing-data tests open it as a PDF, and the import fuzz
test opens the damaged sample as a PDF too.

Docs: the document.open params, docs/mcp.md,
docs/file-format-parity.md, docs/gaps.md (G9: the export direction of
#868 remains), one evidence line in docs/target-app-parity.md, and #868
moved from layer structure to editing data in the File formats row of
docs/target-app-parity.md and in docs/roadmap.md.
This commit is contained in:
dotCooCoo authored and bflatastic committed 2026-10-12 14:50:00 +07:00
1 parent a99b1200ff
commit 1e76e389d2
16 files changed
+133 -47

No files matched your search

+3 -2
View File
@@ -64,10 +64,11 @@ from G14 and the budget run of G15: **~170–270 h** one agent, ~50–80 h wall
## G9 Illustrator `.ai` and EPS files from real users
- **Missing:** faithful layer and group structure from the editing data in real files (#951: 109 layers instead
of 14; #868: round trip with Illustrator 2018 loses layers and groups), guides and non-printing construction
of 14), guides and non-printing construction
lines (#779), open speed on large files (#758), legacy type in `.ai` files in PostScript form (those without
their prolog open since #1027), live effects, brushes and symbols as live objects (#637; pattern fills and global colours are read since #1025). Writing Illustrator's own editing data is out of scope
(undocumented); Save As `.ai` stays PDF-compatible.
(undocumented); Save As `.ai` stays PDF-compatible, and Illustrator 2018 opens such a file without its layers and
groups (#868).
- **Evidence:** the issues above; 28 of the 350 issues are about `.ai`/EPS (about 22 people, the most common single
format theme), 20 fixed, and the 8 open ones are about structure (layers, guides, speed, live objects), not missing
art. No real-file `.ai` corpus (users' files may be used locally, never committed).