mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-19 20:19:44 +00:00
PDF export: warn when art at the trim edge stops short of the bleed
When a PDF page carries a bleed (a PDF/X preset, bleed.useDocument or an explicit bleed), the export now adds one warning that counts the objects that reach an artboard's trim edge (within 0.5 pt) on a side whose bleed is more than 0.5 pt but end before that side's bleed edge. Hidden objects, guides, unpainted paths and objects at 0% opacity are left out. Objects with brushed strokes or an opacity mask, area type, type on a path, and groups that hold one of them are not measured. Template layers, layers with an opacity mask, and layers that don't print unless includeNonPrinting is on are left out. Clip groups and clipping layers are measured by the art inside the clipping path's geometric bounds and by the fill and stroke the clipping path paints itself. Art and page boxes are written unchanged. When OK in File > Document Setup raises the bleed on a side, the status bar counts the objects that stop short of the new bleed on the sides OK raised. A page of the art's bounds does not warn, and neither does an Export for Screens PDF row when Include Bleed grows the artboards or the page holds assets, layers or a selection. .ai saves do not warn. The message has a row in every catalog; docs/mcp.md and the exportPdf params text describe the check.
This commit is contained in:
+14
@@ -5984,6 +5984,20 @@ information (title, artboard, export date in UTC) are drawn in Registration (`/S
|
||||
the colour bars are process, spot and black-tint patches. Layers whose Print option is off (`layer.setProps
|
||||
{printable: false}`) are left out unless `includeNonPrinting` (or `createLayers`) is on.
|
||||
|
||||
VectorCraft also checks the art against the bleed. When a page has a bleed, the export warns with a count of the
|
||||
objects that reach the trim edge (within 0.5 pt) on a side whose bleed is more than 0.5 pt but end before the bleed
|
||||
edge, for example `3 objects reach the trim edge but stop short of the bleed`. The check measures each object on the
|
||||
visible layers (a group counts as one) by its visual bounds, strokes included. It measures a clip group or a clipping
|
||||
layer by the art inside the clipping path's geometric bounds and by the fill and stroke the clipping path paints
|
||||
itself. It leaves out hidden objects, guides, objects at 0% opacity and paths with no fill or stroke. It does not
|
||||
measure objects with brushed strokes or an opacity mask, area type, type on a path, or groups that hold one of them.
|
||||
It leaves out template layers, layers with an opacity mask, and layers that don't print unless `includeNonPrinting` is
|
||||
on. The export writes the art and the page boxes unchanged. A page of the
|
||||
art's bounds (`useArtboards: false`) does not warn. Export for Screens does not warn for a PDF row when Include Bleed
|
||||
grows the artboards, or for a page of assets, layers or a selection. `.ai` saves do not warn. When OK in File ›
|
||||
Document Setup raises the bleed on a side, the status bar counts the objects that stop short of the new bleed on the
|
||||
sides OK raised, on every artboard.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"document.exportPdf","params":{"path":"/tmp/press.pdf","preset":"Press Quality","marks":{"trim":true,"registration":true,"colorBars":true,"pageInfo":true}}}}
|
||||
```
|
||||
|
||||
@@ -1886,6 +1886,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
A `.ai` export with Use Artboards off writes one page of the visible art's bounds without the native document or the editing copy for other apps, with a warning, so the file does not reopen with one artboard in place of the document's; without PDF content it is refused (`crates/engine/src/cmd/fileio/tests_pdfedit.rs`).
|
||||
That page, and an HP-GL plot of the art's bounds, are measured on the art the file draws: non-printing layers the PDF or `.ai` file leaves out do not make it larger, and nor do the non-printing layers, objects at 0% opacity, placed images, clear gradient meshes and unpainted paths a plot leaves out; Export As refuses an HP-GL plot of nothing it draws before the save dialog (`crates/engine/src/cmd/fileio/tests_pdf.rs`, `crates/engine/src/cmd/fileio/tests_hpgl.rs`, `crates/ui-egui/src/dialogs/tests_export.rs`).
|
||||
PDF export warns when a PDF/X file has no bleed on a side where the document's bleed has one, and writes the file as asked.
|
||||
PDF export, and Document Setup when OK raises the bleed, count the objects that reach the trim edge on a side with a bleed but stop short of the bleed edge, and change no art or page box (`crates/engine/src/cmd/fileio/tests_pdfx.rs`).
|
||||
In a PDF without a standard, the warning for a page longer than 14,400 pt written with a `UserUnit` names "Write pages longer than 200 in at full size in points" (`crates/engine/src/cmd/fileio/tests_pdf.rs`).
|
||||
A PDF/A-2b export at PDF 1.4 with a page longer than 14,400 pt is written as PDF 1.6 with a `UserUnit` and a warning, whether or not `longPagesInPoints` is on, so its page boundaries stay within PDF/A-2's limit of 14,400 units (ISO 19005-2, 6.1.13) unless the page is too narrow for that (`crates/pdf/src/tests/marks.rs`).
|
||||
PDF/X-1a, PDF/X-3 and PDF 1.3 files keep the art under the hidden part of a picture, gradient, pattern, mesh or raster effect that a clipping mask or clipping layer crops: flattening rasterizes only the part of such art that its clipping path shows, on its own page and on the next one. Layers the file leaves out are left out of the flattening, and transparent art that a clipping path hides entirely is removed (`crates/engine/src/cmd/fileio/tests_pdfx.rs`).
|
||||
|
||||
Reference in New Issue
Block a user