Block attributes as well as settings and restrictions define the editing options of individual blocks for the printformer editor

Additional properties (attributes) can be added to each tagged block. These determine, for example, which adjustments can be made to the element or how the element behaves in different scenarios.

The attributes are added (instruction) to the respective block (tag) with name and value in the InDesign document as described in the table below.

If settings or restrictions are to be used across templates (for all existing blocks or blocks added by the user), this is possible via BlockSetting Presets and Block Restrictions, which are created directly in the Admin area).

BlockAttributes 

Name

Value (Limitations)

Usage

Example of use

All blocks

condition-json

Valid JSON format

Condition-JSON

Block is displayed only if conditions are fulfilled.

settings

Valid JSON format 

Block-Settings

Limitation of the editability of blocks (e.g. no moving of a block possible)

tags

One or more tags (comma separated).
Tags have several functions:

  • for keywording (in the editor for the "search for tags")

  • in combination with the attribute content-requirements for templates with containers (placeholder for article templates). Only if the tag(s) of the article template match the tags listed in the attribute of the container, the container can be filled with them.

  • Article templates for grid containers are tagged with their format in the printformer (e.g. "1x1", "2x3").

Container template: If a tagged article template is dragged into the editor workspace, all containers that may be filled with this article are marked. Additionally, all article templates can be filtered by their tags (via the search function).

content-identifier

Usage for template type group, customizable bundle or for containers (article templates): when changing template, layout or article template, the content (text or asset) of the block is kept (but the formatting of the text itself is not maintained when changing).

A text block is included in several article templates and tagged with content-identifier. If its text (in the container) is changed in the editor and then another article template is moved into the container, the edited content (text) remains.

content-validation

This attribute can be used to assign a block content validation (JSON condition) to the block. The identifier of the desired block content validation is entered as the value.

A text block must not be filled with the letter combination "XX"; a respective block content validation is created for this purpose. If "XX" is now entered in the block in the editor, the (freely selectable) error message appears (short pop-up and note).

Assetblocks (image, PDF blocks)

These attributes are created directly at the block (tag in the structure) via New Attribute…

data-keys

One or more DataKeys (comma separated) used to search for content for the block in the current data sources.

Text placeholder

data-key-value

is used in combination with media-hunter, e.g. a file name (incl. suffix) or a URL can be used as value.

A picture from a website is to be inserted into an imageblock. Note: printformer saves the image from the URL when the template is opened for the first time and does not query it afterwards again. If the image is updated on the website, the former version remains in the template.

media-hunter

external-url, custom-attribute, catalog-product-media, system-media

(Value = sources: external link, user-defined attribute, article template, system media)Attribute of an imageblock to search for images; defines the source of the image with which the block is to be filled. Used in combination with the block attributes data-keys or data-key-value.
In InDesign, no default image can be inserted in an imageblock marked with media-hunter, otherwise the media-hunter will not react.
(article templates are used in a page planning with external products).

If an imageblock contains a reference to a file in the system media, this file (e.g. logo) only has to be replaced in the system media when updating and is then automatically used for all templates that have not yet been produced.

h-align

left, center, right

Automatic horizontal alignment of the asset on initial or media source filling
Default value: center

If an asset block is filled with an image that has a smaller format width, then it is placed horizontally centered (without h-align).

v-align

top, center, bottom

Automatic vertical alignment of the asset on initial or media source filling
Default value: center

If an asset block is filled with an image that has a smaller format width, then it is placed vertically centered (without v-align).

Block-Settings

When creating a block setting attribute, "settings" is always entered as the name.
The value is to be entered in JSON-format. You can use the BlockSettings Generatorto get it.

all blocks

block-disable-interactions

true or false

If this value is true, any interaction with the block and its content is prevented.
default value: false

blocks with text placeholders in which nothing should be changed except the text content.
{   "block-disable-interactions": true }

block-actions

delete, move, vmove, hmove,
resize*, rotate, duplicate, opacity, zindex

(v = vertically; h = horizontally; zindex = layer)
Comma-separated list of allowed block actions. An empty string (in the BlockSettings generator only the checkbox block-actions is activated) prohibits all possible block actions. If this setting is not set, all block actions are allowed.
Note: Settings for color adjustments are defined via the block-map-colors attribute.

In case of several overlapping shapeblocks, only the order (which block is in the foreground, which blocks behind) should be adjustable, all other edits are locked.
{   "block-actions": ["zindex"] }

tresize, trresize, rresize, brresize, bresize, blresize, lresize, tlresize

*for the Scale function, an anchor point can also be selected to specify the direction in which the scaling is to happen.
(t = top, b = bottom, r = right, l = left (links))
For example, with brresize the anchor (grabber) is defined at the bottom right, so the position of the object at the top left is unchangeable.
This setting is not available in the JSON generator (must be entered manually).

For a text block, only the font size should be changeable, the distance to the object below the block is fixed.
{   "block-actions": ["tresize",
        "text-format": "fontsize]   }

block-map-colors

true or false

If this value is true, colors of single elements from SVG graphics and of shape blocks can be selected and changed individually.
default value: true

A shape in the template may be adjusted, but the color should be unchangeable
{    "block-map-colors": false   }

block-prevent-clipping

true or false

Does the block have to be entirely on the page or within a CCA?
default value: false

To avoid that elements are outside the printable area (and thus are cut off, for example)
{    "block-prevent-clipping": true   }

block-effects
(Expected from version 3.60)

Selection of multiple effects for an imageblock.

Vectorize SVG graphic and convert to CMYK
{    "block-effects": ["vectorize, color-convert"]   }

block-effects-active

Blockeffectidentifier
(identifier defined in the effects in the printformer)

Each imageblock can be assigned one existing block effect, there is no way to deselect it in the editor.

stamping a graphic
{    "block-effects-active": ["stamping"]    }

prevent-white-gaps

value in pt

Validation of Bleed and Safety Distance.
If this attribute is set, an error message appears in the editor if an element is not completely placed in the bleed or too close to the edge. The requested safety distance to the edge can be defined via the value (the size of the bleed is defined via the IDML).

For a business card, a safety distance of 2 mm to the edge should be maintained additionally, for elements falling off the edge, a bleed is necessary, which the user should be made aware of (if he does not consider it)

{    "prevent-white-gaps" : 6 }

block-scaling

size, position, font

Comma separated list of allowed scaling actions An empty string means no allowed scaling actions, if this setting is not set all scaling actions will be applied.

If new page dimensions are entered when the template is opened, this setting can be used to specify whether the individual blocks/texts should be scaled and/or repositioned according to the new format.
Ex: Size and position should be adjusted, but the text should not.
{    "block-scaling": ["size,position"]   }

block-scaling-keep-proportions

true or false

If new page dimensions are set when the template is opened, this setting can be used to specify that the blocks should be scaled proportionally to the new format.
(If disproportionate side dimensions are passed, the smaller value is applied as the scaling factor).

Images should not be distorted despite format adjustment
{    "block-scaling-keep-proportions": true   }

Textblocks

text-write

true or false

Darf Text überschrieben werden?
default value: true

Predefined wording which should not be changed, but the formatting of the text may be adjusted.
{    "text-write": false   }

text-format

font, fontsize, font-family, font-style, color, valign,
halign, list, script

Comma-separated list of allowed formatting options.
An empty string corresponds to no allowed formatting options.
If this setting is not set, all formatting options are allowed.
(valign/halign = Alignment vertical/horizontal, script = superscript, normal, subscript)

Highlighting is allowed in the text, but otherwise nothing may be reformatted
{    "text-format": ["font-style"]  }

text-select

true or false

Content of the text frame is selected when the block is activated.
default value: false

The written content of a block is to be overwritten completely
{    "text-select": true   }

text-fit

true or false

Should the font size of the text be automatically reduced (to max. 30%) if the content does not fit into the text frame.
default value: false

Can also be used in combination with the block restriction text-font-size (in this case the text is reduced only up to the minimum font size defined there, then it is truncated).

Limited space for a headline, but font size should be as large as possible.
{    "text-fit": true   }

text-grow

t, b, l, r,

With this attribute, the block automatically expands as soon as the amount of text exceeds the original size of the text frame. The reference point is specified by the value(t = top; b = bottom; l = left; r = right) angegeben (b(e.g. the text frame expands to the bottom right with the combination br).
All combinations are possible except lr and tp

The combination with the text-fit attribute works only if additional values for block-size-max specified. (The block grows until block-size-max is reached, then text-fit takes over again.) The block size does not decrease any more by deleting text.

A text block should be enlarged to a maximum size of 300x200 pt, if further text is entered, the font size should be reduced automatically.
{ "block-size-max": {
"width": 300,
"height": 200},
"text-grow" : "rb",
"text-fit": true
}

Assetblocks (image-, PDF-blocks)

use-box

trim, art, bleed, crop, media

This setting can be used to define which Box of the PDF is used while placing it into an imageblock (similar to import options in InDesign).

  • trim = Final format, without bleed (corresponds to InDesign import option Crop To Trim)

  • art = Places the PDF only in the area defined by a rectangle that the author created as a placeable artwork (corresponds to InDesign import option Crop To auf Art)

  • bleed = Format incl. bleed (but without register and crop marks)
    (corresponds to InDesign import option Crop To Bleed)

  • crop = Places the PDF only in the area that is displayed or printed (corresponds to InDesign import option Crop To crop)

  • media = includes all frames and all elements of the PDF (corresponds to InDesign import option Crop To media)

Note: Even for PDF files that are already placed as default in the IDML, this attribute must be set on the block, otherwise the box trim will be applied. (Possibly not all boxes are defined in the PDF file).

A PDF file contains bleed and crop marks, but in the editor it should be placed only in the format including bleed (without the additional white space for the crop marks)

{ "use-box": "bleed" }

asset-cut-out

true or false

Can the image section be changed? (If this value is false, a newly inserted picture is centered in the image frame, scaled to the width or height of the frame depending on the format, and cannot be moved or scaled within the image frame).
default value: true

The inserted picture must be completely visible (nothing cut off)
{    "asset-cut-out": false   }

asset-fill-block

true or false

Does the image frame have to be filled completely? (If this value is true, the shorter side of the picture is scaled to the width or height of the frame and thus a part of the picture is cut out.)
default value: false
(If the attributes "asset-cut-out": false and "asset-fill-block": true are combined, the picture is always centered in the frame).

To avoid empty areas in the template the image block must be filled completely
{    "asset-fill-block": true   }

asset-replace

true or false

Is it allowed to replace the image?
default value: true

The image section can be changed, but the image itself must not be changed.
{    "asset-replace": false   }

Block-Restrictions

When creating a block setting attribute, "restrictions" is always entered as the name.
The value is to be entered in JSON-Format. This can be generated with the BlockSettings Generator.

The restrictions block-size-max/min; text-font-size were stored as settings on the block in an earlier printformer version. Due to the now existing separation of settings and restrictions, there is no need for adaptation. IDML files in which these restrictions are stored as settings will continue to work.

all blocks

block-size-max

width, height

Maximum dimensions (width and height) of the block in pt. If the value is empty, no limitation of the corresponding dimension is applied. (Not applicable for ShapeBlocks, since they generally cannot be scaled in the editor).

A text frame may be extended to any height, but the width is limited.
{   "block-size-max": {
        "width": 150,
        "height": ""   } }

block-size-min

width, height

Minimum dimensions (width and height) of the block in pt.If the value is empty, no limitation of the respective dimension is applied. (Not applicable for ShapeBlocks, since they generally cannot be scaled in the editor).

A text frame may be extended to any height, but the width is fixed (combination with block-size-max).
{      "block-size-max": {
        "width": 150,
        "height": ""   },
    "block-size-min": {
        "width": 150,
        "height": 10  }   }

Textblocks

text-font-size

min, max

Limitations of the font size: minimum and maximum size in pt
If the value is missing, no limitation is applied.

minimum font size 16 pt and maximum font size 20 pt
{   "text-font-size": {
        "max": 20,
        "min": 16   } }

Kombination text-fit mit text-font-size

If the attributes text-font-size and text-fit are combined, please note that these settings refer to the complete block. The adjustment always starts from the smallest size and the minimum font size must not be smaller than 30% of the default size. (Depending on the line spacing different results may occur).

{
"text-fit": true,
"text-font-size": {
"max": 30, "min": 8
}
}

Assetblocks (image-, PDF-blocks)

provider

userMedia, systemMedia, media

This restriction defines from which source assets can be loaded into an imageblock (only system media or own).

For an imageblock, a selection of pictures is available, but the user should not be allowed to use his own pictures.

{ "provider": ["userMedia"] }

types

image, graphics (SVGs), pdf

This allows to specify (independently from the media restriction of the general system settings) what kind of image (file format) may be loaded into an imageblock.
(images include JPG, PNG, Webp and Tif files).

Only vectorized logos may be inserted into an imageblock
{ "types": ["graphics"] }

dpi

error, perfect

Here you can set the minimum resolution (error) in dpi as well as a recommended resolution (perfect) for an imageblock.

Minimum resolution is 150 dpi, recommended is 200
{
"dpi": {
"error": 150,
"perfect": 200
}
}

Tag specific attributes

Tag

Usage

Links to the corresponding attributes of the tags will follow

PFBarcode

Attributes Barcodes

Codes (QR, EAN13 or Code128) can be generated from standard text, using the form editor or via a data source.

PFPlaceholder

Attributes Placeholder

Text placeholders to include content via the form editor or automated via an external data source.

PFContainer

Attributes Container

Containers are placeholders for article templates. They can be filled with one article template each, for which limitations can be set via attributes.

PFGridContainer

Attributes GridContainer

GridContainers are placeholders that can be filled with several article templates according to a grid specification (e.g. 2x3 units). The grid of the container is defined in the InDesign document by tag and attribute.

PFPage

Attributes PFPage

Creation of a print sheet (panel template), on which individual pages of a printformer template can be placed as desired.

PFPrintArea

Attributes PFPrintArea

Creation of a print sheet (panel template) on which predefined areas (or objects) of another template can be placed as desired.

JSON

general introduction to JSON at json.org

Example JSON content of a BlockSettings attribute

{
    "block-actions": "move,resize",
    "text-write": false,
    "text-format": "fontsize,color",
	"text-font-size": {
		"min": 5
	},
	"block-size-max": {
		"width": 50,
		"height": 50
	}
}
CODE

Explanation:
(1) open
(2) the block may be moved and scaled,
(3) the text content may not be changed,
(4) the font size and color may be changed,
(5) font size (interlacing): open
(6) at least 5 pt
(7) close,
(8) at least 5 pt (interlacing): open
(9) width = 50 pt,
(10) height = 50 pt
(11) close
(12) close

Condition JSON

With condition-json you can define wether a block is disolayed or not.
If all conditions are fulfilled the block is displayed, if they are not fulfilled the block is not displayed. If errors occur when checking the conditions, the block will still be displayed.
(JSON will be checked in printformer if there are errors the template can’t be saved.)

In the IDML, the condition-json is specified as the value of an attribute of the (block) tag, name: condition-json.

A condition consists of 2 values (left, right) and an operator. left and right can either be simple values or references to values from a data source (customer CSV, catalog product, ...).

Logical operators

  • and

  • or

  • xor (either or)

Comparison operators

Comparing within strings is CaseInsensitive

  • equal 

  • not-equal

  • contain

  • not-contain

  • in (List in right value contains left value)

  • not-in (List in right value does not contain left value)

References must be marked as follows:

${data-key}
CODE

Samples

ext field with three placeholders "Field1", "Field2", „default text". If the fields "Field1" and "Field2" are both filled, the "default text" will be shown (the attribute will be assigned to the "default text" placeholder).

{
  "left": {
      "left": "${Feld1}",
      "operator": "not-equal",
      "right": ""
},
    "operator": "and",
    "right": {
	    "left": "${Feld2}",
	    "operator": "not-equal",
	    "right": ""
    }
}
CODE

ext field with three placeholders "Field1", "Field2", „default text". If the fields "Field1" and "Field2" are both filled, the "default text" will not be shown (the attribute will be assigned to the "default text" placeholder).

{
    "left": {
	    "left": "${Feld1}",
	    "operator": "equal",
	    "right": ""
    },
    "operator": "or",
    "right": {
	    "left": "${Feld2}",
	    "operator": "equal",
	    "right": ""
    }
}
CODE

Value from the data source with data-key 1|qualitycontains the value DB

{
	"left": "${1|quality}",
	"operator": "contain",
	"right": "DB"
}
CODE

Value from the data source with DataKey 1|quality contains one of the Value from the list of the right operands

{
    "left": "${1|qualitaety}",
    "operator": "in",
    "right": ["IA/DV", "IA/DD", "IA", "C%", "EG"]
}
CODE

The values of 1|price and 2|price are not equal, or the values of 1|content and 2|content are equal.

{
	"left": {
		"left": "${1|price}",
		"operator": "not-equal",
		"right": "${2|price}"
	},
	"operator": "or",
	"right": {
		"left": "${1|content}",
		"operator": "equal",
		"right": "${2|content}"
	}
}
CODE