Skip to content

Commit 426cddf

Browse files
authored
[Improvement]: Add thumbnail option to use Cropbox (#1018)
1 parent cc1574e commit 426cddf

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

public/js/pimcore/settings/thumbnail/item.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,16 @@ pimcore.settings.thumbnail.item = Class.create({
178178
xtype: "container",
179179
html: "<small>(" + t("rasterize_svg_info_text") + ")</small>",
180180
style: "margin-bottom: 20px"
181+
}, {
182+
xtype: "checkbox",
183+
name: "useCropBox",
184+
style: "margin-bottom:0",
185+
boxLabel: t("use_cropbox") + " (Ghostscript)",
186+
checked: this.data.useCropBox
187+
}, {
188+
xtype: "container",
189+
html: "<small>(" + t("use_cropbox_info_text") + ")</small>",
190+
style: "margin-bottom: 20px"
181191
}, {
182192
xtype: "checkbox",
183193
name: "preserveAnimation",

translations/admin_ext.en.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ rasterize_svg: Rasterize SVGs
185185
rasterize_svg_info_text: >-
186186
SVGs get automatically rasterized when a transformation other than resize or
187187
scale by width/height is used.
188+
use_cropbox: Use Cropbox
189+
use_cropbox_info_text: >-
190+
Sets the page size to the CropBox rather than the MediaBox, useful to exclude
191+
some margins and non-content areas.
188192
preserve_animation: Preserve animations for GIF
189193
preserve_animation_info_text: >-
190194
Supported transformations are: Frame, Cover, Contain, Resize, ScaleByWidth,

0 commit comments

Comments
 (0)