Import PDF: All checks Import PDF pages as links and Range clears it

File > Open's Import PDF dialog now starts with Import PDF pages as links
checked for All, so every page of a PDF opened from its file opens
linked, and clears the box when Range is picked, so a range opens as
art. A box checked or cleared by hand keeps that state until the other
of All and Range is picked; ui.dialog.set of allPages does the same.
The box stays clear for a file without its path, with a password, or
over the 256 MB that linkPages takes (fileio::pages_can_link).

Docs: docs/mcp.md, docs/target-app-parity.md, docs/file-format-parity.md.
This commit is contained in:
dotCooCoo
2026-11-17 09:30:55 -08:00
parent 36b5a5920c
commit 99cb4f4190
9 changed files with 116 additions and 17 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ pub use naming::{NameParts as FileNameParts, parse_date as parse_file_date, rend
pub(crate) use native::preview_png;
pub use native::with_compression_pref;
pub(crate) use pdfimport::opened_page_document;
pub use pdfimport::{LoadOptions, page_document};
pub use pdfimport::{LoadOptions, page_document, pages_can_link};
pub(crate) use psdlayers::import_active as psd_layers;
pub use psdlayers::{PsdInfo, info as psd_info};
pub(crate) use psdslices::over as psd_slices;
@@ -222,6 +222,13 @@ fn page_options(page: usize, o: &LoadOptions) -> ImportOptions {
ImportOptions { pages: Some(vec![page]), crop: o.crop, password: o.password.clone(), text_as: o.text_as, layers: false, ..Default::default() }
}
/// Whether `document.open`'s `linkPages` takes the file `name` holding `bytes`: a PDF or a
/// PDF-compatible `.ai` or `.ait` of at most [`document::MAX_FILE`] bytes. Its path, a password
/// and `textAs` are checked apart ([`linked_pages`]).
pub fn pages_can_link(name: &str, bytes: &[u8]) -> bool {
bytes.len() <= document::MAX_FILE && document::is_pdf(name, bytes)
}
/// `document.open` with `linkPages`: the pages `o` picks of the PDF (or PDF-compatible `.ai` or
/// `.ait`) `name`, read from `path`, as a document holding one placed document per page, linked to
/// that page of the file as File › Place with Link places one ([`document::source`]). Each page
@@ -410,3 +410,16 @@ fn a_placeholder_only_pdf_part_is_detected() {
assert!(open(&mut s, &two, json!({"pages": "1"})).is_err());
open(&mut s, &two, json!({})).unwrap();
}
/// `linkPages` takes a PDF up to the largest file placed, and nothing else.
#[test]
fn pages_can_link_a_pdf_up_to_the_largest_file_placed() {
let small = three_pages();
assert!(pages_can_link("pages.pdf", &small));
assert!(!pages_can_link("pages.svg", b"<svg xmlns=\"http://www.w3.org/2000/svg\"/>"));
let mut big = vec![0u8; crate::cmd::place::document::MAX_FILE + 1];
big[..small.len()].copy_from_slice(&small);
assert!(!pages_can_link("pages.pdf", &big), "over the limit");
big.pop();
assert!(pages_can_link("pages.pdf", &big), "at the limit");
}
+5 -1
View File
@@ -597,7 +597,8 @@ pub fn accepts_field(d: &Dialog, field: &str) -> bool {
/// Options setting set this way for several rows is sent to every row (Template also sets Lock
/// and Dim Images, as its checkbox does). A DXF Options preset set this way sets its fields, as
/// one picked from its menu does, and the preset it shows follows the DXF options set this way.
/// A Graph Data Column Width set this way sets every column, as Cell Style's does.
/// A Graph Data Column Width set this way sets every column, as Cell Style's does. An Import PDF
/// `allPages` set this way to the other pick sets Import PDF pages as links back to its default.
pub fn set_field(d: &mut Dialog, field: String, value: Value) {
if d.kind == brush_options::KIND {
brush_art_options::note_set(d, &field);
@@ -608,6 +609,9 @@ pub fn set_field(d: &mut Dialog, field: String, value: Value) {
if d.kind == layer_options::KIND {
layer_options::note_set(d, &field, &value);
}
if d.kind == import_pdf::KIND {
import_pdf::note_set(d, &field, &value);
}
if d.kind == "preferences" {
crate::prefs_dialog::note_set(d, &field, &value);
}
+40 -10
View File
@@ -3,7 +3,10 @@
//!
//! Fields: `mode` (`open` | `place`), `name`, `path?`, `pageCount`, `page` (the page shown, and the
//! one placed; 1-based), `allPages`, `range` and `linkPages` (open: Import PDF Pages as Links, for
//! a file read from a path and opened without a password), `cropTo` and `password`. `__locked` is set
//! a file read from a path and opened without a password; `null` until it is checked or cleared,
//! when it follows the pages picked: on for All, off for a range; picking the other of All and
//! Range sets it back to `null`; `__linkable` is false for a file `linkPages` does not take, such as
//! one over its size limit), `cropTo` and `password`. `__locked` is set
//! until the password is accepted: OK then unlocks the file, and with `__passwordOnly` (Place with
//! Show Import Options off) places its first page at once. `__place` keeps the other `file.place`
//! params (Link, Template, `at`…). The file's bytes stay out of the fields, in
@@ -144,10 +147,11 @@ pub fn offer(app: &mut VectorcraftApp, name: &str, bytes: &[u8], path: Option<St
"page": 1,
"allPages": true,
"range": "",
"linkPages": false,
"linkPages": null,
"cropTo": CropTo::default().id(),
"password": "",
"__locked": locked,
"__linkable": fileio::pages_can_link(name, bytes),
});
if let Some(p) = path {
fields["path"] = json!(p);
@@ -214,14 +218,40 @@ fn password(d: &Dialog) -> Option<String> {
}
/// Can the pages open linked: the file was read from a path (a linked page is read from its
/// file again) and opens without a password (`document.open`'s `linkPages` refuses one).
/// file again), `document.open`'s `linkPages` takes its size, and it opens without a password
/// (`linkPages` refuses one).
fn can_link(d: &Dialog) -> bool {
d.fields.get("path").and_then(Value::as_str).is_some() && password(d).is_none()
d.fields.get("path").and_then(Value::as_str).is_some() && d.bool("__linkable") && password(d).is_none()
}
/// Import PDF Pages as Links as checked or cleared, or, when it is `null`, as the pages picked
/// default it: on for All, off for a range.
fn link_pages(d: &Dialog) -> bool {
d.fields.get("linkPages").and_then(Value::as_bool).unwrap_or_else(|| d.bool("allPages"))
}
/// Import PDF Pages as Links is checked, and can be.
fn links_on(d: &Dialog) -> bool {
d.bool("linkPages") && can_link(d)
pub(super) fn links_on(d: &Dialog) -> bool {
link_pages(d) && can_link(d)
}
/// Picks All (true) or Range. A change of pick sets Import PDF Pages as Links back to that pick's
/// default; picking the one already picked keeps the box as it is.
fn pick_all_pages(d: &mut Dialog, all: bool) {
if d.bool("allPages") != all {
d.fields.insert("allPages".into(), json!(all));
d.fields.insert("linkPages".into(), Value::Null);
}
}
/// Records that `ui.dialog.set` sets `field` to `value`: a change of `allPages` sets Import PDF
/// Pages as Links back to its default, as a click on All or Range does.
pub(super) fn note_set(d: &mut Dialog, field: &str, value: &Value) {
if field == "allPages"
&& let Some(all) = value.as_bool()
{
pick_all_pages(d, all);
}
}
/// OK: unlock the file with the password, else open the pages or place the page.
@@ -330,20 +360,20 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool {
ui.label(egui::RichText::new(tl!("Pages")).color(t.text));
let all = d.bool("allPages");
if widgets::radio(ui, tl!("All"), all, true) {
d.fields.insert("allPages".into(), json!(true));
pick_all_pages(d, true);
}
ui.horizontal(|ui| {
if widgets::radio(ui, tl!("Range:"), !all, true) {
d.fields.insert("allPages".into(), json!(false));
pick_all_pages(d, false);
}
if super::form::text_edit_named(ui, d, "range", tl!("Range:"), 90.0).gained_focus() {
d.fields.insert("allPages".into(), json!(false));
pick_all_pages(d, false);
}
});
widgets::dim_label(ui, tl!("e.g. 1-3, 5"));
ui.add_space(10.0);
if widgets::check(ui, tl!("Import PDF pages as links"), links_on(d), can_link(d)) {
d.fields.insert("linkPages".into(), json!(!d.bool("linkPages")));
d.fields.insert("linkPages".into(), json!(!link_pages(d)));
}
}
});
+44 -2
View File
@@ -95,12 +95,19 @@ fn import_pdf_pages_as_links_opens_each_page_linked() {
let path = dir.join("three.pdf").to_string_lossy().into_owned();
std::fs::write(&path, three_pages()).unwrap();
let mut app = app();
// All pages: checked without a click.
io::open_bytes(&mut app, &path, &three_pages(), Some(path.clone())).unwrap();
assert_eq!(field(&app, "linkPages"), false, "off by default");
frame(&mut app);
set(&mut app, "linkPages", json!(true));
confirm(&mut app).unwrap();
assert!(app.ui.dialog.is_none());
assert_eq!(artboard_widths(&app), [100.0, 200.0, 300.0]);
assert_eq!(placed_pages(&app), [true, true, true], "All opens the pages linked");
// A range: cleared, and checked by hand it opens the range linked.
io::open_bytes(&mut app, &path, &three_pages(), Some(path.clone())).unwrap();
set(&mut app, "allPages", json!(false));
set(&mut app, "range", json!("1, 3"));
assert!(!import_pdf::links_on(app.ui.dialog.as_ref().unwrap()), "Range: cleared");
set(&mut app, "linkPages", json!(true));
frame(&mut app);
confirm(&mut app).unwrap();
assert!(app.ui.dialog.is_none());
@@ -124,6 +131,41 @@ fn import_pdf_pages_as_links_opens_each_page_linked() {
assert_eq!(placed_pages(&app), [false, false]);
}
/// Picking All checks Import PDF pages as links and picking Range clears it. A click on the box
/// stands until the other one is picked; picking the one already picked or editing the range keeps
/// it. `ui.dialog.set` picks the way the buttons do.
#[test]
fn picking_all_or_a_range_sets_the_links_default() {
let mut app = app();
io::open_bytes(&mut app, "three.pdf", &three_pages(), Some("/tmp/three.pdf".into())).unwrap();
let pick = |app: &mut VectorcraftApp, k: &str, v: serde_json::Value| set_field(app.ui.dialog.as_mut().unwrap(), k.into(), v);
let on = |app: &VectorcraftApp| import_pdf::links_on(app.ui.dialog.as_ref().unwrap());
assert!(on(&app), "All: checked");
pick(&mut app, "allPages", json!(false));
assert!(!on(&app), "Range: cleared");
pick(&mut app, "linkPages", json!(true));
pick(&mut app, "allPages", json!(false));
pick(&mut app, "range", json!("1-2"));
frame(&mut app);
assert!(on(&app), "checked by hand, picking Range again and editing the range keep it");
pick(&mut app, "allPages", json!(true));
assert!(on(&app), "All: checked");
pick(&mut app, "linkPages", json!(false));
pick(&mut app, "allPages", json!(true));
frame(&mut app);
assert!(!on(&app), "cleared by hand, picking All again keeps it");
pick(&mut app, "allPages", json!(false));
pick(&mut app, "allPages", json!(true));
assert!(on(&app), "All picked after Range: checked again");
// A file `linkPages` does not take (one over its size limit) leaves the box clear.
assert_eq!(field(&app, "__linkable"), true);
set(&mut app, "__linkable", json!(false));
assert!(!on(&app), "a file linkPages does not take");
// A file given without its path can't link its pages: the box stays clear.
io::open_bytes(&mut app, "three.pdf", &three_pages(), None).unwrap();
assert!(!on(&app));
}
#[test]
fn single_page_pdfs_open_directly() {
let mut app = app();
+1 -1
View File
@@ -315,7 +315,7 @@ Gradient meshes in the editing data keep each point's own color where a patch's
| VectorCraft `.vectorcraft` / `.vctemplate` | — | yes | yes | lossless JSON, versioned, save down to v1; property-tested round trips (`format/tests/prop_format.rs`); documents with a lot of path data are written as compact JSON, about a fifth of the size (#1492); a save falls back to a plain fsync and to writing elsewhere and copying in when the folder refuses the usual steps (#1625, #1649, part of #1620; not confirmed on a real network share); the size limits on embedded data also apply to files read from memory (#1783), and saving over a private file on Unix leaves no readable temporary copy beside it (#1778); a dynamic symbol's type (`dynamic` on the symbol) and an instance's appearance changes to its art (`symbol_overrides`, each path at most 64 deep, counted against the object budget) are written only when set, so documents without them save as before (#4938) |
| Illustrator template `.ait` | open, save | yes | PDF-compatible only, from Save as Template (`.vctemplate` stays its default) | New from Template opens a saved `.ait` untitled with its layers and art (`tests_pdfedit.rs`) |
| Illustrator `.ai` | open, save | yes (PDF-compatible + editing-data structure with template layers and ruler guides, File Info) | PDF-compatible, or legacy version 7 (layers and groups) | see above; no real-file corpus |
| PDF | open, place, save | yes (authored ActualText in editable import, #6165; layers, masks, editable text, security, overprint, File Info from the XMP packet and the document information dictionary; Crop To › Trim takes the bleed box as the document's bleed; Import PDF pages as links opens each page as a placed document linked to it, on its own artboard, `tests/placed_document.rs`) | yes (presets, PDF/X-1a/3/4, layers, marks and bleed, ICC, fast web view, 1.3+; objects' URLs as link annotations, not in PDF/X) | fuzzed import; shared guarded writer and windowed reader ([pdf-backend.md](pdf-backend.md)), metadata, incomplete-content and dependency-source regressions; PDF text opens where the file draws it, glyph by glyph (#722: kerning or none, spacing per character, text rise as baseline shift, vertical writing, justified text boxes); alpha soft masks drawn as images import with the mask (#1551); a clip only counts as covering the page when its shape does (#1542); a PDF another app copied pastes as editable vector art (#1499); letter-spaced type on a path keeps its length and its glyph-by-glyph stroke comes in as one text object (#1586, #1585); a crafted name tree with shared nodes no longer takes exponential time on open (#1781); fonts named with hyphens (`Noto-Sans-Bold`) or with a composite font's CMap (`Name-Identity-H`) find the installed family; invisible text (rendering mode 3: a scanned page's recognized text) opens as type with no fill or stroke and saves back as invisible, searchable text (#2675); PDF/X-1a and X-3 flattening in a CMYK document keeps CMYK inks where it rasterizes (#2160); an image mask (`/ImageMask true`) painted in a solid color opens as a grayscale image colorized by that color, a spot color keeping its swatch and tint, so Fill and Recolor Artwork reach it, and the same mask painted again in another color keeps that color (#6313); an image in a Separation space opens as a grayscale image of its tints colorized by its ink at 100 % (a spot swatch, a process plate or Registration), its soft mask as its opacity mask (#6314); a DeviceN image of one colorant opens the same way, and one of process plates only (the ink `None` may be among them) opens in CMYK with each colorant's tint in its plate (#6348) PDF export keeps harakat and zero-advance Noto Arabic dot glyphs in one compatible batch per layout line, with per-glyph vertical offsets (#6309). `crates/pdf/src/tests/realtext.rs` (`mark_text_*`) checks decoded cluster mappings, mixed Arabic/Latin/digits, contour placement against outline export, vertical columns, differing path rotations and PDF/X-1a/3/4. Editable-text import preserves authored ActualText separately (#6165), with cross-line/style layout limits; separately styled or differently rotated clusters and external viewer search/copy remain outside this export-only evidence. |
| PDF | open, place, save | yes (authored ActualText in editable import, #6165; layers, masks, editable text, security, overprint, File Info from the XMP packet and the document information dictionary; Crop To › Trim takes the bleed box as the document's bleed; Import PDF pages as links opens each page as a placed document linked to it, on its own artboard, `tests/placed_document.rs`, and is checked when All is picked and cleared when Range is picked) | yes (presets, PDF/X-1a/3/4, layers, marks and bleed, ICC, fast web view, 1.3+; objects' URLs as link annotations, not in PDF/X) | fuzzed import; shared guarded writer and windowed reader ([pdf-backend.md](pdf-backend.md)), metadata, incomplete-content and dependency-source regressions; PDF text opens where the file draws it, glyph by glyph (#722: kerning or none, spacing per character, text rise as baseline shift, vertical writing, justified text boxes); alpha soft masks drawn as images import with the mask (#1551); a clip only counts as covering the page when its shape does (#1542); a PDF another app copied pastes as editable vector art (#1499); letter-spaced type on a path keeps its length and its glyph-by-glyph stroke comes in as one text object (#1586, #1585); a crafted name tree with shared nodes no longer takes exponential time on open (#1781); fonts named with hyphens (`Noto-Sans-Bold`) or with a composite font's CMap (`Name-Identity-H`) find the installed family; invisible text (rendering mode 3: a scanned page's recognized text) opens as type with no fill or stroke and saves back as invisible, searchable text (#2675); PDF/X-1a and X-3 flattening in a CMYK document keeps CMYK inks where it rasterizes (#2160); an image mask (`/ImageMask true`) painted in a solid color opens as a grayscale image colorized by that color, a spot color keeping its swatch and tint, so Fill and Recolor Artwork reach it, and the same mask painted again in another color keeps that color (#6313); an image in a Separation space opens as a grayscale image of its tints colorized by its ink at 100 % (a spot swatch, a process plate or Registration), its soft mask as its opacity mask (#6314); a DeviceN image of one colorant opens the same way, and one of process plates only (the ink `None` may be among them) opens in CMYK with each colorant's tint in its plate (#6348) PDF export keeps harakat and zero-advance Noto Arabic dot glyphs in one compatible batch per layout line, with per-glyph vertical offsets (#6309). `crates/pdf/src/tests/realtext.rs` (`mark_text_*`) checks decoded cluster mappings, mixed Arabic/Latin/digits, contour placement against outline export, vertical columns, differing path rotations and PDF/X-1a/3/4. Editable-text import preserves authored ActualText separately (#6165), with cross-line/style layout limits; separately styled or differently rotated clusters and external viewer search/copy remain outside this export-only evidence. |
| EPS | open, place, save | yes (own PostScript L3 interpreter, Illustrator EPS editing data structure) | yes (L2/L3, TIFF previews) | CIDFonts the file doesn't carry not drawn, but for those over a predefined CMap (`UniJIS-UCS2-H`, `90ms-RKSJ-H`, `GBK-EUC-H`, `KSCms-UHC-H`, `ETen-B5-H`), set as type in the font of the CIDFont's name, vertical over a `-V` CMap; a name that ends in the row-and-cell CMap `H` or `V` splits off the CMap only when the file defines the CIDFont of that name, the CIDFont is `Ryumin-Light` or `GothicBBB-Medium` (the Japanese CIDFonts a printer carries), or the name has a hyphen and an installed face that covers Japanese has it; name-keyed fonts in a FontSet set as type by name; #505; images encoded with `CCITTFaxDecode` (ITU-T T.4 Group 3 and T.6 Group 4, with `K`, `Columns`, `Rows`, `EndOfBlock`, `EndOfLine`, `EncodedByteAlign` and `BlackIs1`) draw, and damaged data keeps the rows decoded before its first damaged row; Type 42 (TrueType) fonts set type at its size (#1553); an embedded Type 1 font's encrypted part is read for its glyphs, which space its type, outline it and draw glyphs without a character, in plain and composite fonts; a Type 42 font that carries its TrueType font gives each code its character by its glyph name or, for names that say nothing (`/g12`), by the glyph's entry in the font's own character map, spaces its type by its own widths and draws glyphs that stand for no character from its outlines; the show operators' spacing along the baseline (`ashow`, `widthshow`, `xshow`, `yshow`, `xyshow`, and the moves of `kshow`'s procedure, run between each two characters) is kept on live type as tracking, so type in a font that isn't installed keeps the file's line lengths (spacing that moves characters off the baseline, as `yshow`, `xyshow` or a `kshow` procedure can, places each character as its own text object); composite (Type 0) fonts with the 8/8 mapping, as PDF-to-PostScript converters write two-byte fonts, draw a Type 42 descendant's glyphs from the TrueType outlines it carries and an embedded Type 1 descendant's from its charstrings, and set other descendants' characters as type at the composite font's size (other mappings are still set as type in the font of their name); CID-keyed fonts (`composefont`, `FMapType` 9 over a CMap built with the CIDInit operators or `Identity-H`/`Identity-V`; `bfchar` and `bfrange` mappings give a base-font descendant its codes or glyph names) draw the glyphs of the Type 0 CIDFonts (Type 1 charstrings in their `StartData` binary data or `GlyphDirectory`) and Type 2 CIDFonts (TrueType glyphs through `CIDMap`) they carry, and the CID-keyed fonts of a FontSet's Compact Font Format data (Type 2 charstrings); a clip only counts as covering the page when its shape does (#1542); an EPS another app copied pastes as editable vector art (`clipboard.importEps`, #1499); a stitched shading keeps its hard colour changes on import (#1654); sampled functions (type 0) interpolate between their samples, multilinearly or by cubics with `Order 3`, and a sampled axial or radial gradient has a stop at each sample; a gradient the page paints as a row of abutting one-colour strips (as Level 2 writers draw smooth shades) imports as one linear gradient, without the seams the strips leave when each is drawn alone; CMYK images, CMYK JPEGs included, keep their ink amounts on import, as from PDF, and the pixels a `MaskColor` or `ImageType 3` mask hides become a grayscale opacity mask; ruzstd 0.9.1 for compressed editing data (#1807, RUSTSEC-2026-0344) |
| PostScript `.ps` | open, place | yes (the EPS reader reads its first page; `.epsf` files open and place as EPS) | via Print to PostScript | `tests_epsimport.rs` |
| DCS 1.0 / 2.0 | place linked | place linked only (one image of the plates; spot plates as spot swatches; the composite's clipping path; each plate on its own ink in Separations Preview and print separations) | no | `crates/eps/src/dcs/tests.rs`, `crates/engine/src/tests/dcs.rs` |
+4 -2
View File
@@ -1439,9 +1439,11 @@ a layer named after the page (`Page 2`). A PDF-compatible `.ai` with `cropTo: "c
when it opens as art. 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.
page, and `links.embed` makes a page editable art. The command's `linkPages` defaults to false; the dialog checks the
box when All is picked and clears it when Range is picked, for a file it can link, and `ui.dialog.set` of `allPages`
does the same. A box checked or cleared by hand keeps that state until the other of All and Range is picked.
`document.open` refuses `linkPages` for a file that is not a PDF or a PDF-compatible `.ai`, for a file given as
`dataBase64` without a path, with a `password`, and with `textAs: "outlines"`, and rejects a `linkPages` that is not
`dataBase64` without a path, with a `password`, with `textAs: "outlines"` and for a file over 256 MB, and rejects a `linkPages` that is not
true or false. Save then asks for a name.
`document.open`, `file.place` and `document.pdfInfo` reject a `cropTo`, `crop`, `password`, `colorMode` or `textAs`
that is not a string, and `document.pdfInfo` rejects a `thumbnailSize` that is not a number. The error names the param,
+1
View File
@@ -2059,6 +2059,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
- Placed documents: File › Place of a `.vectorcraft` file links to it by default (`file.place`'s `link`): one locked object showing an artboard of the document (or its art's bounds), read the way placing it without Link reads it, its symbols, patterns and images kept apart from the document's; without Link (or from bytes, not a file) it is an editable copy as before. It stays vectors in every output (SVG, PDF, EPS, EMF, DXF), and so do placed documents inside it, read from their own files up to 8 levels deep (documents that place each other stop there). On screen they draw from bitmaps cached per file and zoom step, shared by every copy and made in the background (a placeholder until ready), so a sheet of them redraws in about a millisecond; exports and prints draw them exactly. Like linked images, a save keeps only a preview of each (JPEG when opaque) unless Include Linked Files; output, and zooming past the preview, read the file again, falling back to the preview with a warning when it is gone or changed. Saves for older versions write them as plain art. Links check, update, relink, Update Links on open, Link Info (the artboard's size), Placement Options, Break Link (also Embed, Object › Expand: the editable copy placing without Link gives, its resources joining the document), Edit Original (the document in a new tab) and the Links panel cover them; saving a document updates the open documents that place it. The native format (v4) keeps data of 8 KB or more after the JSON instead of base64 in it.
- Placed documents' bitmaps on screen: when a bitmap made in the background is ready, the desktop app renders the canvas again only where the objects that show its file are, when the frame shown was rendered on the UI thread and that part is at most half the canvas. Bitmaps drawn or made since a frame began are kept for that frame past the 512 MiB budget, up to 2 GiB, so a view showing more than the budget does not make them again in every frame. A bitmap that would take them past 2 GiB is not kept, and its file draws exactly at that zoom. A bitmap that can't be made (the file can't be read and there is no preview) shows the light placeholder and is not asked for again. Each ready bitmap used to render the whole canvas again, and bitmaps past the budget and bitmaps that could not be made were asked for again in every frame (`crates/render/src/tests/placed_document.rs`).
- Linked PDF and `.ai` pages: File › Place with Link (the default) places a page of a PDF, `.ai` or `.ait` file read as PDF pages as a placed document, as it links an image, the page and its box (`crop`) kept with the link: Links check, update and relink it, Break Link and Object › Expand give the group placing it without Link gives, every output draws the page's vectors, and Package copies the file. Without Link, or with a password or `textAs: "outlines"`, the page is embedded. An EPS file, a PostScript file or a PostScript `.ai` placed from a file with Link is a placed document the same way, showing the art placing it without Link gives (clipped to its bounding box, or its art's bounds with `crop: "bounding"`); Links lists it as `EPS` or `PostScript`, and a save, Package, Break Link and Object › Expand treat it as they treat a placed PDF page. Package also copies the files that the native document of an EPS file written by VectorCraft links, beside the EPS file's copy, which finds them there by name. Placing one keeps the file linked rather than embedding it, as [the help page](https://helpx.adobe.com/illustrator/desktop/add-and-import-files/import-other-file-types/eps-and-dcs-file-import-in-illustrator.html) describes; a DCS file stays a linked image (`crates/engine/src/tests/placed_document.rs`, `crates/engine/src/tests/package.rs`).
- File › Open's Import PDF dialog checks Import PDF pages as links when All is picked and clears it when Range is picked: every page of a PDF opened from its file opens linked unless the box is cleared, and a range of pages opens as art unless the box is checked ([the help page](https://web.archive.org/web/20210601162814/https://helpx.adobe.com/pdf/illustrator_reference.pdf#page=444)). A box checked or cleared by hand keeps that state until the other of All and Range is picked; picking the one already picked, or editing the range, does not change it, and `ui.dialog.set` of `allPages` changes it as the buttons do (VectorCraft's own rules). A file opened without its path, with a password or over the 256 MB that linked pages take still opens its pages as art. The box used to start cleared for All as well (`crates/ui-egui/src/dialogs/tests_import_pdf.rs`).
- The place cursor keeps an encrypted PDF, `.ai` or `.ait` file, at a letter page's size (VectorCraft's own size) and without a thumbnail, and a click or drag on it asks for its password, with the Place dialog's Show Import Options on or off; such a file was left out of the cursor before (`crates/engine/src/tests/place.rs`, `crates/ui-egui/src/tests/place.rs`).
- File › Place with Bounding Box (`file.place {crop: "bounding"}`) measures the art that shows, with its strokes and effects, as an export does: hidden objects, guides and template layers do not count, a group whose only part on the page or artboard is hidden is not placed, and symbol instances are measured by their art, for `at`, `rect`, the place cursor and `file.place.info` (`crates/engine/src/tests/place.rs`).
- The Place dialog has a Show Import Options checkbox after Link, Template and Replace ([Place multiple files in a document](https://helpx.adobe.com/illustrator/desktop/add-and-import-files/import-other-file-types/place-multiple-files-in-a-document.html)). On (VectorCraft's default, saved with the preferences), each PDF, DXF or text file asks for its import options before it is placed, also in the place cursor; off (`file.place {showImportOptions: false}`), it is placed with the options last confirmed for its format, and only an encrypted PDF asks, for its password. Text Import Options now starts from the options confirmed last (`crates/ui-egui/src/tests/place.rs`).