PDF import: open or place a PDF's text as outlines

The Import PDF and Place PDF dialogs have a new Text choice, Editable or
Outlines, which they send as the textAs param of document.open and
file.place. Outlines brings the text in as the glyph outlines the file
draws, so it looks the same on a computer that lacks the PDF's fonts.

The dialogs keep the choice in a new preference, Preferences > File
Handling > PDF Text (pdfTextAs, Editable by default). A PDF that opens,
or is placed embedded, without the dialog uses that preference when its
params give no textAs. The preference does not change how .ai and .ait
files open, or an open with linkPages. Outlines clears Import PDF pages
as links, and a linked place dims the choice: a linked page shows the
file's own text.

The three new strings have rows in every catalog.
This commit is contained in:
dotCooCoo
2026-11-19 06:22:55 -08:00
parent 2c68e74ad1
commit c50ff0e5b2
38 changed files with 396 additions and 18 deletions
+1
View File
@@ -404,6 +404,7 @@ pub const PREF_SPECS: &[PrefSpec] = &[
"Update Links",
choice(&[("automatically", "Automatically"), ("manually", "Manually"), ("askWhenModified", "Ask When Modified")])
),
p!("pdfTextAs", "File Handling", "Files", "PDF Text", choice(&[("text", "Editable"), ("outlines", "Outlines")])),
// Clipboard Handling
p!("copyAsSvg", "Clipboard Handling", "On Copy", "Include SVG Code", bool),
p!("copyAsPdf", "Clipboard Handling", "On Copy", "PDF", bool),
+6
View File
@@ -283,6 +283,11 @@ pub struct Prefs {
pub low_res_proxy_eps: bool,
pub anti_aliased_bitmaps: bool,
pub update_links: String,
/// PDF Text: what the text of a PDF, `.ai` or `.ait` file opened or placed from the app
/// becomes when the open or place does not say (`text`: editable type in the file's fonts;
/// `outlines`: the glyph outlines the file draws). The Import PDF dialog starts from it and
/// keeps the choice it confirms.
pub pdf_text_as: String,
// Clipboard Handling
pub copy_as_svg: bool,
pub copy_as_pdf: bool,
@@ -589,6 +594,7 @@ impl Default for Prefs {
low_res_proxy_eps: false,
anti_aliased_bitmaps: false,
update_links: s("askWhenModified"),
pdf_text_as: s("text"),
copy_as_svg: true,
copy_as_pdf: false,
copy_aicb: false,