mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-25 09:34:05 +00:00
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:
+8
-1
@@ -1565,7 +1565,12 @@ their stop opacity and stop where the shading doesn't extend. Text becomes point
|
||||
the file's font (by name; fonts that aren't available are listed in `warnings` and show in the fallback font, and
|
||||
every export that draws that type — PDF, EPS, EMF/WMF, raster images, SVG with outlined or embedded fonts — says in
|
||||
its `warnings` that it wrote the fallback font) — `textAs: "outlines"` keeps the glyph outlines the file draws instead
|
||||
(its embedded fonts, installed or not). Lines wrapped in a frame (each wrapped line ending in a space, sharing a left
|
||||
(its embedded fonts, installed or not). In the app, the Import PDF and Place PDF dialogs' Text choice (Editable or
|
||||
Outlines) sends `textAs`; for a PDF it starts from the `pdfTextAs` preference and OK keeps the choice there (a
|
||||
`.ai` or `.ait` file starts from Editable). Outlines clears
|
||||
Import PDF pages as links, and a linked place dims the choice: a linked page shows the file's own text. A PDF that opens
|
||||
or is placed embedded without the dialog (one page, or Show Import Options off) takes `pdfTextAs` when its params
|
||||
give no `textAs`; a `.ai` or `.ait` file, and an open with `linkPages`, open as their params say. Lines wrapped in a frame (each wrapped line ending in a space, sharing a left
|
||||
edge, font and leading) come back as one area type object, left aligned or justified, where laying it out breaks the
|
||||
lines where the file does; a stroke written as each glyph's outline stroked is the type object's stroke; glyphs set
|
||||
apart by gaps wider than a space keep their places. Strokes stay live strokes (width, cap, join, miter limit, dash and paint), and
|
||||
@@ -7913,6 +7918,8 @@ Printing / Exporting, `accurate` by default) does the same for RGB raster export
|
||||
Print as Bitmap: `rich` draws pure CMYK black as RGB black in the pixels; CMYK ink exports and the document's
|
||||
colours stay as they are. `antiAliasedBitmaps` (off by default;
|
||||
desktop app): in View › Pixel Preview, on softens placed and embedded bitmaps; off, their pixels stay hard-edged.
|
||||
`pdfTextAs` (Preferences › File Handling › PDF Text, `text` by default; `text` or `outlines`): what the text of a PDF
|
||||
opened or placed embedded from the app becomes when the open or place gives no `textAs` (see `document.open`).
|
||||
`disableAutoAddDelete` (off by default): on, the Pen no longer adds or deletes an anchor when a click lands on a
|
||||
segment or an anchor of a selected path.
|
||||
|
||||
|
||||
@@ -2297,6 +2297,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- 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 Import PDF and Place PDF dialogs have a Text choice, Editable or Outlines (VectorCraft's own option): Outlines opens or embeds a PDF's text as the glyph outlines the file draws, so it looks the same on a computer without its fonts. The choice is kept as Preferences › File Handling › PDF Text (`pdfTextAs`, Editable by default), which also applies to a PDF that opens or is placed embedded without the dialog. Outlines clears Import PDF pages as links, and a linked place dims the choice (`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`).
|
||||
|
||||
Reference in New Issue
Block a user