Commit Graph
938 Commits
Author SHA1 Message Date
BFlat e63768c862 Merge pull request #8425 from dotCooCoo/fix/action-batch-step-numbers
Actions: action.batch errors count steps from 1 and name the member they reject
2026-11-18 13:05:15 +07:00
BFlat 20c753472f Merge pull request #8421 from dotCooCoo/perf/metafile-artboards-bake-once
EMF/WMF: Use Artboards applies live effects once for all artboards
2026-11-18 12:59:42 +07:00
BFlat 7bcd7b62d2 Merge pull request #8443 from dotCooCoo/perf/dxf-artboards-bake-once
DXF: Use Artboards applies live effects once for all the drawings
2026-11-18 12:58:53 +07:00
BFlat 10b2d14d1b Merge pull request #8342 from dotCooCoo/fix/issue-1954
Fix #1954: PDF/X CMYK in the output intent's profile is written as DeviceCMYK
2026-11-18 12:57:50 +07:00
BFlat 17e1aa67e1 Merge pull request #8362 from dotCooCoo/feat/place-pdf-link-default
Import PDF: All checks Import PDF pages as links and Range clears it
2026-11-18 12:57:32 +07:00
BFlat 2b91d93b8e Merge pull request #8118 from dotCooCoo/fix/confined-native-image-paths
MCP: confined native output refuses linked and data set image paths outside the read roots and leaves out an export folder outside them
2026-11-18 10:14:58 +07:00
BFlat 1124cb3107 Merge pull request #8081 from dotCooCoo/fix/issue-8034
Fix #8034: Other Library… brings a .ai library's pattern swatches with their patterns
2026-11-18 10:14:47 +07:00
dotCooCoo 336cde15fe Merge main into fix/action-batch-step-numbers 2026-11-17 16:21:50 -08:00
dotCooCoo 7fc76a7397 Merge main into perf/metafile-artboards-bake-once 2026-11-17 13:42:00 -08:00
dotCooCoo 513b4aefaa Merge main into fix/issue-1954 2026-11-17 13:17:24 -08:00
dotCooCoo 88b5da22bc DXF: Use Artboards applies live effects once for all the drawings
DXF export with Use Artboards baked the whole document's live effects
and placed symbol art again for every artboard. export_drawings now
checks the options and every region, bakes once, and writes each
drawing from the same baked document. export calls it with one drawing,
and the encoder makes one call for all the chosen artboards. Each
drawing's bytes, linked images, warnings and setting notes are the same
as before; the tests compare them with drawings baked one at a time.
2026-11-17 12:46:29 -08:00
BFlat ee60c51fd9 Merge pull request #8323 from dotCooCoo/fix/psd-cmyk-placement
Fix #8316: preserve CMYK PSD images when placed or relinked
2026-11-18 03:23:55 +07:00
BFlat 1f84febb08 Merge pull request #8169 from dotCooCoo/fix/symbol-lookup-index
Symbols: render and SVG/PDF export find each instance's symbol in one index
2026-11-18 03:23:44 +07:00
BFlat aab753f4f2 Merge pull request #7819 from dotCooCoo/feat/textures-map-art-and-shading
Export 3D Object: mapped graphics export as textures of their faces
2026-11-18 03:23:34 +07:00
BFlat a18fef053f Merge pull request #8288 from dotCooCoo/fix/metafile-loss-warnings
Metafile import: warn about images, clips and raster operations the reader leaves out
2026-11-18 03:22:29 +07:00
dotCooCoo 4a60b78b5c Actions: action.batch errors count steps from 1 and name the member they reject
action.batch refused a bad step before any file opened as `commands[i]`,
counted from 0, while a step that failed as it ran was named
`action step N (`id`)`, counted from 1. A step whose params its command
refused gave only the command's own error, without saying which step it
was.

- The checks before the batch (no command, an unknown command, a nested
  batch, prefs.import) now name the step as `action step N (`id`) failed:`,
  from 1, as the runtime errors do. A long unknown id is cut short in the
  message, as an unknown key is.
- The parameter check names the action.batch step whose params it
  refuses the same way. command.batch keeps passing the step's error on
  as it is.
- Override Open matches only document.open, and Override Save only
  document.save and file.saveAs: file.open, file.save and document.close
  are not engine commands, and a step with one is refused as unknown.
  The params text no longer lists them, and docs/mcp.md says a step with
  file.open or file.save is refused as an unknown command.
2026-11-17 12:09:17 -08:00
dotCooCoo 0febd204d7 EMF/WMF: Use Artboards applies live effects once for all artboards
An EMF or WMF export with Use Artboards applied the document's live
effects (geometry effects, and symbol art with effects) once for each
chosen artboard. vectorcraft_metafile::export_regions now checks every
region, applies the effects once and writes one metafile per region.
export is its one-region case, and the engine's encode calls
export_regions once for all chosen artboards. Each file's bytes and
warnings are unchanged.
2026-11-17 11:56:35 -08:00
dotCooCoo 99cb4f4190 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.
2026-11-17 09:30:55 -08:00
BFlat 36b5a5920c Merge pull request #8098 from el-j/feat/save-pdf-transparency-confirmation-8097
Fix #8097: Save PDF: show flattener rasterization resolutions in Summary warning and Advanced section
2026-11-17 22:38:24 +07:00
dotCooCoo 12977ec543 Fix #1954: PDF/X CMYK in the output intent's profile is written as DeviceCMYK
A PDF/X-3 or PDF/X-4 export tagged every CMYK color with an ICC-based
space of the same profile that the output intent embeds. In PDF/X-3 and PDF/X-4, CMYK colors in the
profile of a CMYK output intent are now DeviceCMYK, and the profile is
written once, as the output intent's DestOutputProfile (ISO 32000-1,
14.11.5:
https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#page=641).

- With output.profiles none and a CMYK output intent, PDF/X-3 and PDF/X-4
  write every CMYK color as DeviceCMYK, unless colors are converted to a
  CMYK destination of another profile, which keeps its tag. Before, those
  standards tagged every color whatever profiles said.
- RGB and gray colors stay tagged, and so do CMYK colors and images in
  another profile.
- A CMYK image that carries the output intent's profile is DeviceCMYK,
  and so is every CMYK image when none makes CMYK colors DeviceCMYK. A
  CMYK JPEG then loses its ICC_PROFILE segments.
- Transparency groups blend in DeviceCMYK when CMYK colors are
  DeviceCMYK, also when the file has no ICC-based CMYK space.
- Files without a standard keep the tags that profiles asks for.
- The Save PDF dialog's note for PDF/X-3 and PDF/X-4 says that CMYK
  colors in the output intent's profile are written as DeviceCMYK.

Docs: docs/mcp.md, docs/target-app-parity.md and the document.exportPdf
params text.
2026-11-17 07:30:22 -08:00
dotCooCoo cce26edfa0 Merge main into fix/metafile-loss-warnings
# Conflicts:
#	Cargo.toml
2026-11-17 07:25:38 -08:00
dotCooCoo badaf937e3 Fix #8316: preserve native CMYK PSD composites 2026-11-17 06:19:51 -08:00
el-j 5665114718 Save PDF: include flattener resolutions in Summary warning and Advanced section 2026-11-17 15:00:11 +01:00
BFlat b506bdc525 Merge pull request #8228 from dotCooCoo/feat/webp-lossy-quality
WebP: Lossy with a Quality setting writes a lossy WebP file
2026-11-17 11:45:05 +07:00
dotCooCoo 950d54e843 Metafile import: name pattern brushes in the unread-image warning and list the new warnings
The reader also counts pattern brushes, a pen's included, whose bitmap
it could not read, so the warning now says "image or pattern brush".
The document.open and clipboard.importEmf params text, docs/mcp.md and
the crate doc list the new warnings. A WMF test covers an unreadable
pattern brush and a DSTINVERT bit block transfer.
2026-11-16 20:42:13 -08:00
BFlat 2d393d8a8a Merge pull request #8094 from el-j/fix/pdfx-transparency-reduction-6861
Fix #6861: Automated transparency reduction for PDF/X and PDF 1.3
2026-11-17 09:45:49 +07:00
dotCooCoo 6dae0b77e5 Merge main into feat/webp-lossy-quality 2026-11-16 17:39:20 -08:00
BFlat 5232789973 Merge pull request #8076 from dotCooCoo/fix/export-screens-pdf-bleed
Export for Screens: Include Bleed keeps a PDF page's TrimBox at the artboard
2026-11-17 08:20:09 +07:00
el-j 7194204871 Address review comments: reuse clear_transparency helper and run layer normalization only without transparency 2026-11-17 01:04:57 +01:00
el-j a0edcf73c4 Merge remote-tracking branch 'upstream/main' into fix/pdfx-transparency-reduction-6861 2026-11-17 00:42:30 +01:00
dotCooCoo 2f7e60dd54 WebP: Lossy with a Quality setting writes a lossy WebP file
WebP Options has a Compression menu (Lossless, Lossy) and a Quality
slider from 0 to 100 that is enabled for Lossy. document.export,
document.serialize and Export for Screens take lossless: false with
quality (default 90) and write a VP8 file, with an ALPH chunk that keeps
the alpha exactly when some pixels are not opaque. Lossless stays the
default. A WebP quality above 100, or one that is not a whole number,
is refused with an error.

The encoder is the one craft-image-codecs already provides; no
dependency changes. The note that lossy WebP isn't available, its
catalog rows and the format text that described it are removed.
2026-11-16 12:30:56 -08:00
BFlat 5190f99c6c Merge pull request #8173 from dotCooCoo/fix/editing-data-fallback-says-why
.ai import: a refused PDF part's error says why the editing data couldn't be read
2026-11-17 02:50:01 +07:00
dotCooCoo 3dedd7ca56 Merge main into fix/symbol-lookup-index 2026-11-16 10:57:10 -08:00
dotCooCoo ad2572734c Merge main into fix/issue-8034 2026-11-16 10:49:56 -08:00
dotCooCoo f5f22bd6be Export for Screens: a saved PDF preset row with no bleed and one asking for the document's write one file
Under Include Bleed, a PDF row that sets no bleed now keeps the bleed values a saved PDF preset writes out and turns on useDocument, instead of replacing the whole bleed object. Its file key then matches a row of the same preset that asks for the document's bleed, so the two rows write one PDF.
2026-11-16 09:18:23 -08:00
dotCooCoo 1143546a0a Symbols: keep per-object measuring in the export walks; live walks and SVG import use the index
The export walks for type and fonts and the artboard crop shared one
SymbolBoxes for every object. A SymbolBoxes also holds measuring budgets
(effect reaches, 9-slice placements), so in a large document objects late
in a walk could be measured by estimates where main measured them exactly.
SymbolBoxes::unmeasured makes new boxes that share the name index, and each
object is measured in boxes of its own again.

- The live-object walk (render/src/live.rs) finds symbols through the
  frame's SymbolBoxes.
- SVG export's filter regions measure each object in unmeasured boxes, and
  the region boxes share the writer's index.
- SVG import keeps each imported symbol's index, so a symbol whose art
  holds instances no longer scans or indexes the list again.
- Object › Rasterize's clipping mask is left as it is on main, with
  drawn_outline_with removed.
- The symbol-read-count feature of vectorcraft-doc gives other crates'
  tests vectorcraft_doc::symbols_read. New tests check that a frame, an SVG
  export, a PDF export, the type walk and the artboard crop read the symbol
  list once among 2,000 symbols and 300 instances with drop shadows.
2026-11-16 09:07:50 -08:00
dotCooCoo 842f81d76a Merge main into fix/export-screens-pdf-bleed 2026-11-16 08:30:35 -08:00
dotCooCoo 139f881f81 .ai import: a refused PDF part's error says why the editing data couldn't be read
When the import refuses a file's PDF part and its editing data can't be
read either, the error named only the PDF part. It now adds "its editing
data couldn't be read either (<why>)", as layers already do
(crates/eps/src/import.rs). The reasons come from the editing data
reader (a size limit, damaged compression) and from the private data
streams (larger than 256 MB, another filter or decode parameters,
damaged zlib data). A file without editing data, and an open with pages
picked, layers off or the editing data off, keep the PDF part's error.

Part of #4366.
2026-11-16 07:56:57 -08:00
dotCooCoo 52b4b03920 Symbols: render and SVG/PDF export find each instance's symbol in one index
Drawing or exporting a symbol instance looked its symbol up by scanning
the document's symbol list, so a document with many instances and many
symbols spent most of a frame or an export on name comparisons. The
renderer, the SVG and PDF writers and the export walks now find symbols
through SymbolBoxes::symbol, which builds the name index once per frame,
export or walk and returns the first symbol of a name as before.

- Renderer: plain instances, inline graphics, instances with object
  effects (their art and the symbol budget) and the effect bounds.
- SVG export: instance art, symbol defs and their reuse check, and the
  paint reach of filter regions.
- PDF export: instance art, inline graphics and the brush search of
  knockout masks.
- Export warnings and artboard crops measured what each object paints
  with new symbol boxes per object, which built the name index again for
  every instance. painted_bounds_with and drawn_outline_with take the
  boxes once; Object › Rasterize's clipping mask uses them too.
2026-11-16 07:24:45 -08:00
dotCooCoo 70fdab8445 Export for Screens: Single file PDFs are refused for assets, layers and each object
With `pdfs: "single"` and several assets, layers or selected objects
(`selection: "each"`), document.exportForScreens wrote one PDF named
after the document holding only the first item's art, and every other
item's PDF was left out. Single file puts artboards on the pages of one
PDF; each asset, layer or object is cut out of the document with its own
art, so the export now refuses that combination before it writes any
file, and the Example line refuses it too. `pdfs: "multiple"` still
writes a PDF of each item, and `selection: "one"` writes one PDF either
way.

Docs: params text, docs/mcp.md, docs/target-app-parity.md.
2026-11-16 05:50:00 -08:00
dotCooCoo 7522575af2 MCP: a confined single-file PDF checks only the document it carries
With Export PDFs As set to a single file, a PDF row writes the first
item's document alone. The check for linked images outside the read
roots now looks only at that document, so an image linked in a later
asset no longer refuses a file that does not carry it.
2026-11-16 05:01:46 -08:00
dotCooCoo a31d8c31f7 MCP: confined native output refuses linked image paths outside the read roots
Under automation read roots, every output that carries the native document
(a native file or template, an EPS file, a .ai or .ait file of every
artboard, a PDF of every artboard with Preserve Editing, from
document.serialize, document.export, document.exportSelection,
document.exportPdf, the saves, file.exportAs and Export for Screens rows)
is refused with "a linked image file is outside the read roots" when that
document names a linked image or placed file, a kept relative path or a
data set's image outside the roots, or holds a stored brush entry that
does not read as a brush. Nothing is written and the error names no file
or folder. Outputs without the native document are written as before.

The native document these files carry, and the documents file.package
writes or rewrites, leave out an Export for Screens folder outside the
read roots, as SVG with Preserve Editing already did. file.package refuses
a linked file it copies as it is (a PDF, .ai or EPS file, or a native
document with relink off) whose native document keeps such a folder, with
"a linked file's export folder is outside the read roots".

Export for Screens rows that write one artboard as a native, .ai or EPS
file are checked against that artboard's art. Each asset, layer or
selected object now writes its own native, .ai or EPS file: the per-artboard
document cache was keyed by artboard index alone, so every piece after the
first wrote the first piece's document.

Both messages get rows in the complete-message catalogs.
2026-11-16 03:58:13 -08:00
el-j 3f9c5a17a3 Address review comments: recursive container check and render assertions 2026-11-16 11:20:30 +01:00
el-j 9b80bb7807 Automated transparency reduction for PDF/X and PDF 1.3 (#6861) 2026-11-16 10:58:05 +01:00
dotCooCoo dec5025147 Fix #8034: review fixes for pattern swatches from another document
- swatch.library.add lists a library pattern swatch that stands for a
  swatch added earlier in the same call under existing, not twice
  under added.
- An empty library file (.gpl, .ase, .vcswatches) loads as an empty
  library again; only a document with no swatches is refused. A
  PostScript file whose swatches are only the default ones is refused
  like a .ai or .eps.
- The Swatch Libraries filter of Other Library… also lists .ait and
  .epsf files.
- The library panel finds a loaded library's pattern swatch by looking
  only at libraries that have pattern swatches.
- The Czech message for Copy to User Defined names pattern swatches.
- Color spelling in the new params text and comments; docs/mcp.md
  rewrapped.
2026-11-16 01:12:03 -08:00
dotCooCoo b36400f236 Export for Screens: rows that take the top-level antiAlias are one file when their options match
A format row's file key was made before the top-level `antiAlias` was added to
its options, so a PDF row that sets no bleed and one that asks for the
document's bleed wrote two identical files under Include Bleed. The key is
now made again after the merge.
2026-11-16 00:54:04 -08:00
dotCooCoo 98f5086c20 Fix #8034: Other Library… brings a .ai library's pattern swatches with their patterns
Swatches › Open Swatch Library › Other Library… read a document's
swatches without its pattern swatches, so a pattern from a .ai swatch
library came in only as the colors it uses.

- swatch.library.load keeps a document's pattern swatches, and keeps
  the document for a library that has them. swatch.library.add brings
  the pattern with its tile and art, as a pattern swatch with the
  library swatch's name, placement and color group.
- The library panel draws those pattern swatches from their pattern.
- The Swatch Libraries filter of Other Library… lists .ai and .eps
  files.
- A file with no swatches, and a .ai or .eps whose swatches are only
  the default ones, are refused with "`<file>` has no swatches of its
  own". Copy to User Defined refuses a loaded library with pattern
  swatches, since a .vcswatches file can't hold them.

Docs: docs/mcp.md, docs/target-app-parity.md.
2026-11-16 00:30:07 -08:00
dotCooCoo 6eb973f8dd Export for Screens: Include Bleed keeps a PDF page's TrimBox at the artboard
With Include Bleed, every artboard was grown by the document's bleed and
PDF rows were written from the grown artboard. A row that used the
document's bleed then put the bleed around it a second time: a 100 pt
artboard with a 9 pt bleed wrote a 118 pt TrimBox in a 136 pt BleedBox,
and printer's marks lined up with the bleed edge instead of the trim.

PDF rows now write the artboards as they are, with the row's bleed around
each one once (PDF 32000-1:2008, 14.11.2: the TrimBox is the finished
page and the BleedBox holds it). The bleed is the row's own values, zero
included, else the document's bleed when the row sets none and its PDF
preset gives none or a bleed of 0. That gives a 100 pt TrimBox in a
118 pt BleedBox for one file per artboard, a single file and the Full
Document. Raster, SVG, EPS, AI and native rows still write the grown
artboard.

A PDF/X row that sets a bleed of 0 itself warns again that it leaves the
document's bleed out. A row without a bleed and a row that asks for the
document's bleed write one file.
2026-11-16 00:07:17 -08:00
FredApps 3e72836b00 Merge remote-tracking branch 'origin/main' into feat/cutover-remaining-codecs 2026-11-16 07:08:15 +01:00
BFlat 7180d01947 Merge pull request #7600 from dotCooCoo/fix/confined-exports-script-paths
MCP: confined exports refuse native files that name a linked JavaScript file outside the read roots
2026-11-16 12:55:43 +07:00