This commit is contained in:
bflatastic committed 2026-11-19 01:22:42 +07:00
commit 207c1a590c
39 files changed
+460 -46

No files matched your search

+4 -3
View File
@@ -636,8 +636,8 @@ pub const DEFAULT_FLATTENER: &str = "High Resolution";
/// `doc` with its transparency flattened for a PDF 1.3 file (asked for, or PDF/X-1a and PDF/X-3,
/// whose files have none), with `flattenerPreset` (default High Resolution) and `p`'s `flattener`
/// options over it; images with see-through pixels and colorized images, including those in
/// pattern tiles, count as transparency. Rasterized areas are clipped to their regions, and
/// discarded overprints are dropped. Layers the pages leave out (non-printing ones, unless asked
/// pattern tiles, count as transparency. Rasterized areas are clipped to their regions and keep no
/// alpha, and discarded overprints are dropped. Layers the pages leave out (non-printing ones, unless asked
/// for) are left out of the flattening, hidden. → the document to write (`None`: `doc` as it is)
/// and whether its transparency was flattened.
fn flatten_for(cmd: &str, doc: &Document, set: &PdfSettings, p: &Value) -> Result<(Option<Document>, Option<FlattenOptions>)> {
@@ -655,8 +655,9 @@ fn flatten_for(cmd: &str, doc: &Document, set: &PdfSettings, p: &Value) -> Resul
o.preserve_overprints &= set.advanced.overprint == Overprint::Preserve;
o.no_transparency = Some(see_through_images(doc));
// Without soft masks a rasterized area can't be a rectangle with see-through pixels around
// its art: it is clipped to its regions (opaque inside them).
// its art: it is clipped to its regions (opaque inside them). Rasters keep no alpha either.
o.clip_complex_regions = true;
o.preserve_alpha = false;
Ok(match flatten_document(shown.as_ref().unwrap_or(doc), &o)? {
Some(flat) => (Some(flat), Some(o)),
None => (shown, None),
@@ -166,6 +166,14 @@ fn the_flattener_preset_and_options_apply() {
assert!(!transparency(&kept).is_empty() && !warnings.iter().any(|w| w.contains("flattened")));
}
#[test]
fn pdf_1_3_files_flatten_without_alpha_whatever_the_options() {
let mut s = session();
let p = json!({"compatibility": "1.3", "preserveEditing": false, "flattener": {"balance": 0, "preserveAlpha": true}});
let (pdf, _) = export(&mut s, p);
assert!(pdf.starts_with(b"%PDF-1.3") && transparency(&pdf).is_empty());
}
#[test]
fn pdf_1_3_files_are_encrypted_with_40_bit_rc4_and_can_be_linearised() {
let mut s = session();
+1 -1
View File
@@ -1483,7 +1483,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
"ui.savePdfDialog",
"Save PDF Dialog",
"",
"{path?, preset?, range?, useArtboards?, …document.exportPdf options} open the Save PDF dialog with these options (fields = the options, sections are objects; OK writes path, else asks); useArtboards: false: one page of the visible art's bounds, with no Artboards section",
"{path?, preset?, range?, useArtboards?, …document.exportPdf options} open the Save PDF dialog with these options (fields = the options, sections are objects; Custom… sets `flattener`, which setting flattenerPreset drops; OK writes path, else asks); useArtboards: false: one page of the visible art's bounds, with no Artboards section",
),
(
"file.exportAs",
+6 -1
View File
@@ -406,6 +406,7 @@ registry! {
TextImport: [text_import::KIND] => text_import::SPEC,
PdfPresets: [pdf_presets::KIND] => pdf_presets::SPEC,
PdfPreset: [save_pdf::PRESET_KIND] => save_pdf::PRESET_SPEC,
PdfFlattenerOptions: [save_pdf::CUSTOM_KIND] => save_pdf::CUSTOM_SPEC,
SaveOptions: [save_options::KIND] => save_options::SPEC,
TextExport: [text_export::KIND] => text_export::SPEC,
OfficeExport: [office_export::KIND] => office_export::SPEC,
@@ -691,7 +692,7 @@ pub(crate) fn parent(d: &Dialog) -> Option<Dialog> {
/// `ui.dialog.set` changed `field` of the open dialog from `old`: a choice that sets other fields
/// sets them as choosing it in the dialog does (Export for Screens' `exportPreset`, EPS Options'
/// `flattenerPreset`, which drops the Custom… options), a change
/// and Save PDF's `flattenerPreset`, which drop the Custom… options), a change
/// to Export for Screens' sub-folder controls ends an applied preset's item folders, as it does in
/// the dialog, Transform Each's Relative / Absolute keeps the Scale fields' size, and Recolor
/// Artwork's `group` selects that color group and its `groupAction` runs the button at once. Save
@@ -715,6 +716,10 @@ pub(crate) fn field_set(app: &mut VectorcraftApp, field: &str, old: Option<&Valu
eps_options::field_set(d, field);
return Ok(());
}
if let Some(d) = app.ui.dialog.as_mut().filter(|d| d.kind == save_pdf::KIND) {
save_pdf::field_set(d, field);
return Ok(());
}
let Some(d) = app.ui.dialog.as_mut().filter(|d| d.kind == export_for_screens::KIND) else { return Ok(()) };
match field {
"exportPreset" => export_for_screens::preset_set(app),
+1 -1
View File
@@ -202,7 +202,7 @@ fn custom_body(_app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) ->
let (mut o, unread) = super::flatten::shown_options(&d.fields, &current);
o.preserve_alpha = false;
o.preserve_overprints &= overprints_kept(d);
super::flatten::fields_editor(ui, "eps-flattener", &mut d.fields, &mut o, &unread, true);
super::flatten::fields_editor(ui, "eps-flattener", &mut d.fields, &mut o, &unread, &["preserveAlpha", "preserveOverprints"]);
if let Err(e) = &current {
ui.label(egui::RichText::new(e).color(Tokens::get(ui.ctx()).text_dim).size(11.5));
}
+20 -27
View File
@@ -76,17 +76,10 @@ pub(crate) fn shown_options(fields: &Map<String, Value>, current: &Result<Flatte
/// [`options_editor`] on the option fields of a dialog: `o` and `unread` from [`shown_options`].
/// Each option whose control was set is written into `fields`, also when it equals the value shown,
/// so that it replaces a value of the wrong type; the other fields stay as they were entered. With
/// `fixed_preserve`, the two Preserve switches show but can't be changed.
pub(crate) fn fields_editor(
ui: &mut egui::Ui,
id: &str,
fields: &mut Map<String, Value>,
o: &mut FlattenOptions,
unread: &[String],
fixed_preserve: bool,
) {
let set = editor(ui, id, o, true, fixed_preserve, unread);
/// so that it replaces a value of the wrong type; the other fields stay as they were entered. The
/// switches of the options named in `fixed` show but can't be changed.
pub(crate) fn fields_editor(ui: &mut egui::Ui, id: &str, fields: &mut Map<String, Value>, o: &mut FlattenOptions, unread: &[String], fixed: &[&str]) {
let set = editor(ui, id, o, true, fixed, unread);
let Ok(Value::Object(m)) = serde_json::to_value(&*o) else { return };
for k in set {
if let Some(v) = m.get(k) {
@@ -150,7 +143,7 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool {
ui.add_space(10.0);
// Values refused stay as entered, so that changing another option keeps them.
let (mut o, unread) = shown_options(&d.fields, &current);
fields_editor(ui, "flatten-dialog", &mut d.fields, &mut o, &unread, false);
fields_editor(ui, "flatten-dialog", &mut d.fields, &mut o, &unread, &[]);
if let Err(e) = &current {
ui.label(egui::RichText::new(e).color(Tokens::get(ui.ctx()).text_dim).size(11.5));
}
@@ -227,15 +220,15 @@ const FIELD: f32 = 56.0;
/// when one changed.
pub(crate) fn options_editor(ui: &mut egui::Ui, id: &str, o: &mut FlattenOptions, enabled: bool) -> bool {
let before = o.clone();
editor(ui, id, o, enabled, false, &[]);
editor(ui, id, o, enabled, &[], &[]);
*o != before
}
/// The option controls, with the value fields of the options named in `unread` blank. With
/// `fixed_preserve`, Preserve Alpha Transparency and Preserve Overprints and Spot Colors show but
/// can't be changed (the file format or another control sets them). Returns the keys of the
/// options whose controls were set, also to the value they showed.
fn editor(ui: &mut egui::Ui, id: &str, o: &mut FlattenOptions, enabled: bool, fixed_preserve: bool, unread: &[String]) -> Vec<&'static str> {
/// The option controls, with the value fields of the options named in `unread` blank. The
/// switches of the options named in `fixed` show but can't be changed (the file format or another
/// control sets them). Returns the keys of the options whose controls were set, also to the value
/// they showed.
fn editor(ui: &mut egui::Ui, id: &str, o: &mut FlattenOptions, enabled: bool, fixed: &[&str], unread: &[String]) -> Vec<&'static str> {
let t = Tokens::get(ui.ctx());
let mut set = Vec::new();
let field_value = |key: &str, v: f64| (!unread.iter().any(|k| k == key)).then_some(v);
@@ -289,16 +282,16 @@ fn editor(ui: &mut egui::Ui, id: &str, o: &mut FlattenOptions, enabled: bool, fi
}
});
ui.add_space(4.0);
let switches: [(&str, &mut bool, bool, &'static str); 6] = [
(tl!("Convert All Text to Outlines"), &mut o.text_to_outlines, false, "textToOutlines"),
(tl!("Convert All Strokes to Outlines"), &mut o.strokes_to_outlines, false, "strokesToOutlines"),
(tl!("Clip Complex Regions"), &mut o.clip_complex_regions, false, "clipComplexRegions"),
(tl!("Anti-alias Rasters"), &mut o.anti_alias, false, "antiAlias"),
(tl!("Preserve Alpha Transparency"), &mut o.preserve_alpha, fixed_preserve, "preserveAlpha"),
(tl!("Preserve Overprints and Spot Colors"), &mut o.preserve_overprints, fixed_preserve, "preserveOverprints"),
let switches: [(&str, &mut bool, &'static str); 6] = [
(tl!("Convert All Text to Outlines"), &mut o.text_to_outlines, "textToOutlines"),
(tl!("Convert All Strokes to Outlines"), &mut o.strokes_to_outlines, "strokesToOutlines"),
(tl!("Clip Complex Regions"), &mut o.clip_complex_regions, "clipComplexRegions"),
(tl!("Anti-alias Rasters"), &mut o.anti_alias, "antiAlias"),
(tl!("Preserve Alpha Transparency"), &mut o.preserve_alpha, "preserveAlpha"),
(tl!("Preserve Overprints and Spot Colors"), &mut o.preserve_overprints, "preserveOverprints"),
];
for (label, v, fixed, key) in switches {
if widgets::check(ui, label, *v, enabled && !fixed) {
for (label, v, key) in switches {
if widgets::check(ui, label, *v, enabled && !fixed.contains(&key)) {
*v = !*v;
set.push(key);
}
+134 -10
View File
@@ -18,8 +18,8 @@ use std::sync::LazyLock;
use serde_json::{Map, Value, json};
use vectorcraft_doc::Unit;
use vectorcraft_engine::cmd::FlattenOptions;
use vectorcraft_engine::cmd::fileio::{SaveMode, pdf};
use vectorcraft_engine::cmd::{FlattenOptions, FlattenerPreset};
use vectorcraft_pdf::{
Changes, Choice, ColorConversion, Compatibility, Downsample, Encryption, ImageCodec, JpegQuality, MarkKind, MonoCodec, Overprint, PdfSettings,
Printing, ProfileInclusion, Standard,
@@ -37,11 +37,22 @@ pub(super) const SPEC: DialogSpec = DialogSpec {
body,
confirm,
ok: Some("Save PDF"),
inputs: |_| &["path"],
inputs: |_| &["path", "flattener"],
reset: Some(reset),
..DialogSpec::FORM
};
/// Custom Transparency Flattener Options, opened over Save PDF by Custom… beside Flattener preset.
pub(super) const CUSTOM_KIND: &str = "pdfFlattenerOptions";
pub(super) const CUSTOM_SPEC: DialogSpec = DialogSpec {
heading: |_| tl!("Custom Transparency Flattener Options").into(),
body: custom_body,
confirm: custom_confirm,
min_width: 420.0,
..DialogSpec::FORM
};
/// The dialog kind of the preset editor (New / Edit in Edit → PDF Presets).
pub(super) const PRESET_KIND: &str = "pdfPreset";
@@ -99,6 +110,19 @@ pub fn open(app: &mut VectorcraftApp, params: &Value) -> Result<Value, String> {
Some(v) => return Err(format!("useArtboards must be true or false, not {v}")),
};
let mut fields = settings_fields(app, params)?;
// The PDF settings keep no flattener options: those asked for go over the flattener preset.
match params.get("flattener") {
None | Some(Value::Null) => {}
Some(f @ Value::Object(o)) => {
let known = serde_json::to_value(FlattenOptions::default()).unwrap_or_default();
if let Some(k) = o.keys().find(|k| known.get(k.as_str()).is_none()) {
return Err(format!("flattener.{k} is not a flattener option"));
}
FlattenOptions::for_export(None, Some(f), &[]).map_err(|e| format!("flattener: {e}"))?;
fields.insert("flattener".into(), f.clone());
}
Some(v) => return Err(format!("flattener must be an object of flattener options, not {v}")),
}
let s = |k: &str| params.get(k).and_then(Value::as_str);
fields.insert("preset".into(), json!(s("preset").unwrap_or(pdf::DEFAULT_PRESET)));
fields.insert("__presets".into(), json!(pdf::presets(&app.session)));
@@ -534,6 +558,10 @@ fn preset_rows(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) {
d.fields.remove(SAVE_AS);
}
});
// `pdf.preset.save` keeps `flattenerPreset` but not `flattener`.
if d.fields.contains_key("flattener") {
note(ui, tl!("The PDF preset keeps the flattener preset but not the Custom… settings."));
}
}
}
@@ -862,6 +890,98 @@ fn output(ui: &mut egui::Ui, d: &mut Dialog) {
}
}
/// The name of the flattener preset Save PDF `d` flattens with: its `flattenerPreset` (High
/// Resolution when empty), a built-in one named by id (`high`) as its name.
fn flattener_name(d: &Dialog) -> String {
let name = get(d, "flattenerPreset").as_str().map(str::trim).filter(|n| !n.is_empty()).unwrap_or(pdf::DEFAULT_FLATTENER);
FlattenOptions::preset_label(&name.to_ascii_lowercase()).unwrap_or(name).to_string()
}
/// The flattener options Save PDF `d` flattens with: its preset, with the Custom… options over it.
fn flattener(d: &Dialog, saved: &[FlattenerPreset]) -> Result<FlattenOptions, String> {
FlattenOptions::for_export(Some(&flattener_name(d)), d.fields.get("flattener"), saved)
}
/// The switches the PDF 1.3 writer sets itself, which Custom Transparency Flattener Options show
/// but can't change: rasterized areas are always clipped to their regions and keep no alpha, and
/// overprints are kept only with Overprint set to Preserve.
const FIXED: [&str; 3] = ["clipComplexRegions", "preserveAlpha", "preserveOverprints"];
/// `o` as the PDF 1.3 writer flattens with it (see [`FIXED`]), for Save PDF `parent`.
fn as_written(o: &mut FlattenOptions, parent: &Dialog) {
o.clip_complex_regions = true;
o.preserve_alpha = false;
o.preserve_overprints &= choice::<Overprint>(parent, "advanced.overprint") != Some(Overprint::Discard);
}
/// Custom Transparency Flattener Options over Save PDF `parent`, on the options it flattens with
/// (the default preset's while those are not valid).
pub(super) fn over(parent: &Dialog, saved: &[FlattenerPreset]) -> Dialog {
let mut o = flattener(parent, saved).unwrap_or_else(|_| FlattenOptions::preset(pdf::DEFAULT_FLATTENER).unwrap_or_default());
as_written(&mut o, parent);
let mut d = Dialog::new(CUSTOM_KIND, json!({}));
super::flatten::put_options(&mut d.fields, &o);
d.fields.insert(super::PARENT.into(), serde_json::to_value(parent).unwrap_or_default());
d
}
/// The options Custom Transparency Flattener Options `d` holds.
fn custom_options(d: &Dialog) -> Result<FlattenOptions, String> {
FlattenOptions::from_params_with(&Value::Object(d.fields.clone()), &[])
}
/// The flattener options, with the switches of [`FIXED`] showing what the PDF 1.3 writer does.
fn custom_body(_app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool {
let current = custom_options(d);
// Values refused stay as entered, so that changing another option keeps them.
let (mut o, unread) = super::flatten::shown_options(&d.fields, &current);
if let Some(parent) = super::parent(d) {
as_written(&mut o, &parent);
}
super::flatten::fields_editor(ui, "pdf-flattener", &mut d.fields, &mut o, &unread, &FIXED);
if let Err(e) = &current {
ui.label(egui::RichText::new(e).color(Tokens::get(ui.ctx()).text_dim).size(11.5));
}
ui.add_space(8.0);
form::caption(ui, tl!("PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept."));
false
}
/// OK: Save PDF again, flattening with these options over its preset (High Resolution when a saved
/// preset was deleted meanwhile). Options equal to the preset's leave the preset alone; bad options
/// keep the dialog open.
fn custom_confirm(app: &mut VectorcraftApp, d: &Dialog) -> Result<Value, String> {
let mut o = custom_options(d)?;
let mut parent = super::parent(d).ok_or("the dialog it was opened over is no longer open")?;
let base = match FlattenOptions::find_preset(&flattener_name(&parent), &app.session.prefs.flattener_presets) {
Some(base) => base,
None => {
set(&mut parent, "flattenerPreset", json!(""));
FlattenOptions::preset(pdf::DEFAULT_FLATTENER).unwrap_or_default()
}
};
// The writer sets these itself, so they take the preset's values: options that otherwise match
// the preset leave its name showing.
o.clip_complex_regions = base.clip_complex_regions;
o.preserve_alpha = base.preserve_alpha;
o.preserve_overprints = base.preserve_overprints;
if o == base {
parent.fields.remove("flattener");
} else {
parent.fields.insert("flattener".into(), serde_json::to_value(&o).map_err(|e| e.to_string())?);
}
app.ui.dialog = Some(parent);
Ok(Value::Null)
}
/// `ui.dialog.set` changed `field` of Save PDF `d`: a flattener preset set there drops the Custom…
/// options, as choosing it in the dropdown does.
pub(super) fn field_set(d: &mut Dialog, field: &str) {
if field == "flattenerPreset" {
d.fields.remove("flattener");
}
}
fn advanced(app: &VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) {
heading(ui, tl!("Fonts"));
let outline = get(d, "advanced.outlineText").as_bool() == Some(true);
@@ -879,17 +999,21 @@ fn advanced(app: &VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) {
|| choice::<Standard>(d, "standard").is_some_and(Standard::flattens);
row(ui, tl!("Flattener preset:"), |ui| {
let presets = app.session.flattener_presets();
let names: Vec<&str> = presets.iter().map(|p| p.name.as_str()).collect();
// The built-in presets come first (translated); the saved ones are names.
let builtins = names.len().saturating_sub(app.session.prefs.flattener_presets.len());
let name = get(d, "flattenerPreset").as_str().map(str::trim).filter(|n| !n.is_empty()).unwrap_or(pdf::DEFAULT_FLATTENER);
// A built-in preset named by id (`high`) shows as its name.
let current = FlattenOptions::preset_label(&name.to_ascii_lowercase()).unwrap_or(name).to_string();
let saved = &app.session.prefs.flattener_presets;
// [Custom] while Custom… options differ from the preset's.
let current = flattener(d, saved).ok();
let mut custom = false;
ui.add_enabled_ui(flat, |ui| {
if let Some(n) = super::mixed_dropdown(ui, "flattenerPreset", &current, &names, 200.0, |k| k < builtins).and_then(|i| names.get(i)) {
set(d, "flattenerPreset", json!(n));
if let Some(p) = super::flatten::preset_dropdown(ui, "flattenerPreset", &presets, &flattener_name(d), current.as_ref(), 200.0) {
set(d, "flattenerPreset", json!(p.name));
d.fields.remove("flattener");
}
// PDF presets keep no custom flattener options, so the preset editor has no Custom….
custom = d.kind == KIND && widgets::flat_button_fit(ui, tl!("Custom…"), 72.0).clicked();
});
if custom {
*d = over(d, saved);
}
});
if flat {
let name = get(d, "flattenerPreset").as_str().map(str::trim).filter(|n| !n.is_empty()).unwrap_or(pdf::DEFAULT_FLATTENER);
@@ -916,3 +916,226 @@ fn advanced_section_shows_raster_resolution_note() {
frame(&mut app);
assert!(app.ui.dialog.is_some());
}
/// Headless frames of the dialog layer with screen-reader output.
struct Reader(egui::Context);
impl Reader {
fn new() -> Self {
let ctx = egui::Context::default();
ctx.enable_accesskit();
theme::install_fonts(&ctx);
Self(ctx)
}
fn run(&self, app: &mut VectorcraftApp, events: Vec<egui::Event>) -> egui::FullOutput {
let screen = egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1280.0, 900.0));
let mut out =
self.0.run_ui(egui::RawInput { events, screen_rect: Some(screen), ..Default::default() }, |ui| super::super::show(app, ui.ctx()));
out.textures_delta.clear();
out
}
/// The Custom… button of the open dialog, with whether it is enabled.
fn custom(&self, app: &mut VectorcraftApp) -> Option<(egui::accesskit::NodeId, bool)> {
self.run(app, vec![]);
let out = self.run(app, vec![]);
let nodes = &out.platform_output.accesskit_update.as_ref()?.nodes;
nodes.iter().find(|(_, n)| n.label() == Some("Custom…") && n.role() == egui::accesskit::Role::Button).map(|(id, n)| (*id, !n.is_disabled()))
}
/// The labels and values the open dialog shows.
fn texts(&self, app: &mut VectorcraftApp) -> Vec<String> {
self.run(app, vec![]);
let out = self.run(app, vec![]);
let nodes = out.platform_output.accesskit_update.map(|u| u.nodes).unwrap_or_default();
nodes.iter().flat_map(|(_, n)| [n.label(), n.value()]).flatten().map(str::to_string).collect()
}
/// Click Custom… in Save PDF's Advanced section.
fn click_custom(&self, app: &mut VectorcraftApp) {
let (node, enabled) = self.custom(app).expect("a Custom… button");
assert!(enabled, "Custom… is enabled");
let click = egui::accesskit::ActionRequest {
action: egui::accesskit::Action::Click,
target_node: node,
target_tree: egui::accesskit::TreeId::ROOT,
data: None,
};
self.run(app, vec![egui::Event::AccessKitActionRequest(click)]);
}
}
fn kind(app: &VectorcraftApp) -> Option<&str> {
app.ui.dialog.as_ref().map(|d| d.kind.as_str())
}
/// Save PDF on `params` (and `path`), showing Advanced.
fn open_advanced(app: &mut VectorcraftApp, params: Value) {
let mut p = params;
p["path"] = json!("/tmp/out.pdf");
app.run("ui.savePdfDialog", p).unwrap();
set_field(app, "__section", json!("Advanced"));
}
/// A second rectangle, half transparent, over the first one.
fn transparent_overlap(app: &mut VectorcraftApp) {
app.run("select.none", json!({})).unwrap();
app.run("shape.rectangle", json!({"x": 30, "y": 20, "width": 50, "height": 40})).unwrap();
app.run("transparency.set", json!({"opacity": 50})).unwrap();
}
/// The images a written PDF reopens with.
fn images(pdf: &[u8]) -> usize {
let doc = vectorcraft_pdf::import(pdf).unwrap();
let mut n = 0;
for l in &doc.layers {
l.walk(&mut |x| n += matches!(x.kind, vectorcraft_doc::NodeKind::Image(_)) as usize);
}
n
}
#[test]
fn custom_is_enabled_where_the_save_flattens() {
let (mut app, _, _) = app();
let r = Reader::new();
for (params, flattens) in [
(json!({"compatibility": "1.3"}), true),
(json!({"standard": "pdfX1a"}), true),
(json!({"standard": "pdfX3"}), true),
(json!({"compatibility": "1.4"}), false),
(json!({"standard": "pdfX4"}), false),
] {
open_advanced(&mut app, params.clone());
assert_eq!(r.custom(&mut app).map(|(_, enabled)| enabled), Some(flattens), "{params}");
}
// PDF presets keep no custom flattener options, so the preset editor has no Custom….
open_preset(&mut app, &json!({})).unwrap();
set_field(&mut app, "__section", json!("Advanced"));
set_field(&mut app, "compatibility", json!("1.3"));
assert_eq!(r.custom(&mut app), None);
}
#[test]
fn custom_starts_from_the_preset_and_cancel_goes_back_unchanged() {
let (mut app, _, _) = app();
open_advanced(&mut app, json!({"compatibility": "1.3", "flattenerPreset": "low"}));
let r = Reader::new();
r.custom(&mut app);
let before = app.ui.dialog.as_ref().unwrap().fields.clone();
r.click_custom(&mut app);
assert_eq!(kind(&app), Some(CUSTOM_KIND));
let d = app.ui.dialog.as_ref().unwrap();
assert_eq!((d.f64("balance", 0.0), d.f64("gradientPpi", 0.0)), (75.0, 150.0), "Low Resolution's");
// Low Resolution doesn't clip, but the PDF 1.3 writer does.
assert!(d.bool("clipComplexRegions"), "shown as written");
app.ui.dialog.as_mut().unwrap().fields.insert("balance".into(), json!(10));
super::super::cancel(&mut app);
assert_eq!(kind(&app), Some(KIND));
assert_eq!(app.ui.dialog.as_ref().unwrap().fields, before, "Cancel leaves Save PDF as it was");
}
#[test]
fn custom_options_are_written_until_a_preset_is_chosen() {
let (mut app, written, _) = app();
transparent_overlap(&mut app);
open_advanced(&mut app, json!({"compatibility": "1.3"}));
let r = Reader::new();
r.click_custom(&mut app);
app.ui.dialog.as_mut().unwrap().fields.insert("balance".into(), json!(0));
super::super::confirm(&mut app).unwrap();
assert_eq!(kind(&app), Some(KIND), "OK goes back to Save PDF");
let d = app.ui.dialog.as_ref().unwrap();
assert_eq!(d.fields["flattener"]["balance"].as_f64(), Some(0.0));
let saved = &app.session.prefs.flattener_presets;
assert_ne!(flattener(d, saved).ok(), FlattenOptions::preset(pdf::DEFAULT_FLATTENER), "the preset shows [Custom]");
// A preset set from outside drops the custom options.
let mut copy = d.clone();
set(&mut copy, "flattenerPreset", json!("Low Resolution"));
field_set(&mut copy, "flattenerPreset");
assert!(!copy.fields.contains_key("flattener"));
super::super::confirm(&mut app).unwrap();
assert!(images(&written.borrow()[0].1) > 0, "balance 0 rasterizes the flattened art");
open_advanced(&mut app, json!({"compatibility": "1.3"}));
super::super::confirm(&mut app).unwrap();
assert_eq!(images(&written.borrow()[1].1), 0, "High Resolution keeps it vector");
}
#[test]
fn custom_options_equal_to_the_preset_leave_its_name() {
let (mut app, _, _) = app();
let r = Reader::new();
for overprint in ["preserve", "discard"] {
open_advanced(&mut app, json!({"compatibility": "1.3", "flattenerPreset": "medium", "advanced": {"overprint": overprint}}));
r.click_custom(&mut app);
assert_eq!(app.ui.dialog.as_ref().unwrap().bool("preserveOverprints"), overprint == "preserve", "{overprint}");
super::super::confirm(&mut app).unwrap();
assert_eq!(kind(&app), Some(KIND));
assert!(!app.ui.dialog.as_ref().unwrap().fields.contains_key("flattener"), "{overprint}");
}
}
#[test]
fn custom_shows_alpha_as_the_pdf_1_3_writer_drops_it() {
let (mut app, written, _) = app();
transparent_overlap(&mut app);
open_advanced(&mut app, json!({"compatibility": "1.3", "flattener": {"balance": 0, "preserveAlpha": true}}));
Reader::new().click_custom(&mut app);
assert!(!app.ui.dialog.as_ref().unwrap().bool("preserveAlpha"), "shown as written");
super::super::confirm(&mut app).unwrap();
assert_eq!(kind(&app), Some(KIND));
assert_eq!(app.ui.dialog.as_ref().unwrap().fields["flattener"]["preserveAlpha"].as_bool(), Some(false));
super::super::confirm(&mut app).unwrap();
assert!(written.borrow()[0].1.starts_with(b"%PDF-1.3") && images(&written.borrow()[0].1) > 0);
}
#[test]
fn bad_custom_options_keep_the_dialog_open() {
let (mut app, _, _) = app();
open_advanced(&mut app, json!({"compatibility": "1.3"}));
Reader::new().click_custom(&mut app);
app.ui.dialog.as_mut().unwrap().fields.insert("gradientPpi".into(), json!(9000));
let e = super::super::confirm(&mut app).unwrap_err();
assert!(e.contains("resolutions"), "{e}");
assert_eq!(kind(&app), Some(CUSTOM_KIND));
}
#[test]
fn custom_options_outlive_a_saved_preset_deleted_meanwhile() {
let (mut app, written, _) = app();
app.run("flattener.presets.save", json!({"name": "Mine", "balance": 20})).unwrap();
open_advanced(&mut app, json!({"compatibility": "1.3", "flattenerPreset": "Mine"}));
Reader::new().click_custom(&mut app);
assert_eq!(app.ui.dialog.as_ref().unwrap().f64("balance", 0.0), 20.0, "the saved preset's");
app.run("flattener.presets.delete", json!({"name": "Mine"})).unwrap();
app.ui.dialog.as_mut().unwrap().fields.insert("balance".into(), json!(30));
super::super::confirm(&mut app).unwrap();
let d = app.ui.dialog.as_ref().unwrap();
assert_eq!((d.str("flattenerPreset"), d.fields["flattener"]["balance"].as_f64()), (String::new(), Some(30.0)));
super::super::confirm(&mut app).unwrap();
assert!(written.borrow()[0].1.starts_with(b"%PDF-1.3"));
}
#[test]
fn save_preset_says_it_leaves_the_custom_flattener_options_out() {
let (mut app, _, _) = app();
let r = Reader::new();
let note = "The PDF preset keeps the flattener preset but not the Custom… settings.";
app.run("ui.savePdfDialog", json!({"compatibility": "1.3", "flattener": {"balance": 10}})).unwrap();
set_field(&mut app, SAVE_AS, json!("Mine"));
assert!(r.texts(&mut app).iter().any(|t| t == note), "with Custom… options");
app.ui.dialog.as_mut().unwrap().fields.remove("flattener");
assert!(!r.texts(&mut app).iter().any(|t| t == note), "without them");
}
#[test]
fn save_pdf_opens_with_the_flattener_options_given_and_refuses_bad_ones() {
let (mut app, _, _) = app();
app.run("ui.savePdfDialog", json!({"compatibility": "1.3", "flattener": {"lineArtPpi": 600}})).unwrap();
assert_eq!(app.ui.dialog.as_ref().unwrap().fields["flattener"], json!({"lineArtPpi": 600}));
for bad in [json!({"bogus": 1}), json!(5), json!({"gradientPpi": 9000})] {
app.ui.dialog = None;
assert!(app.run("ui.savePdfDialog", json!({"flattener": bad})).is_err(), "{bad}");
assert!(app.ui.dialog.is_none(), "{bad}");
}
}
+2
View File
@@ -2543,6 +2543,8 @@ font-technology Variable Променливи
Overprint and Transparency Flattener Options Опции за сплескване на надпечатването и прозрачността
Custom… Потребителски…
Custom Transparency Flattener Options Потребителски опции за сплескване на прозрачността
The PDF preset keeps the flattener preset but not the Custom… settings. PDF наборът запазва набора за сплескване, но не и настройките от „Потребителски…“.
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. Файловете PDF 1.3 изрязват растеризираните области по техните очертания, а „Надпечат“ определя дали надпечатванията се запазват.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS няма алфа прозрачност, а „Надпечати“ определя дали надпечатванията се запазват.
Overprint Black… Напечатване на черното върху друго…
Overprint Fill Напечатване на запълването върху друго
Can't render this file because it is too large.
+2
View File
@@ -2941,6 +2941,8 @@ digits Malayalam Malajalam
Overprint and Transparency Flattener Options Opcije pretiska i spljoštavanja prozirnosti
Custom… Prilagođeno…
Custom Transparency Flattener Options Prilagođene opcije spljoštavanja prozirnosti
The PDF preset keeps the flattener preset but not the Custom… settings. PDF postavka zadržava postavku spljoštavanja, ali ne i postavke iz Prilagođeno….
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. PDF 1.3 datoteke isijecaju rasterizirana područja po njihovim regijama, a Pretisak određuje da li se pretisci zadržavaju.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS nema alfa prozirnost, a Pretisci određuju da li se pretisci zadržavaju.
Place the pages with the placement again Ponovo postavi stranice s postavljanjem
Placement: Postavljanje:
Can't render this file because it contains an unexpected character in line 2 and column 73.
+2
View File
@@ -3227,6 +3227,8 @@ digits Malayalam Malaiàlam
Overprint and Transparency Flattener Options Opcions de l’aplanador de sobremipressió i transparència
Custom… Personalitzat…
Custom Transparency Flattener Options Opcions personalitzades de l’aplanador de transparència
The PDF preset keeps the flattener preset but not the Custom… settings. El preajust PDF conserva el preajust d’aplanament, però no la configuració de Personalitzat….
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. Els fitxers PDF 1.3 retallen les àrees rasteritzades a les seves regions, i Sobrimpressió determina si es conserven les sobreimpressions.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. L’EPS no té transparència alfa, i Sobreimpressions determina si es conserven les sobreimpressions.
Overprint Black… Sobrimpressió del negre…
Overprint Fill Sobrimpressió del farciment
Can't render this file because it is too large.
+2
View File
@@ -3025,6 +3025,8 @@ digits Malayalam Malajálamské
Overprint and Transparency Flattener Options Možnosti přetisku a sloučení průhlednosti
Custom… Vlastní nastavení…
Custom Transparency Flattener Options Vlastní možnosti sloučení průhlednosti
The PDF preset keeps the flattener preset but not the Custom… settings. Přednastavení PDF zachová přednastavení sloučení, ale ne nastavení z Vlastní nastavení….
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. Soubory PDF 1.3 ořezávají rastrované oblasti podle jejich tvaru a Přetisk určuje, zda se přetisky zachovají.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS nemá průhlednost alfa a Přetisky určují, zda se přetisky zachovají.
Place the pages with the placement again Znovu rozmístit stránky podle umístění
Placement: Umístění:
Can't render this file because it is too large.
+2
View File
@@ -5525,6 +5525,8 @@ digits Malayalam Malayalam
Overprint and Transparency Flattener Options Indstillinger for overtryk og udfladning af gennemsigtighed
Custom… Brugerdefineret…
Custom Transparency Flattener Options Brugerdefinerede indstillinger for udfladning af gennemsigtighed
The PDF preset keeps the flattener preset but not the Custom… settings. PDF-forudindstillingen gemmer fladgøringsforudindstillingen, men ikke indstillingerne fra Brugerdefineret….
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. PDF 1.3-filer klipper rasteriserede områder til deres regioner, og Overprint bestemmer, om overtryk bevares.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS har ingen alfa-gennemsigtighed, og Overtryk bestemmer, om overtryk bevares.
Place the pages with the placement again Placér siderne igen med placeringen
Placement: Placering:
Can't render this file because it is too large.
+2
View File
@@ -2598,6 +2598,8 @@ file-filter Templates Vorlagen
Overprint and Transparency Flattener Options Optionen für Überdrucken und Transparenzreduzierung
Custom… Benutzerdefiniert…
Custom Transparency Flattener Options Benutzerdefinierte Optionen für Transparenzreduzierung
The PDF preset keeps the flattener preset but not the Custom… settings. Die PDF-Vorgabe speichert die Reduzierungsvorgabe, aber nicht die Einstellungen unter „Benutzerdefiniert…“.
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. PDF-1.3-Dateien beschneiden gerasterte Bereiche auf ihre Regionen, und „Überdrucken“ legt fest, ob Überdrucken erhalten bleibt.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS hat keine Alphatransparenz, und „Überdrucken“ legt fest, ob Überdrucken erhalten bleibt.
Overprint Black… Schwarz überdrucken…
Overprint Fill Fläche überdrucken
Can't render this file because it is too large.
+2
View File
@@ -3578,6 +3578,8 @@ theme Appearance Εμφάνιση
Overprint and Transparency Flattener Options Επιλογές υπερεκτύπωσης και ισοπέδωσης διαφάνειας
Custom… Προσαρμοσμένο…
Custom Transparency Flattener Options Προσαρμοσμένες επιλογές ισοπέδωσης διαφάνειας
The PDF preset keeps the flattener preset but not the Custom… settings. Η προεπιλογή PDF διατηρεί την προεπιλογή ισοπέδωσης, αλλά όχι τις ρυθμίσεις του Προσαρμοσμένο….
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. Τα αρχεία PDF 1.3 αποκόπτουν τις ραστεροποιημένες περιοχές στα όριά τους και η Υπερεκτύπωση ορίζει αν διατηρούνται οι υπερεκτυπώσεις.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. Το EPS δεν έχει διαφάνεια άλφα και οι Υπερεκτυπώσεις ορίζουν αν διατηρούνται οι υπερεκτυπώσεις.
Overprint Black… Υπερεκτύπωση μαύρου…
Overprint Fill Υπερεκτύπωση γεμίσματος
Can't render this file because it is too large.
+2
View File
@@ -2642,6 +2642,8 @@ font-technology Variable Variables
Overprint and Transparency Flattener Options Opciones de sobreimpresión y acoplador de transparencia
Custom… Personalizado…
Custom Transparency Flattener Options Opciones personalizadas de acoplador de transparencia
The PDF preset keeps the flattener preset but not the Custom… settings. El preajuste PDF conserva el preajuste de acoplamiento, pero no los ajustes de Personalizado….
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. Los archivos PDF 1.3 recortan las áreas rasterizadas a sus regiones, y Sobreimprimir determina si se conservan las sobreimpresiones.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS no tiene transparencia alfa, y Sobreimpresiones determina si se conservan las sobreimpresiones.
Overprint Black… Sobreimprimir negro…
Overprint Fill Sobreimprimir relleno
Can't render this file because it is too large.
+2
View File
@@ -2967,6 +2967,8 @@ digits Malayalam Malajalam
Overprint and Transparency Flattener Options Päällepainatuksen ja läpinäkyvyyden litistyksen asetukset
Custom… Mukautettu…
Custom Transparency Flattener Options Läpinäkyvyyden litistyksen mukautetut asetukset
The PDF preset keeps the flattener preset but not the Custom… settings. PDF-esiasetus säilyttää litistyksen esiasetuksen mutta ei Mukautettu…-asetuksia.
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. PDF 1.3 -tiedostot rajaavat rasteroidut alueet niiden muotoon, ja Päällepainatus määrää, säilytetäänkö päällepainatukset.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS:ssä ei ole alfa-läpinäkyvyyttä, ja Päällepainatukset määrää, säilytetäänkö päällepainatukset.
Place the pages with the placement again Sijoita sivut uudelleen sijoittelun mukaan
Placement: Sijoittelu:
Can't render this file because it contains an unexpected character in line 2 and column 73.
+2
View File
@@ -2630,6 +2630,8 @@ font-technology Variable Variables
Overprint and Transparency Flattener Options Options de surimpression et d’aplatissement des transparences
Custom… Personnalisé…
Custom Transparency Flattener Options Options personnalisées d’aplatissement des transparences
The PDF preset keeps the flattener preset but not the Custom… settings. Le paramètre prédéfini PDF conserve le paramètre prédéfini d’aplatissement, mais pas les réglages de Personnalisé….
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. Les fichiers PDF 1.3 écrêtent les zones pixellisées à leurs régions, et Surimpression détermine si les surimpressions sont conservées.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. Le format EPS n’a pas de transparence alpha, et Surimpressions détermine si les surimpressions sont conservées.
Overprint Black… Surimpression du noir…
Overprint Fill Surimpression du fond
Can't render this file because it is too large.
+2
View File
@@ -2667,6 +2667,8 @@
Overprint and Transparency Flattener Options ઓવરપ્રિન્ટ અને પારદર્શિતા ફ્લેટનર વિકલ્પો
Custom… કસ્ટમ…
Custom Transparency Flattener Options કસ્ટમ પારદર્શિતા ફ્લેટનર વિકલ્પો
The PDF preset keeps the flattener preset but not the Custom… settings. PDF પ્રીસેટ ફ્લેટનર પ્રીસેટ રાખે છે, પરંતુ કસ્ટમ… સેટિંગ્સ નહીં.
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. PDF 1.3 ફાઇલો રાસ્ટરાઇઝ્ડ વિસ્તારોને તેમના પ્રદેશો સુધી ક્લિપ કરે છે, અને ઓવરપ્રિન્ટ નક્કી કરે છે કે ઓવરપ્રિન્ટ્સ જાળવવામાં આવે કે નહીં.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS માં આલ્ફા પારદર્શિતા નથી, અને ઓવરપ્રિન્ટ્સ નક્કી કરે છે કે ઓવરપ્રિન્ટ્સ જાળવવામાં આવે કે નહીં.
Overprint: ઓવરપ્રિન્ટ:
Overprints: ઓવરપ્રિન્ટ્સ:
Can't render this file because it contains an unexpected character in line 72 and column 5.
+2
View File
@@ -3762,6 +3762,8 @@ antiAlias Sharp शार्प
Overprint and Transparency Flattener Options ओवरप्रिंट और ट्रांसपेरेंसी फ़्लैटनर ऑप्शन्स
Custom… कस्टम…
Custom Transparency Flattener Options कस्टम ट्रांसपेरेंसी फ़्लैटनर ऑप्शन्स
The PDF preset keeps the flattener preset but not the Custom… settings. PDF प्रीसेट फ़्लैटनर प्रीसेट रखता है, लेकिन कस्टम… सेटिंग्स नहीं।
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. PDF 1.3 फ़ाइलें रास्टराइज़ किए गए क्षेत्रों को उनके क्षेत्रों तक क्लिप करती हैं, और ओवरप्रिंट तय करता है कि ओवरप्रिंट रखे जाएँ या नहीं।
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS में अल्फा पारदर्शिता नहीं होती, और ओवरप्रिंट तय करता है कि ओवरप्रिंट रखे जाएँ या नहीं।
Overprint Black ओवरप्रिंट ब्लैक
Overprint Black… ओवरप्रिंट ब्लैक…
Can't render this file because it is too large.
+2
View File
@@ -3129,6 +3129,8 @@ file-filter Templates Sablonok
Overprint and Transparency Flattener Options Felülnyomás és átlátszóság-lapítás beállításai
Custom… Egyéni…
Custom Transparency Flattener Options Egyéni átlátszóság-lapítási beállítások
The PDF preset keeps the flattener preset but not the Custom… settings. A PDF-előbeállítás megtartja a lapítási előbeállítást, de az Egyéni… beállításokat nem.
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. A PDF 1.3-fájlok a raszterizált területeket a saját régióikra vágják, és a Felülnyomás beállítás dönti el, hogy megmaradnak-e a felülnyomások.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. Az EPS-ben nincs alfa-átlátszóság, és a Felülnyomások beállítás dönti el, hogy megmaradnak-e a felülnyomások.
Overprint Black… Fekete felülnyomása…
Overprint Fill Kitöltés felülnyomása
Can't render this file because it is too large.
+2
View File
@@ -2744,6 +2744,8 @@ digits Malayalam Malayalam
Overprint and Transparency Flattener Options Opsi overprint dan perataan transparansi
Custom… Kustom…
Custom Transparency Flattener Options Opsi perataan transparansi kustom
The PDF preset keeps the flattener preset but not the Custom… settings. Preset PDF menyimpan preset perataan, tetapi tidak menyimpan pengaturan Kustom….
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. File PDF 1.3 memangkas area yang dirasterisasi ke wilayahnya, dan Overprint menentukan apakah overprint dipertahankan.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS tidak memiliki transparansi alfa, dan Overprint menentukan apakah overprint dipertahankan.
Place the pages with the placement again Tempatkan halaman lagi dengan penempatan tersebut
Placement: Penempatan:
Can't render this file because it contains an unexpected character in line 2561 and column 5.
+2
View File
@@ -2683,6 +2683,8 @@ file-filter Templates Modelli
Overprint and Transparency Flattener Options Opzioni sovrastampa e appiattimento trasparenza
Custom… Personalizzato…
Custom Transparency Flattener Options Opzioni di appiattimento trasparenza personalizzate
The PDF preset keeps the flattener preset but not the Custom… settings. Il preset PDF mantiene il preset di appiattimento, ma non le impostazioni di Personalizzato….
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. I file PDF 1.3 ritagliano le aree rasterizzate alle loro regioni, e Sovrastampa stabilisce se le sovrastampe vengono mantenute.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS non ha trasparenza alfa, e Sovrastampe stabilisce se le sovrastampe vengono mantenute.
Overprint Black… Sovrastampa nero…
Overprint Fill Sovrastampa riempimento
Can't render this file because it is too large.
+2
View File
@@ -2813,6 +2813,8 @@ antiAlias Sharp シャープ
Overprint and Transparency Flattener Options オーバープリントと透明の分割・統合オプション
Custom… カスタム…
Custom Transparency Flattener Options カスタムの透明の分割・統合オプション
The PDF preset keeps the flattener preset but not the Custom… settings. PDF プリセットには分割・統合プリセットが保存されますが、「カスタム…」の設定は保存されません。
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. PDF 1.3 のファイルではラスタライズされた領域がその範囲でクリップされ、オーバープリントを保持するかどうかは「オーバープリント」で決まります。
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS にはアルファ透明がなく、オーバープリントを保持するかどうかは「オーバープリント」で決まります。
Overprint: オーバープリント:
Overprints: オーバープリント:
Can't render this file because it is too large.
+2
View File
@@ -4917,6 +4917,8 @@ digits Malayalam მალაიალამური
Overprint and Transparency Flattener Options ზედდაბეჭდვისა და გამჭვირვალობის გაბრტყელების პარამეტრები
Custom… მორგებული…
Custom Transparency Flattener Options გამჭვირვალობის გაბრტყელების მორგებული პარამეტრები
The PDF preset keeps the flattener preset but not the Custom… settings. PDF პრესეტი ინახავს გაბრტყელების პრესეტს, მაგრამ არა მორგებული… პარამეტრებს.
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. PDF 1.3 ფაილები რასტრირებულ უბნებს მათ არეებზე ჭრის, ხოლო ზედდაბეჭდვა განსაზღვრავს, შენარჩუნდება თუ არა ზედდაბეჭდვები.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS-ს არ აქვს ალფა-გამჭვირვალობა, ხოლო ზედდაბეჭდვები განსაზღვრავს, შენარჩუნდება თუ არა ზედდაბეჭდვები.
Place the pages with the placement again გვერდების ხელახლა განთავსება განთავსების მიხედვით
Placement: განთავსება:
Can't render this file because it is too large.
+2
View File
@@ -2803,6 +2803,8 @@ antiAlias Sharp 날카롭게
Overprint and Transparency Flattener Options 오버프린트 및 투명도 병합 옵션
Custom… 사용자 지정…
Custom Transparency Flattener Options 사용자 지정 투명도 병합 옵션
The PDF preset keeps the flattener preset but not the Custom… settings. PDF 사전 설정에는 병합 사전 설정이 저장되지만 사용자 지정… 설정은 저장되지 않습니다.
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. PDF 1.3 파일은 래스터화된 영역을 해당 영역의 모양으로 클립하며, 오버프린트 설정에 따라 오버프린트 유지 여부가 결정됩니다.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS에는 알파 투명도가 없으며, 오버프린트 설정에 따라 오버프린트 유지 여부가 결정됩니다.
Overprint: 오버프린트:
Overprints: 오버프린트:
Can't render this file because it is too large.
+2
View File
@@ -3398,6 +3398,8 @@ digits Malayalam Malayalam
Overprint and Transparency Flattener Options Opties voor overprint en transparantiepletter
Custom… Aangepast…
Custom Transparency Flattener Options Aangepaste opties voor transparantieafvlakking
The PDF preset keeps the flattener preset but not the Custom… settings. De PDF-voorinstelling bewaart de afvlakvoorinstelling, maar niet de instellingen van Aangepast….
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. PDF 1.3-bestanden snijden gerasterde gebieden bij tot hun regio's, en Overprint bepaalt of overdrukken behouden blijven.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS heeft geen alfatransparantie, en Overdrukken bepaalt of overdrukken behouden blijven.
Place the pages with the placement again Plaats de pagina's opnieuw met de plaatsing
Placement: Plaatsing:
Can't render this file because it is too large.
+2
View File
@@ -2938,6 +2938,8 @@ digits Malayalam Malajalam
Overprint and Transparency Flattener Options Opcje nadruku i spłaszczania przezroczystości
Custom… Niestandardowe…
Custom Transparency Flattener Options Niestandardowe opcje spłaszczania przezroczystości
The PDF preset keeps the flattener preset but not the Custom… settings. Ustawienie PDF zachowuje ustawienie spłaszczania, ale nie ustawienia z Niestandardowe….
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. Pliki PDF 1.3 przycinają rasteryzowane obszary do ich regionów, a Nadruk określa, czy nadruki są zachowywane.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS nie ma przezroczystości alfa, a Nadruki określają, czy nadruki są zachowywane.
Place the pages with the placement again Ponownie rozmieść strony według położenia
Placement: Położenie:
Can't render this file because it is too large.
+2
View File
@@ -2187,6 +2187,8 @@ antiAlias Sharp Nítido
Overprint and Transparency Flattener Options Opções de Sobreimpressão e Achatamento de Transparência
Custom… Personalizado…
Custom Transparency Flattener Options Opções Personalizadas de Achatamento de Transparência
The PDF preset keeps the flattener preset but not the Custom… settings. O predefinido PDF mantém o predefinido de achatamento, mas não as configurações de Personalizado….
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. Arquivos PDF 1.3 recortam as áreas rasterizadas às suas regiões, e Sobreimpressão define se as sobreimpressões são mantidas.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. O EPS não tem transparência alfa, e Sobreimpressões define se as sobreimpressões são mantidas.
Overprint: Sobreimpressão:
Overprints: Sobreimpressões:
Can't render this file because it is too large.
+2
View File
@@ -2667,6 +2667,8 @@ file-filter Templates Шаблоны
Overprint and Transparency Flattener Options Параметры наложения и объединения прозрачностей
Custom… Пользовательские…
Custom Transparency Flattener Options Пользовательские параметры объединения прозрачностей
The PDF preset keeps the flattener preset but not the Custom… settings. Набор PDF сохраняет набор объединения, но не параметры из «Пользовательские…».
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. Файлы PDF 1.3 обрезают растрированные области по их контурам, а параметр «Наложение» определяет, сохраняются ли наложения.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. В EPS нет альфа-прозрачности, а параметр «Наложения» определяет, сохраняются ли наложения.
Overprint Black… Наложение чёрного…
Overprint Fill Наложение заливки
Can't render this file because it is too large.
+2
View File
@@ -2569,6 +2569,8 @@ font-technology Variable Variabla
Overprint and Transparency Flattener Options Alternativ för övertryck och transparensutplattning
Custom… Anpassad…
Custom Transparency Flattener Options Anpassade alternativ för transparensutplattning
The PDF preset keeps the flattener preset but not the Custom… settings. PDF-förinställningen sparar utplattningsförinställningen men inte inställningarna under Anpassad….
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. PDF 1.3-filer klipper rastrerade områden till sina regioner, och Övertryck avgör om övertryck behålls.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS har ingen alfatransparens, och Övertryck avgör om övertryck behålls.
Overprint Black… Övertryck svart…
Overprint Fill Övertryck fyllning
Can't render this file because it is too large.
+2
View File
@@ -2414,6 +2414,8 @@ shape Open Açık
Overprint and Transparency Flattener Options Üst Baskı ve Asetat Düzleştirici Seçenekleri
Custom… Özel…
Custom Transparency Flattener Options Özel Şeffaflık Düzleştirici Seçenekleri
The PDF preset keeps the flattener preset but not the Custom… settings. PDF ön ayarı düzleştirici ön ayarını korur, ancak Özel… ayarlarını korumaz.
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. PDF 1.3 dosyaları rasterleştirilmiş alanları kendi bölgelerine kırpar ve Üst baskı, üst baskıların korunup korunmayacağını belirler.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS'de alfa şeffaflığı yoktur ve Üst baskılar, üst baskıların korunup korunmayacağını belirler.
Overprint Black… Üst Baskı Siyah…
Overprint Fill Üst Baskı Dolgusu
Can't render this file because it is too large.
+2
View File
@@ -2675,6 +2675,8 @@ file-filter Templates Шаблони
Overprint and Transparency Flattener Options Параметри накладання та зведення прозорості
Custom… Користувацькі…
Custom Transparency Flattener Options Користувацькі параметри зведення прозорості
The PDF preset keeps the flattener preset but not the Custom… settings. Набір PDF зберігає набір зведення, але не параметри з «Користувацькі…».
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. Файли PDF 1.3 обрізають растеризовані області за їхніми контурами, а параметр «Накладення» визначає, чи зберігаються накладення.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. У EPS немає альфа-прозорості, а параметр «Накладення» визначає, чи зберігаються накладення.
Overprint Black… Накладення чорного…
Overprint Fill Накладання заливки
Can't render this file because it is too large.
+2
View File
@@ -2953,6 +2953,8 @@ digits Hindi Hindi
Overprint and Transparency Flattener Options Tùy chọn in chồng và làm phẳng trong suốt
Custom… Tùy chỉnh…
Custom Transparency Flattener Options Tùy chọn làm phẳng trong suốt tùy chỉnh
The PDF preset keeps the flattener preset but not the Custom… settings. Thiết lập sẵn PDF giữ thiết lập sẵn làm phẳng, nhưng không giữ các cài đặt Tùy chỉnh….
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. Tệp PDF 1.3 cắt các vùng được raster hóa theo vùng của chúng, và In chồng quyết định có giữ in chồng hay không.
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS không có trong suốt kênh Alpha, và In chồng quyết định có giữ in chồng hay không.
Overprint Black… In chồng đen…
Overprint Fill Tô in chồng
Can't render this file because it is too large.
+2
View File
@@ -2535,6 +2535,8 @@ file-filter Templates 模板
Overprint and Transparency Flattener Options 叠印和透明度拼合器选项
Custom… 自定义…
Custom Transparency Flattener Options 自定义透明度拼合器选项
The PDF preset keeps the flattener preset but not the Custom… settings. PDF 预设会保留拼合预设,但不保留“自定义…”设置。
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. PDF 1.3 文件会将栅格化区域剪切到其区域,“叠印”决定是否保留叠印。
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS 没有 Alpha 透明度,“叠印”决定是否保留叠印。
Overprint Black… 黑色叠印…
Overprint Fill 叠印填色
Can't render this file because it is too large.
+2
View File
@@ -3880,6 +3880,8 @@ liquify-list-end {0}, {1} {0}和{1}
Overprint and Transparency Flattener Options 疊印與透明度平面化選項
Custom… 自訂…
Custom Transparency Flattener Options 自訂透明度平面化選項
The PDF preset keeps the flattener preset but not the Custom… settings. PDF 預設集會保留平面化預設集,但不保留「自訂…」設定。
PDF 1.3 files clip rasterized areas to their regions, and Overprint sets whether overprints are kept. PDF 1.3 檔案會將點陣化區域剪裁至其區域,「疊印」決定是否保留疊印。
EPS has no alpha transparency, and Overprints sets whether overprints are kept. EPS 沒有 Alpha 透明度,「疊印」決定是否保留疊印。
Overprint Black… 疊印黑色…
Overprint Fill 疊印填色
Can't render this file because it is too large.
+1 -1
View File
@@ -1484,7 +1484,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
"ui.savePdfDialog",
"Save PDF Dialog",
"",
"{path?, preset?, range?, useArtboards?, …document.exportPdf options} open the Save PDF dialog with these options (fields = the options, sections are objects; OK writes path, else asks); useArtboards: false: one page of the visible art's bounds, with no Artboards section",
"{path?, preset?, range?, useArtboards?, …document.exportPdf options} open the Save PDF dialog with these options (fields = the options, sections are objects; Custom… sets `flattener`, which setting flattenerPreset drops; OK writes path, else asks); useArtboards: false: one page of the visible art's bounds, with no Artboards section",
),
(
"file.exportAs",
+5 -2
View File
@@ -1414,9 +1414,12 @@ page with hint tables saying where every other page's objects are), which stays
`compatibility: "1.3"` writes a PDF 1.3 file, which has no transparency: a copy of the document is flattened first
with `flattenerPreset` (empty: High Resolution; `high`, `medium`, `low` or a saved preset, `flattener.presets.list`)
and `flattener` options over it (as `object.flattenTransparency` takes them); images with see-through pixels count as
transparency and rasterized areas are clipped to their regions. Layers the file leaves out (non-printing ones, unless
transparency and rasterized areas are clipped to their regions, with no alpha (`clipComplexRegions` and `preserveAlpha`
given in `flattener` are not used). Layers the file leaves out (non-printing ones, unless
`includeNonPrinting` or `createLayers` is set) are left out of the flattening. A file that would still have transparency fails the
export. PDF/X-1a and PDF/X-3 files are PDF 1.3 files too.
export. PDF/X-1a and PDF/X-3 files are PDF 1.3 files too. In the Save PDF dialog, the Custom… button beside Flattener
preset sets `flattener` (`ui.savePdfDialog` keeps a `flattener` it is given, and refuses one it can't read). PDF
presets (`pdf.preset.save`) keep `flattenerPreset` but not `flattener`.
In PDF/A-2b files, `.ai` saves and files written with `longPagesInPoints: false`, a page with a side longer than
14,400 pt is written with a `UserUnit` (PDF 1.6): its longer side divided by 14,400,
rounded up to the next thousandth, with the page's sizes and coordinates in those units, so that no side is longer than
+1
View File
@@ -755,6 +755,7 @@ since 2026-10-01.
- **EPS Save with Use Artboards:** Save As › EPS Options show Use Artboards with All or Range, for a separate file per artboard ([saving in EPS](https://helpx.adobe.com/illustrator/desktop/save-and-export/export-files-to-different-formats/save-artwork-in-eps-format.html)), unchecked by default (the scripting reference's EPS save options list `saveMultipleArtboards` with a default of false, [scripting reference](https://web.archive.org/web/20160803105056/https://wwwimages.adobe.com/content/dam/Adobe/en/devnet/illustrator/sdk/CC2015_3/Illustrator%20JavaScript%20Scripting%20Reference.pdf)). Unchecked, Save writes one file whose bounding box fits all the visible art, as Export does, without the artboards' background colors; when no art shows, the page is the first artboard in its color. An opened EPS saved back this way loses its page margins. Checked with two or more chosen artboards, the file at the path is the central file of the visible art and each artboard is also written to `<name>_<artboard>.eps` beside it. Checked with one chosen artboard, VectorCraft writes that artboard as the page of the file at the path alone (the behavior Save had since #4293). Evidence: `cmd::fileio::tests_artboard_fill::eps_save_draws_the_color_on_an_artboard_page`, `tests::save::eps_save_without_use_artboards_fits_the_box_to_art_past_the_artboard`, `tests::save::opened_eps_saves_to_its_own_file_around_its_art_or_on_its_page`, `tests::save::eps_save_with_use_artboards_writes_the_central_file_and_one_per_artboard`, `dialogs::save_options::tests::eps_save_as_shows_use_artboards_off_and_writes_the_art_or_the_artboard`.
- **EPS Options custom flattener settings:** the help page describes flattening an EPS's transparency with a preset or with custom options, adjusted through Custom ([saving in EPS](https://helpx.adobe.com/illustrator/desktop/save-and-export/export-files-to-different-formats/save-artwork-in-eps-format.html)). EPS Options now has Custom… beside the flattener Preset. It opens Custom Transparency Flattener Options on the settings the export would use: the raster/vector balance, both resolutions, the text and stroke outline switches, Clip Complex Regions and Anti-alias Rasters. OK goes back to EPS Options with the preset shown as [Custom], the export flattens with those settings, and the next EPS Options start from them; choosing a preset drops them, and Cancel goes back to EPS Options unchanged. Preserve Alpha Transparency stays off, and overprints are kept only with Overprints set to Preserve. The [Custom] label, the remembering, the Cancel behavior, Anti-alias Rasters and the ranges (balance 0 to 100, resolutions 1 to 2400 ppi) are VectorCraft's own. Evidence: `dialogs::tests_eps::custom_flattener_options_start_from_the_preset_and_cancel_goes_back_unchanged`, `custom_flattener_options_are_exported_and_remembered_until_a_preset_is_chosen`, `bad_custom_flattener_options_keep_the_dialog_open`.
- **Save PDF custom flattener settings:** the help page describes the Advanced section's flattener preset for PDF 1.3 saves of transparent art, with a Custom button for adjusting the flattener settings, and says neither is available at PDF 1.4 and later ([PDF options](https://helpx.adobe.com/illustrator/using/pdf-options.html)). Save PDF › Advanced now has Custom… beside Flattener preset, enabled for PDF 1.3, PDF/X-1a and PDF/X-3. It opens Custom Transparency Flattener Options on the settings the save would use: the raster/vector balance, both resolutions, the text and stroke outline switches and Anti-alias Rasters; Clip Complex Regions shows on, as the PDF 1.3 writer always clips, overprints are kept only with Overprint set to Preserve, and Preserve Alpha Transparency shows off, as PDF 1.3 rasters keep no alpha. OK goes back to Save PDF with the preset shown as [Custom] and the save flattens with those settings; settings equal to the preset's leave its name, choosing a preset drops them, and Cancel goes back unchanged. PDF presets keep the flattener preset but not these settings, and Save Preset… says so while they are set. `ui.savePdfDialog` keeps a `flattener` it is given. The [Custom] label, the Cancel behavior, Anti-alias Rasters, the editor's absence from the PDF preset editor and the ranges (balance 0 to 100, resolutions 1 to 2400 ppi) are VectorCraft's own. Evidence: `dialogs::save_pdf::tests::custom_is_enabled_where_the_save_flattens`, `custom_starts_from_the_preset_and_cancel_goes_back_unchanged`, `custom_options_are_written_until_a_preset_is_chosen`, `custom_options_equal_to_the_preset_leave_its_name`, `custom_shows_alpha_as_the_pdf_1_3_writer_drops_it`, `save_preset_says_it_leaves_the_custom_flattener_options_out`, `save_pdf_opens_with_the_flattener_options_given_and_refuses_bad_ones`.
- **Raster export backgrounds (#6125):** a raster export draws its background under the finished art, and blend modes read only the art below them, as on the canvas. An Outer Glow in Screen mode on the bare page shows in a PNG on white and in a JPEG. Flatten Transparency puts its white under the finished art the same way. Evidence: `tests::file::a_screen_outer_glow_is_in_raster_exports`, `tests::objectfx::a_screen_outer_glow_on_the_bare_page_shows_on_a_background`, `tests::knockout::page_knockout_and_isolated_blending`, `tests::knockout::no_blend_mode_reads_the_background`, `tests::cmykflatten::every_blend_mode_flattens_to_the_canvas_pixels_in_cmyk`.