mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
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:
1 parent
a99b1200ff
commit
1e76e389d2
16 files changed
+133
-47
No files matched your search
+2
-1
@@ -496,7 +496,8 @@ pattern fills, placed files or anything else the reader doesn't read on a layer
|
||||
different from its page, opens as before: an EPS as its printed page, a `.ai` file from its PDF content (where plain
|
||||
groups open ungrouped), with a warning saying why. Layers look different when they draw an object the page doesn't (or
|
||||
miss one it draws), and, for an EPS whose page is the box of its art, when they print art outside it. With
|
||||
`textAs: "outlines"` a `.ai` file whose type shows opens from its PDF content, which has the type's outlines.
|
||||
`textAs: "outlines"` a `.ai` file whose type shows opens from its PDF content, which has the type's outlines. A PDF
|
||||
saved with Illustrator's editing data holds it in `AIPDFPrivateData` streams and opens from it as a `.ai` file does.
|
||||
|
||||
The document then has what the file's page doesn't print: hidden objects and layers, layers that don't print, guides and
|
||||
the art outside the artboards, as the app that wrote the file shows them. Exports and `artboard.fitToArt` leave out the
|
||||
|
||||
Reference in new issue
Block a user