From d80307af3f82c4698ed12ccc13c0156e7e0714a2 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 30 Nov 2026 20:16:36 -0800 Subject: [PATCH 01/12] Docs: say when an explicit crop box opens a PDF with editing data Opening a PDF or .ai that carries .ai editing data gives its trim boxes for the crop box. When its pages are imported, a crop box the caller names gives the crop boxes instead (explicit_crop_box in pdfimport.rs, covered by explicit_crop_box_opens_the_bleed_outside_an_editable_files_trim_box). Linked pages keep the trim boxes either way. --- docs/mcp.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/mcp.md b/docs/mcp.md index 55886fae8f..875a7f3101 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1739,8 +1739,9 @@ unknown label is refused. The `warnings` of the result name the first three such Opening a PDF (or `.ai`) imports every page as an artboard and layer; `document.open` takes `pages` ("2-3, 5", 1-based), `cropTo` (`bounding` (the art's bounds), `art`, `crop` (default), `trim`, `bleed`, `media`: the box each artboard gets; -with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a PDF-compatible `.ai` or a PDF saved with its editing data opens on its trim boxes for -`crop`, its crop box taking the bleed in) and `password` for an encrypted file. `document.pdfInfo` reads a file without opening it: the page count, each page's +with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a file whose PDF carries `.ai` editing data (`AIPrivateData` or `AIPDFPrivateData`) opens on its trim boxes for +`crop`; when its pages are imported (with a `pages` range, or with `editingData: false`), the default still gives the +trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take the bleed in) and `password` for an encrypted file. `document.pdfInfo` reads a file without opening it: the page count, each page's size and boxes, `needsPassword`, and with `thumbnail: n` a PNG of page n. It reads a PostScript file (an EPS, a `.ps` file, a `.ai` in PostScript form) as one page the size of its bounding box (a US Letter page without one), with an empty `boxes`, and `thumbnail: 1` shows what that page prints. A page whose `UserUnit` (PDF 1.6) is above 1 @@ -1750,8 +1751,8 @@ such a page opens from that data at the page's size. `linkPages: true` (File › Open's Import PDF dialog: Import PDF pages as links) opens each page `pages` picks as a placed document linked to that page of the file, as `file.place` with `link` places one, instead of as editable art. Each page gets an artboard of its `cropTo` box (`bounding`: its art's bounds; a blank page gets its crop box), in a row from the left 36 pt apart, and -a layer named after the page (`Page 2`). A PDF-compatible `.ai` with `cropTo: "crop"` gets its trim boxes, as it does -when it opens as art. A page on its trim box shows its bleed box round the artboard, and the pages give the document +a layer named after the page (`Page 2`). A file whose PDF carries `.ai` editing data gets its trim boxes for +the `crop` box, named or by default. A page on its trim box shows its bleed box round the artboard, and the pages give the document their bleed; the artboards are then 36 pt apart plus the bleed on both sides. The document opens in CMYK when most of those pages are painted mostly in CMYK, unless `colorMode` names a mode. All the pages' objects share one copy of the file. The Links panel lists each page, and `links.embed` makes a page editable art. The command's `linkPages` defaults to false; the dialog checks the From e4b81a5a882ee7ea42505e2c4db708f2cbfcd893 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 30 Nov 2026 20:28:31 -0800 Subject: [PATCH 02/12] Docs: say that a named crop box takes the bleed in only when it contains the bleed box --- docs/mcp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mcp.md b/docs/mcp.md index 875a7f3101..6dcdc968eb 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1741,7 +1741,7 @@ Opening a PDF (or `.ai`) imports every page as an artboard and layer; `document. `cropTo` (`bounding` (the art's bounds), `art`, `crop` (default), `trim`, `bleed`, `media`: the box each artboard gets; with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a file whose PDF carries `.ai` editing data (`AIPrivateData` or `AIPDFPrivateData`) opens on its trim boxes for `crop`; when its pages are imported (with a `pages` range, or with `editingData: false`), the default still gives the -trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take the bleed in) and `password` for an encrypted file. `document.pdfInfo` reads a file without opening it: the page count, each page's +trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take the bleed in only when the file's crop box contains its bleed box) and `password` for an encrypted file. `document.pdfInfo` reads a file without opening it: the page count, each page's size and boxes, `needsPassword`, and with `thumbnail: n` a PNG of page n. It reads a PostScript file (an EPS, a `.ps` file, a `.ai` in PostScript form) as one page the size of its bounding box (a US Letter page without one), with an empty `boxes`, and `thumbnail: 1` shows what that page prints. A page whose `UserUnit` (PDF 1.6) is above 1 From 4fdea52931f1cd1dc0a97b2f8a783b749f688457 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 30 Nov 2026 20:43:23 -0800 Subject: [PATCH 03/12] Docs: say that a named crop box takes in the part of the bleed it covers --- docs/mcp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mcp.md b/docs/mcp.md index 6dcdc968eb..38b7f78e5c 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1741,7 +1741,7 @@ Opening a PDF (or `.ai`) imports every page as an artboard and layer; `document. `cropTo` (`bounding` (the art's bounds), `art`, `crop` (default), `trim`, `bleed`, `media`: the box each artboard gets; with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a file whose PDF carries `.ai` editing data (`AIPrivateData` or `AIPDFPrivateData`) opens on its trim boxes for `crop`; when its pages are imported (with a `pages` range, or with `editingData: false`), the default still gives the -trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take the bleed in only when the file's crop box contains its bleed box) and `password` for an encrypted file. `document.pdfInfo` reads a file without opening it: the page count, each page's +trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take in whatever part of the bleed the file's crop box covers: all of it when the crop box contains the bleed box, part of it when the crop box reaches past the trim box but not to the bleed box's edges) and `password` for an encrypted file. `document.pdfInfo` reads a file without opening it: the page count, each page's size and boxes, `needsPassword`, and with `thumbnail: n` a PNG of page n. It reads a PostScript file (an EPS, a `.ps` file, a `.ai` in PostScript form) as one page the size of its bounding box (a US Letter page without one), with an empty `boxes`, and `thumbnail: 1` shows what that page prints. A page whose `UserUnit` (PDF 1.6) is above 1 From 69a42e00a2f5879fbbe1fe66ab388046558ca39a Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 30 Nov 2026 21:02:46 -0800 Subject: [PATCH 04/12] Docs: say a named crop box can take in all, part or none of the bleed The crop box can miss the bleed entirely, for example when the bleed lies only right of the trim box and the crop box reaches past it only on the left. --- docs/mcp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mcp.md b/docs/mcp.md index 38b7f78e5c..3d597bc1ff 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1741,7 +1741,7 @@ Opening a PDF (or `.ai`) imports every page as an artboard and layer; `document. `cropTo` (`bounding` (the art's bounds), `art`, `crop` (default), `trim`, `bleed`, `media`: the box each artboard gets; with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a file whose PDF carries `.ai` editing data (`AIPrivateData` or `AIPDFPrivateData`) opens on its trim boxes for `crop`; when its pages are imported (with a `pages` range, or with `editingData: false`), the default still gives the -trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take in whatever part of the bleed the file's crop box covers: all of it when the crop box contains the bleed box, part of it when the crop box reaches past the trim box but not to the bleed box's edges) and `password` for an encrypted file. `document.pdfInfo` reads a file without opening it: the page count, each page's +trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take in whatever part of the bleed the file's crop box covers: all of it, part of it or none, depending on where the crop box and the bleed lie) and `password` for an encrypted file. `document.pdfInfo` reads a file without opening it: the page count, each page's size and boxes, `needsPassword`, and with `thumbnail: n` a PNG of page n. It reads a PostScript file (an EPS, a `.ps` file, a `.ai` in PostScript form) as one page the size of its bounding box (a US Letter page without one), with an empty `boxes`, and `thumbnail: 1` shows what that page prints. A page whose `UserUnit` (PDF 1.6) is above 1 From d37a3ebbb210061e87e372e5e7f52327de1f0bdb Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 30 Nov 2026 21:05:06 -0800 Subject: [PATCH 05/12] Docs: name layers: false among the ways a .ai-backed PDF imports its pages The editing copy is skipped whenever pages are picked, editingData is off or layers is off, so the list is given as examples. --- docs/mcp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mcp.md b/docs/mcp.md index 3d597bc1ff..b1e4c81a0d 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1740,7 +1740,7 @@ unknown label is refused. The `warnings` of the result name the first three such Opening a PDF (or `.ai`) imports every page as an artboard and layer; `document.open` takes `pages` ("2-3, 5", 1-based), `cropTo` (`bounding` (the art's bounds), `art`, `crop` (default), `trim`, `bleed`, `media`: the box each artboard gets; with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a file whose PDF carries `.ai` editing data (`AIPrivateData` or `AIPDFPrivateData`) opens on its trim boxes for -`crop`; when its pages are imported (with a `pages` range, or with `editingData: false`), the default still gives the +`crop`; when its pages are imported as editable art instead of from the editing copy (for example with a `pages` range, `editingData: false` or `layers: false`), the default still gives the trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take in whatever part of the bleed the file's crop box covers: all of it, part of it or none, depending on where the crop box and the bleed lie) and `password` for an encrypted file. `document.pdfInfo` reads a file without opening it: the page count, each page's size and boxes, `needsPassword`, and with `thumbnail: n` a PNG of page n. It reads a PostScript file (an EPS, a `.ps` file, a `.ai` in PostScript form) as one page the size of its bounding box (a US Letter page without one), with an From b969e5848707bf2133d92c372f7ddb8c222d1ffd Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 30 Nov 2026 21:07:39 -0800 Subject: [PATCH 06/12] Docs: keep the PDF-compatible qualifier on the .ai trim-box rule A file saved without its PDF part opens from its editing copy, so the rule covers PDF-compatible files only. The page-import examples drop layers: false, which does not skip a Preserve Editing copy. --- docs/mcp.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/mcp.md b/docs/mcp.md index b1e4c81a0d..db0a87d2ce 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1739,8 +1739,8 @@ unknown label is refused. The `warnings` of the result name the first three such Opening a PDF (or `.ai`) imports every page as an artboard and layer; `document.open` takes `pages` ("2-3, 5", 1-based), `cropTo` (`bounding` (the art's bounds), `art`, `crop` (default), `trim`, `bleed`, `media`: the box each artboard gets; -with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a file whose PDF carries `.ai` editing data (`AIPrivateData` or `AIPDFPrivateData`) opens on its trim boxes for -`crop`; when its pages are imported as editable art instead of from the editing copy (for example with a `pages` range, `editingData: false` or `layers: false`), the default still gives the +with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a PDF-compatible file whose PDF carries `.ai` editing data (`AIPrivateData` or `AIPDFPrivateData`) opens on its trim boxes for +`crop`; when its pages are imported as editable art instead of from an editing copy (for example with a `pages` range or `editingData: false`), the default still gives the trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take in whatever part of the bleed the file's crop box covers: all of it, part of it or none, depending on where the crop box and the bleed lie) and `password` for an encrypted file. `document.pdfInfo` reads a file without opening it: the page count, each page's size and boxes, `needsPassword`, and with `thumbnail: n` a PNG of page n. It reads a PostScript file (an EPS, a `.ps` file, a `.ai` in PostScript form) as one page the size of its bounding box (a US Letter page without one), with an From be3ee13f0e9eebe186e3d7127592e3e4dac09acc Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 30 Nov 2026 21:11:25 -0800 Subject: [PATCH 07/12] Docs: say when a named crop box applies to a .ai-backed PDF cropTo: "crop" alone restores an intact Preserve Editing copy, so the crop boxes apply only when the caller forces page import. The trim-box rule checks the first PDF page's PieceInfo for the editing data. --- docs/mcp.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/mcp.md b/docs/mcp.md index db0a87d2ce..a4bc48b47c 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1739,9 +1739,9 @@ unknown label is refused. The `warnings` of the result name the first three such Opening a PDF (or `.ai`) imports every page as an artboard and layer; `document.open` takes `pages` ("2-3, 5", 1-based), `cropTo` (`bounding` (the art's bounds), `art`, `crop` (default), `trim`, `bleed`, `media`: the box each artboard gets; -with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a PDF-compatible file whose PDF carries `.ai` editing data (`AIPrivateData` or `AIPDFPrivateData`) opens on its trim boxes for -`crop`; when its pages are imported as editable art instead of from an editing copy (for example with a `pages` range or `editingData: false`), the default still gives the -trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take in whatever part of the bleed the file's crop box covers: all of it, part of it or none, depending on where the crop box and the bleed lie) and `password` for an encrypted file. `document.pdfInfo` reads a file without opening it: the page count, each page's +with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a PDF-compatible file whose first PDF page's `PieceInfo` carries `.ai` editing data (`AIPrivateData` or `AIPDFPrivateData`) opens on its trim boxes for +`crop`; when callers force its pages to be imported as editable art instead of restoring an editing copy (for example with a `pages` range or `editingData: false`), the default still gives the +trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take in whatever part of the bleed the file's crop box covers: all of it, part of it or none, depending on where the crop box and the bleed lie) and `password` for an encrypted file. For a `.ai` file with an intact Preserve Editing copy, `document.open` with only `cropTo: "crop"` restores the embedded document. `document.pdfInfo` reads a file without opening it: the page count, each page's size and boxes, `needsPassword`, and with `thumbnail: n` a PNG of page n. It reads a PostScript file (an EPS, a `.ps` file, a `.ai` in PostScript form) as one page the size of its bounding box (a US Letter page without one), with an empty `boxes`, and `thumbnail: 1` shows what that page prints. A page whose `UserUnit` (PDF 1.6) is above 1 @@ -1751,7 +1751,7 @@ such a page opens from that data at the page's size. `linkPages: true` (File › Open's Import PDF dialog: Import PDF pages as links) opens each page `pages` picks as a placed document linked to that page of the file, as `file.place` with `link` places one, instead of as editable art. Each page gets an artboard of its `cropTo` box (`bounding`: its art's bounds; a blank page gets its crop box), in a row from the left 36 pt apart, and -a layer named after the page (`Page 2`). A file whose PDF carries `.ai` editing data gets its trim boxes for +a layer named after the page (`Page 2`). A file whose first PDF page's `PieceInfo` carries `.ai` editing data gets its trim boxes for the `crop` box, named or by default. A page on its trim box shows its bleed box round the artboard, and the pages give the document their bleed; the artboards are then 36 pt apart plus the bleed on both sides. The document opens in CMYK when most of those pages are painted mostly in CMYK, unless `colorMode` names a mode. All the pages' objects share one copy of the file. The Links panel lists each From 05b90d63ea84b00bd17f242ab000d6e35abc828c Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 30 Nov 2026 21:15:12 -0800 Subject: [PATCH 08/12] Docs: describe the .ai trim-box trigger as a PieceInfo key prefix The check matches keys that start with AIPrivateData or AIPDFPrivateData, nested dictionaries included, without reading their values. A named crop box also applies when no intact editing copy is found and the pages are imported. --- docs/mcp.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/mcp.md b/docs/mcp.md index a4bc48b47c..0df09a54d0 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1739,8 +1739,8 @@ unknown label is refused. The `warnings` of the result name the first three such Opening a PDF (or `.ai`) imports every page as an artboard and layer; `document.open` takes `pages` ("2-3, 5", 1-based), `cropTo` (`bounding` (the art's bounds), `art`, `crop` (default), `trim`, `bleed`, `media`: the box each artboard gets; -with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a PDF-compatible file whose first PDF page's `PieceInfo` carries `.ai` editing data (`AIPrivateData` or `AIPDFPrivateData`) opens on its trim boxes for -`crop`; when callers force its pages to be imported as editable art instead of restoring an editing copy (for example with a `pages` range or `editingData: false`), the default still gives the +with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a PDF-compatible file whose first PDF page's `PieceInfo` holds a key, directly or in a nested dictionary, that starts with `AIPrivateData` or `AIPDFPrivateData` opens on its trim boxes for +`crop`; when its pages are imported as editable art instead of from an editing copy (with a `pages` range, with `editingData: false`, or when no intact editing copy is found), the default still gives the trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take in whatever part of the bleed the file's crop box covers: all of it, part of it or none, depending on where the crop box and the bleed lie) and `password` for an encrypted file. For a `.ai` file with an intact Preserve Editing copy, `document.open` with only `cropTo: "crop"` restores the embedded document. `document.pdfInfo` reads a file without opening it: the page count, each page's size and boxes, `needsPassword`, and with `thumbnail: n` a PNG of page n. It reads a PostScript file (an EPS, a `.ps` file, a `.ai` in PostScript form) as one page the size of its bounding box (a US Letter page without one), with an @@ -1751,7 +1751,7 @@ such a page opens from that data at the page's size. `linkPages: true` (File › Open's Import PDF dialog: Import PDF pages as links) opens each page `pages` picks as a placed document linked to that page of the file, as `file.place` with `link` places one, instead of as editable art. Each page gets an artboard of its `cropTo` box (`bounding`: its art's bounds; a blank page gets its crop box), in a row from the left 36 pt apart, and -a layer named after the page (`Page 2`). A file whose first PDF page's `PieceInfo` carries `.ai` editing data gets its trim boxes for +a layer named after the page (`Page 2`). A file whose first PDF page's `PieceInfo` holds a key, directly or in a nested dictionary, that starts with `AIPrivateData` or `AIPDFPrivateData` gets its trim boxes for the `crop` box, named or by default. A page on its trim box shows its bleed box round the artboard, and the pages give the document their bleed; the artboards are then 36 pt apart plus the bleed on both sides. The document opens in CMYK when most of those pages are painted mostly in CMYK, unless `colorMode` names a mode. All the pages' objects share one copy of the file. The Links panel lists each From 3042821e7bdaee136b996d977702d97c0b62c056 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 30 Nov 2026 21:16:44 -0800 Subject: [PATCH 09/12] Docs: give the page-import options for a .ai-backed PDF as examples A missing or stale Preserve Editing copy does not always lead to page import, since the file can still open from its private editing data. --- docs/mcp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mcp.md b/docs/mcp.md index 0df09a54d0..fbc0de5839 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1740,7 +1740,7 @@ unknown label is refused. The `warnings` of the result name the first three such Opening a PDF (or `.ai`) imports every page as an artboard and layer; `document.open` takes `pages` ("2-3, 5", 1-based), `cropTo` (`bounding` (the art's bounds), `art`, `crop` (default), `trim`, `bleed`, `media`: the box each artboard gets; with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a PDF-compatible file whose first PDF page's `PieceInfo` holds a key, directly or in a nested dictionary, that starts with `AIPrivateData` or `AIPDFPrivateData` opens on its trim boxes for -`crop`; when its pages are imported as editable art instead of from an editing copy (with a `pages` range, with `editingData: false`, or when no intact editing copy is found), the default still gives the +`crop`; when its pages are imported as editable art instead of from an editing copy (for example with a `pages` range or `editingData: false`), the default still gives the trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take in whatever part of the bleed the file's crop box covers: all of it, part of it or none, depending on where the crop box and the bleed lie) and `password` for an encrypted file. For a `.ai` file with an intact Preserve Editing copy, `document.open` with only `cropTo: "crop"` restores the embedded document. `document.pdfInfo` reads a file without opening it: the page count, each page's size and boxes, `needsPassword`, and with `thumbnail: n` a PNG of page n. It reads a PostScript file (an EPS, a `.ps` file, a `.ai` in PostScript form) as one page the size of its bounding box (a US Letter page without one), with an From 612251b6cb90036227f157c84bcae5216f9da01a Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 30 Nov 2026 21:27:11 -0800 Subject: [PATCH 10/12] Docs: state the PieceInfo search depth for .ai-backed PDF pages The page-import and linked-page descriptions now say the key is found in PieceInfo itself or in a dictionary nested up to four dictionaries deep counting PieceInfo, as piece_info_has in crates/pdf/src/pages.rs searches. --- docs/mcp.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/mcp.md b/docs/mcp.md index fbc0de5839..ccae2a610e 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1739,7 +1739,7 @@ unknown label is refused. The `warnings` of the result name the first three such Opening a PDF (or `.ai`) imports every page as an artboard and layer; `document.open` takes `pages` ("2-3, 5", 1-based), `cropTo` (`bounding` (the art's bounds), `art`, `crop` (default), `trim`, `bleed`, `media`: the box each artboard gets; -with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a PDF-compatible file whose first PDF page's `PieceInfo` holds a key, directly or in a nested dictionary, that starts with `AIPrivateData` or `AIPDFPrivateData` opens on its trim boxes for +with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a PDF-compatible file whose first PDF page's `PieceInfo` holds a key, in `PieceInfo` itself or in a dictionary nested in it up to four dictionaries deep counting `PieceInfo`, that starts with `AIPrivateData` or `AIPDFPrivateData` opens on its trim boxes for `crop`; when its pages are imported as editable art instead of from an editing copy (for example with a `pages` range or `editingData: false`), the default still gives the trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take in whatever part of the bleed the file's crop box covers: all of it, part of it or none, depending on where the crop box and the bleed lie) and `password` for an encrypted file. For a `.ai` file with an intact Preserve Editing copy, `document.open` with only `cropTo: "crop"` restores the embedded document. `document.pdfInfo` reads a file without opening it: the page count, each page's size and boxes, `needsPassword`, and with `thumbnail: n` a PNG of page n. It reads a PostScript file (an EPS, a `.ps` @@ -1751,7 +1751,7 @@ such a page opens from that data at the page's size. `linkPages: true` (File › Open's Import PDF dialog: Import PDF pages as links) opens each page `pages` picks as a placed document linked to that page of the file, as `file.place` with `link` places one, instead of as editable art. Each page gets an artboard of its `cropTo` box (`bounding`: its art's bounds; a blank page gets its crop box), in a row from the left 36 pt apart, and -a layer named after the page (`Page 2`). A file whose first PDF page's `PieceInfo` holds a key, directly or in a nested dictionary, that starts with `AIPrivateData` or `AIPDFPrivateData` gets its trim boxes for +a layer named after the page (`Page 2`). A file whose first PDF page's `PieceInfo` holds a key, in `PieceInfo` itself or in a dictionary nested in it up to four dictionaries deep counting `PieceInfo`, that starts with `AIPrivateData` or `AIPDFPrivateData` gets its trim boxes for the `crop` box, named or by default. A page on its trim box shows its bleed box round the artboard, and the pages give the document their bleed; the artboards are then 36 pt apart plus the bleed on both sides. The document opens in CMYK when most of those pages are painted mostly in CMYK, unless `colorMode` names a mode. All the pages' objects share one copy of the file. The Links panel lists each From 3dfbf3cf641395177ea4642274a09b79553b3cbc Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 30 Nov 2026 21:29:56 -0800 Subject: [PATCH 11/12] Docs: say the .ai-backed PDF trim default applies when no crop box is named --- docs/mcp.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/mcp.md b/docs/mcp.md index ccae2a610e..767651d8a6 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1739,8 +1739,7 @@ unknown label is refused. The `warnings` of the result name the first three such Opening a PDF (or `.ai`) imports every page as an artboard and layer; `document.open` takes `pages` ("2-3, 5", 1-based), `cropTo` (`bounding` (the art's bounds), `art`, `crop` (default), `trim`, `bleed`, `media`: the box each artboard gets; -with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a PDF-compatible file whose first PDF page's `PieceInfo` holds a key, in `PieceInfo` itself or in a dictionary nested in it up to four dictionaries deep counting `PieceInfo`, that starts with `AIPrivateData` or `AIPDFPrivateData` opens on its trim boxes for -`crop`; when its pages are imported as editable art instead of from an editing copy (for example with a `pages` range or `editingData: false`), the default still gives the +with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a PDF-compatible file whose first PDF page's `PieceInfo` holds a key, in `PieceInfo` itself or in a dictionary nested in it up to four dictionaries deep counting `PieceInfo`, that starts with `AIPrivateData` or `AIPDFPrivateData` opens on its trim boxes when `cropTo` and `crop` are omitted; when its pages are imported as editable art instead of from an editing copy (for example with a `pages` range or `editingData: false`), the default still gives the trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take in whatever part of the bleed the file's crop box covers: all of it, part of it or none, depending on where the crop box and the bleed lie) and `password` for an encrypted file. For a `.ai` file with an intact Preserve Editing copy, `document.open` with only `cropTo: "crop"` restores the embedded document. `document.pdfInfo` reads a file without opening it: the page count, each page's size and boxes, `needsPassword`, and with `thumbnail: n` a PNG of page n. It reads a PostScript file (an EPS, a `.ps` file, a `.ai` in PostScript form) as one page the size of its bounding box (a US Letter page without one), with an From d0b078f0255445030dfe0dd1c51db7f15c2c33e4 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Mon, 30 Nov 2026 21:44:40 -0800 Subject: [PATCH 12/12] Docs: match document.open's crop help to the trim-box rule The document.open parameter text now names the PieceInfo keys and their search depth, limits the trim default to pages imported as editable art with cropTo and crop omitted, and says cropTo takes precedence over the crop alias. docs/mcp.md says restoring an editing copy uses that copy's artboards. --- crates/engine/src/cmd/fileio/commands.rs | 2 +- docs/mcp.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/cmd/fileio/commands.rs b/crates/engine/src/cmd/fileio/commands.rs index a48ac3e85b..7595276eff 100644 --- a/crates/engine/src/cmd/fileio/commands.rs +++ b/crates/engine/src/cmd/fileio/commands.rs @@ -9,7 +9,7 @@ pub fn specs() -> Vec { "Open Document", [], None, - "{path | name | dataBase64 (a file's path, or its name with its bytes), pages?: \"2-3, 5\" (PDF/.ai: 1-based, default all; one artboard each) | page?: n, cropTo?: bounding|art|crop (default)|trim|bleed|media (the box each artboard gets; bounding: the art's bounds; trim: the bleed box round it becomes the document's bleed, and the artboards are 36 pt apart plus that bleed on both sides; a PDF-compatible .ai or a PDF saved with its editing data opens on its trim boxes for crop), password? (encrypted PDFs; see document.pdfInfo), textAs?: text (default: point type per line, lines wrapped in a frame as area type where they lay out the same, in the file's fonts by name; missing ones are listed in warnings) | outlines (glyph paths), layers?: true (default: optional content groups become layers with their visibility, print state and lock — art that is off comes in as a hidden layer; other art goes to a layer per page; a PSD file's layers become layers holding their pixels, with their names, visibility, opacity and blend modes, groups as layers of sublayers, layer masks as opacity masks, clipped layers and layers in blend modes VectorCraft doesn't have merged with the layers below) | false (one layer per page, without the art that is off; Save then asks for a name; a PSD file opens as its merged image), hiddenLayers?: false (a PSD file's hidden layers come in hidden instead of being left out), importSlices?: true (a PSD file's slices become user slices over its canvas, with its layers or its merged image; slices the file generated automatically are left out, and slices that can't be read are left out with a warning), editingData?: true (default: an EPS, .ai or PDF that carries its editor's own copy of the art opens from it, with its layers, hidden objects, guides, artboards and the art outside them; a .ai or PDF whose type shows opens from its PDF part with textAs: outlines) | \"always\" (as true, and a .ai's editing copy is used even where it draws differently from its PDF part, which can be older; the warnings say so) | false (only what its page or PDF part prints, for print pipelines; a .ai saved without PDF compatibility then can't be opened), legacyNameEncoding?: windows-1252 (default) | macintosh | windows-949 (also euc-kr) | shift_jis | gbk | big5 (the code page names in the editing data of a .ai or an EPS are read in when they aren't UTF-8: layers, objects, artboards, colors, gradients, patterns, graphic styles, swatches, brushes, symbols, variables and data sets, and data sets' text values; warnings list the first three such names as read, and count the rest), colorMode?: rgb|cmyk (the mode the document opens in, its colours converted as file.documentColorMode does, through the profiles the document keeps after the color management policies of edit.colorSettings, grays? as there; default: the file's — a PDF keeps CMYK, Gray and spot inks (spot swatches at a tint) and opens in CMYK when painted mostly in CMYK), grays?: as file.documentColorMode, dxf?: {layout?: \"Model\" (default) | a paper layout's name (document.dxfInfo lists them), unit?, scale? (the ratio: 1 unit of the art = scale drawing units; default: the drawing at 1:1 in its own unit), fit?: false (scale to fit an artboard of fitTo?: [612, 792], turned to the art's orientation), scaleLineweights?: false (lineweights scale with the art), center?: true (false: the drawing's origin on the artboard's bottom-left corner; fitted art's bottom-left corner), mergeLayers?: false (all art on one layer)} (DXF), crop?: as cropTo (its older name), linkPages?: false (true: each page `pages` picks of a PDF or PDF-compatible .ai opens as a placed document linked to that page of the file, as file.place with link places one, on an artboard of its cropTo box (bounding: its art's bounds; a blank page: its crop box; a PDF-compatible .ai: its trim box for crop; on its trim box a page shows its bleed box round the artboard and gives the document its bleed), in a row 36 pt apart (on trim boxes, plus the bleed on both sides), and a layer named after the page; links.embed makes a page editable art; refused for any other file, without a path, with a password or with textAs: outlines; Save then asks for a name), profileChoice?: \"useEmbedded\"|\"convert\"|\"discard\" (the profile of the document's color mode is not the working space: keep it, convert that model's colors into the working space and take it off, or take it off and keep the numbers) | \"leave\"|\"assignWorking\"|\"assign\" (the document has no profile of its color mode: leave it untagged, tag it with the working space, or with assignProfile?: a profile of that model) (default: what the model's policy of edit.colorSettings does; a choice for the other case, or for a document tagged with the working space, is not used; the reply's profileChoice gives {issue: mismatch|missing, model, choice} when one was given for the document's question: it names the choice, not what it did, so \"convert\" from a profile that is not available keeps the profile and a warning says the colors were not converted; the desktop app asks for it when edit.colorSettings' askMismatchOpen or askMissingOpen is on, document.open never asks), importer?: \"plugin.\" (an importer plug-in's format id, see document.formats: it opens the file, which must have an extension it lists, also one a built-in format reads), params?: {…} (the importer's own parameters, see plugin.info)} → {index, title, format, warnings, restored, profileChoice?, missingLinks, modifiedLinks, updatedLinks: [{name, path, ids}]}; the color management policies of edit.colorSettings keep, take off or convert from the profiles the file is tagged with, their notes go to warnings, and a document they changed opens with unsaved changes; any readable format (see document.formats): .vectorcraft/.drawcraft, .svg/.svgz, .pdf/.ai, .ait, ASCII .dxf (each DXF layer with art a layer; blocks symbols; what can't come in is listed in warnings), PNG/JPEG/GIF/WebP/TIFF/BMP (an image opens as a document of its size at the resolution it declares, as file.place sizes it; 72 ppi, 1 px = 1 pt, when it declares none), .emf/.wmf (one artboard, the picture's frame; records VectorCraft doesn't read are skipped with one warning; a picture cut short by a reader limit, images and pattern brushes that can't be read, clips that can't be applied and raster operations other than a plain copy each add a warning), PICT .pct/.pic/.pict (QuickDraw versions 1 and 2, with or without the file's 512-byte header: one artboard, the picture's frame; shapes, lines and regions as paths, text as point type, bitmaps, pixel maps and QuickTime JPEG images as images; what isn't read is listed in warnings), HP-GL plot files .plt/.hpgl/.hgl/.hpg (one artboard round the art; what isn't drawn is listed in warnings), .eps and PostScript .ai (one artboard, the bounding box: an EPS file VectorCraft wrote restores the document it carries, restored: true; other files are read by a PostScript interpreter — paths, colours and spot inks, clips, gradients, images, type in the fonts named — and come in as their TIFF preview, with a warning, when their PostScript can't be read). A PDF/.ai/.ait or SVG saved with Preserve Editing restores the native document it carries (restored: true; a PDF only when no pages are picked), unless the file was changed elsewhere since or the data can't be read: then its artwork is imported and the first warning says why. Templates (native templates, .ait) open as a new untitled document; a restored .ai keeps its path (Save writes .ai again) and opens on the artboard its editing copy names as active. A file that no built-in format reads, by its content or its extension, opens with the installed importer plug-in that lists its extension (the one whose id sorts first, when several do): it is given the file, at most 128 MiB, and its objects become a new document whose artboard is their bounds; Save then asks for a name, and the warnings are the importer's. Linked images are read from their files (looked for at their path, then relative to the document): missing ones show their saved preview (links.relink), modified ones are read again only with Preferences › Update Links: Automatically (else links.update). An SVG's files (relative links from the SVG's folder) stay linked, SVG files become art, missing ones a placeholder in their box (a warning and missingLinks). An SVG's variable data (SVG Options › Include Variable Data, a variableSets element) gives the document its text variables and data sets, each text variable bound to the type object its docRef names, unless the SVG restores the native document; variable data variable.loadLibrary would refuse is left out with a warning", + "{path | name | dataBase64 (a file's path, or its name with its bytes), pages?: \"2-3, 5\" (PDF/.ai: 1-based, default all; one artboard each) | page?: n, cropTo?: bounding|art|crop (default)|trim|bleed|media (the box each artboard gets; bounding: the art's bounds; trim: the bleed box round it becomes the document's bleed, and the artboards are 36 pt apart plus that bleed on both sides; a PDF-compatible file whose first PDF page's PieceInfo holds, in itself or nested up to four dictionaries deep counting PieceInfo, a key starting with AIPrivateData or AIPDFPrivateData, when its pages are imported as editable art rather than its editing copy restored, opens on its trim boxes with cropTo and crop omitted and on its crop boxes with cropTo: crop, or crop: crop and no cropTo), password? (encrypted PDFs; see document.pdfInfo), textAs?: text (default: point type per line, lines wrapped in a frame as area type where they lay out the same, in the file's fonts by name; missing ones are listed in warnings) | outlines (glyph paths), layers?: true (default: optional content groups become layers with their visibility, print state and lock — art that is off comes in as a hidden layer; other art goes to a layer per page; a PSD file's layers become layers holding their pixels, with their names, visibility, opacity and blend modes, groups as layers of sublayers, layer masks as opacity masks, clipped layers and layers in blend modes VectorCraft doesn't have merged with the layers below) | false (one layer per page, without the art that is off; Save then asks for a name; a PSD file opens as its merged image), hiddenLayers?: false (a PSD file's hidden layers come in hidden instead of being left out), importSlices?: true (a PSD file's slices become user slices over its canvas, with its layers or its merged image; slices the file generated automatically are left out, and slices that can't be read are left out with a warning), editingData?: true (default: an EPS, .ai or PDF that carries its editor's own copy of the art opens from it, with its layers, hidden objects, guides, artboards and the art outside them; a .ai or PDF whose type shows opens from its PDF part with textAs: outlines) | \"always\" (as true, and a .ai's editing copy is used even where it draws differently from its PDF part, which can be older; the warnings say so) | false (only what its page or PDF part prints, for print pipelines; a .ai saved without PDF compatibility then can't be opened), legacyNameEncoding?: windows-1252 (default) | macintosh | windows-949 (also euc-kr) | shift_jis | gbk | big5 (the code page names in the editing data of a .ai or an EPS are read in when they aren't UTF-8: layers, objects, artboards, colors, gradients, patterns, graphic styles, swatches, brushes, symbols, variables and data sets, and data sets' text values; warnings list the first three such names as read, and count the rest), colorMode?: rgb|cmyk (the mode the document opens in, its colours converted as file.documentColorMode does, through the profiles the document keeps after the color management policies of edit.colorSettings, grays? as there; default: the file's — a PDF keeps CMYK, Gray and spot inks (spot swatches at a tint) and opens in CMYK when painted mostly in CMYK), grays?: as file.documentColorMode, dxf?: {layout?: \"Model\" (default) | a paper layout's name (document.dxfInfo lists them), unit?, scale? (the ratio: 1 unit of the art = scale drawing units; default: the drawing at 1:1 in its own unit), fit?: false (scale to fit an artboard of fitTo?: [612, 792], turned to the art's orientation), scaleLineweights?: false (lineweights scale with the art), center?: true (false: the drawing's origin on the artboard's bottom-left corner; fitted art's bottom-left corner), mergeLayers?: false (all art on one layer)} (DXF), crop?: as cropTo (its older name), linkPages?: false (true: each page `pages` picks of a PDF or PDF-compatible .ai opens as a placed document linked to that page of the file, as file.place with link places one, on an artboard of its cropTo box (bounding: its art's bounds; a blank page: its crop box; a PDF-compatible .ai: its trim box for crop; on its trim box a page shows its bleed box round the artboard and gives the document its bleed), in a row 36 pt apart (on trim boxes, plus the bleed on both sides), and a layer named after the page; links.embed makes a page editable art; refused for any other file, without a path, with a password or with textAs: outlines; Save then asks for a name), profileChoice?: \"useEmbedded\"|\"convert\"|\"discard\" (the profile of the document's color mode is not the working space: keep it, convert that model's colors into the working space and take it off, or take it off and keep the numbers) | \"leave\"|\"assignWorking\"|\"assign\" (the document has no profile of its color mode: leave it untagged, tag it with the working space, or with assignProfile?: a profile of that model) (default: what the model's policy of edit.colorSettings does; a choice for the other case, or for a document tagged with the working space, is not used; the reply's profileChoice gives {issue: mismatch|missing, model, choice} when one was given for the document's question: it names the choice, not what it did, so \"convert\" from a profile that is not available keeps the profile and a warning says the colors were not converted; the desktop app asks for it when edit.colorSettings' askMismatchOpen or askMissingOpen is on, document.open never asks), importer?: \"plugin.\" (an importer plug-in's format id, see document.formats: it opens the file, which must have an extension it lists, also one a built-in format reads), params?: {…} (the importer's own parameters, see plugin.info)} → {index, title, format, warnings, restored, profileChoice?, missingLinks, modifiedLinks, updatedLinks: [{name, path, ids}]}; the color management policies of edit.colorSettings keep, take off or convert from the profiles the file is tagged with, their notes go to warnings, and a document they changed opens with unsaved changes; any readable format (see document.formats): .vectorcraft/.drawcraft, .svg/.svgz, .pdf/.ai, .ait, ASCII .dxf (each DXF layer with art a layer; blocks symbols; what can't come in is listed in warnings), PNG/JPEG/GIF/WebP/TIFF/BMP (an image opens as a document of its size at the resolution it declares, as file.place sizes it; 72 ppi, 1 px = 1 pt, when it declares none), .emf/.wmf (one artboard, the picture's frame; records VectorCraft doesn't read are skipped with one warning; a picture cut short by a reader limit, images and pattern brushes that can't be read, clips that can't be applied and raster operations other than a plain copy each add a warning), PICT .pct/.pic/.pict (QuickDraw versions 1 and 2, with or without the file's 512-byte header: one artboard, the picture's frame; shapes, lines and regions as paths, text as point type, bitmaps, pixel maps and QuickTime JPEG images as images; what isn't read is listed in warnings), HP-GL plot files .plt/.hpgl/.hgl/.hpg (one artboard round the art; what isn't drawn is listed in warnings), .eps and PostScript .ai (one artboard, the bounding box: an EPS file VectorCraft wrote restores the document it carries, restored: true; other files are read by a PostScript interpreter — paths, colours and spot inks, clips, gradients, images, type in the fonts named — and come in as their TIFF preview, with a warning, when their PostScript can't be read). A PDF/.ai/.ait or SVG saved with Preserve Editing restores the native document it carries (restored: true; a PDF only when no pages are picked), unless the file was changed elsewhere since or the data can't be read: then its artwork is imported and the first warning says why. Templates (native templates, .ait) open as a new untitled document; a restored .ai keeps its path (Save writes .ai again) and opens on the artboard its editing copy names as active. A file that no built-in format reads, by its content or its extension, opens with the installed importer plug-in that lists its extension (the one whose id sorts first, when several do): it is given the file, at most 128 MiB, and its objects become a new document whose artboard is their bounds; Save then asks for a name, and the warnings are the importer's. Linked images are read from their files (looked for at their path, then relative to the document): missing ones show their saved preview (links.relink), modified ones are read again only with Preferences › Update Links: Automatically (else links.update). An SVG's files (relative links from the SVG's folder) stay linked, SVG files become art, missing ones a placeholder in their box (a warning and missingLinks). An SVG's variable data (SVG Options › Include Variable Data, a variableSets element) gives the document its text variables and data sets, each text variable bound to the type object its docRef names, unless the SVG restores the native document; variable data variable.loadLibrary would refuse is left out with a warning", always, load::open ), diff --git a/docs/mcp.md b/docs/mcp.md index 767651d8a6..49ca5789bb 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -1739,7 +1739,7 @@ unknown label is refused. The `warnings` of the result name the first three such Opening a PDF (or `.ai`) imports every page as an artboard and layer; `document.open` takes `pages` ("2-3, 5", 1-based), `cropTo` (`bounding` (the art's bounds), `art`, `crop` (default), `trim`, `bleed`, `media`: the box each artboard gets; -with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a PDF-compatible file whose first PDF page's `PieceInfo` holds a key, in `PieceInfo` itself or in a dictionary nested in it up to four dictionaries deep counting `PieceInfo`, that starts with `AIPrivateData` or `AIPDFPrivateData` opens on its trim boxes when `cropTo` and `crop` are omitted; when its pages are imported as editable art instead of from an editing copy (for example with a `pages` range or `editingData: false`), the default still gives the +with `trim` the bleed box round it becomes the document's bleed and the artboards are 36 pt apart plus that bleed on both sides, and a PDF-compatible file whose first PDF page's `PieceInfo` holds a key, in `PieceInfo` itself or in a dictionary nested in it up to four dictionaries deep counting `PieceInfo`, that starts with `AIPrivateData` or `AIPDFPrivateData` opens on its trim boxes when `cropTo` and `crop` are omitted and its pages are imported (restoring its editing copy uses the artboards that copy holds instead); when its pages are imported as editable art instead of from an editing copy (for example with a `pages` range or `editingData: false`), the default still gives the trim boxes, and a `crop` the caller names (`cropTo: "crop"`, or its alias `crop: "crop"`) gives its crop boxes, which take in whatever part of the bleed the file's crop box covers: all of it, part of it or none, depending on where the crop box and the bleed lie) and `password` for an encrypted file. For a `.ai` file with an intact Preserve Editing copy, `document.open` with only `cropTo: "crop"` restores the embedded document. `document.pdfInfo` reads a file without opening it: the page count, each page's size and boxes, `needsPassword`, and with `thumbnail: n` a PNG of page n. It reads a PostScript file (an EPS, a `.ps` file, a `.ai` in PostScript form) as one page the size of its bounding box (a US Letter page without one), with an