Repository navigation
Part of #637: Illustrator EPS and .ai files open from their editing data - #717
Closed
bflatastic wants to merge 1 commit into
Closed
bflatastic wants to merge 1 commit into
bflatastic wants to merge 1 commit into
Conversation
An Illustrator EPS (version 9 on) carries the document as the app keeps it after its printed page (%AI9_PrivateDataBegin: Zstandard or zlib data in ASCII85 comment lines, or plain), and a .ai file in its first page's /PieceInfo /Illustrator /Private streams (%AI24_ZStandard_Data, %AI12_CompressedData or plain, after header comments). Both now open from it: layers and sublayers (name, order, visibility, lock, printing, preview, dimming, colour), groups as they were nested, compound paths, clipping groups and layer clipping, object names, hidden and locked objects, fills and strokes (grey, CMYK, RGB, spot colours as spot swatches, caps, joins, dashes, fill rule), linear and radial gradients, opacity, blend modes, isolation and knockout, embedded images with their alpha channel, guides and every artboard where it is. Objects with several fills or strokes, effects or brushes come in as their drawn look, named after them, with a warning. Type, symbols, pattern fills, placed files and operators the reader doesn't know are errors: the file opens as before (the EPS page, the .ai file's PDF content) with a first warning saying what was left out. A .ai opened with pages picked, and a .pdf, read the PDF as before. Reading is bounded (512 MB decompressed, nesting, objects, points, stack, image sizes checked against their data) and fuzzed in import_fuzz. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bflatastic
marked this pull request as draft
October 9, 2026 08:03
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Illustrator EPS files (version 9 on) and
.aifiles (PDF compatible or not) now open from the editing data they carry, instead of the printed EPS page or the PDF-compatible part.Reading the data (
crates/eps/src/import/ai/)%AI9_PrivateDataBegin…%AI9_PrivateDataEndafter the page: header comments, then%AI24_DataStream(Zstandard) or%AI9_DataStream(zlib) as ASCII85 comment lines, or the data as it is..ai: the first page's/PieceInfo /Illustrator /PrivateAIPrivateData1…Nstreams joined (vectorcraft_pdf::ai_private_data):%AI24_ZStandard_Data,%AI12_CompressedData(after header comments) or plain.ruzstd(already in the workspace, pure Rust, builds for wasm).What comes through
AIArtName, or the XML id decoded:My_Rect__x23_2→ "My Rect Docs: workflow fixes from #1 (README, control protocol) #2"), hidden and locked objects.ArtboardArray; older files: crop marks, or the art size around the template box).Not yet (the file opens as before, the EPS page or the
.aifile's PDF content, with a first warning naming what): type, symbols, pattern fills, placed (linked) files, legacy-format type, any operator the reader doesn't know. Appearances and live effects are drawn, not editable. A.aiopened withpagespicked, and a.pdf, read the PDF as before. A.aifrom Illustrator still isn't saved over (Save asks for a new file), as before.Tests
epsunit tests on hand-written editing data: layers, groups and names, colours and strokes, compound and clipping, transparency, gradients, artboards, drawn looks, images with alpha, skipped sections, errors, hostile input, both EPS codecs and the three.aiencodings.engine(tests_aiimport.rs): a synthetic sample (vectorcraft_testkit::ai) opened as EPS and as.ai, saved as EPS and reopened; the fallbacks and their warnings.import_fuzz: hostile editing data (operators, sections and dictionaries in any order) and mutated data, plain and compressed, through EPS and.ai.🤖 Generated with Claude Code