User Manual Quickstart General Concepts Buyer Side Snippets Engraving Styles and Form Fields Flex Designs Sub Documents Scripting Workflows Editing Workflow Production Workflow Tutorial Videos Frame Features Resources Pages Layers Snippets Images Fonts Colors Styles Template & Document Styles Assigning Styles Style Wizard Conditional Styles Helper Styles and Multi Line Text Condition Editor Style Code Editor Coded Style Syntax Form Fields Account Portal Style Reference Change Log Known Bugs & Limitations Glossary Acknowledgements Api Reference Authorization Tokens Embedding The Editor Custom Integration Backend Api Price Display

Styles

Probably one of the most powerful features of Printess are Styles.
Styles can be used to control the appearance of all elements. Styles themselves can be controlled by form fields, conditions, and data. That makes them ideal for creating highly variable and versatile documents.

Printess now uses a no-code way to work with Styles!

Let’s have a brief look at an example of creating a Style that controls the presence of a drop-shadow via a form field. We use the Style Wizard (described further below in this chapter) to create this example style. Press the Add Style button Add Style Button on top to open the Style Wizard. Then select Drop Shadow Effect - Controlled via Form Field and press ok to create the Style.

Once created the style will show up in the Template. Here it is easy to change any and all properties of the Style by entering values or properties with predefined selectable values in drop-downs. Styles can be collapsed or un-collapsed by clicking the small triangle to the left of the Style’s name.

No-Code Style Editor

Using the Add Style Property sign on the bottom of each Style adds a new property to the Style.

This opens the property selector which allows you to add all available Style properties sorted by frame type. Note that the text properties for a Multi Line text frame are located under Paragraph- and Character-Style.

Add Style property

To delete a property in a Style or switch it to be directly controlled by a form field, you can select the property and open the drop-down to the left of the property:

Delete Style

When using the Style editor it is possible to switch to the code representation of the styles by clicking on the mode switch in the top right corner of the Styles tab.

This will show all of the generated code:

No-Code Style Editor

Although all of the examples can be built completly within the Style editor, we will also show their code representations in this manual. Mainly because the code view provides an easy way to copy and paste one or multiple Styles from the manual or between documents. The code view also allows for an easy way to change the order in which styles appear in the Editor.

However, in the normal course of operation we recommend using the normal Style view as you don’t have to deal with rigid syntax and can simply add and edit the properties you’d like to control.

If you are interested please read more about the coded Style syntax at the end of this chapter.

Before going into the deep end, we recommend reading the general chapter about Styles and their best friends, form fields.

Template & Document Styles

There are two different types of Styles:

Template Styles - are globally usable across all documents within a Template.
Document Styles - are local and only usable in the current document. For Snippets or documents which will be used as Sub Documents in Snippets, Styles must only be added as a Document Style.

Use the top tab to switch between Template and Document Styles. Document Styles will have the name of the current document in square brackets [DocumentName].

Assigning Styles

You can assign a Style to a frame directly from the Style itself by clicking the gear icon and selecting Assign to Frame. You can also remove all Styles assigned to a frame with Remove from Frame. Note that assigning a Style to a frame will remove any other assigned Styles.

Style Selector

In rare cases you may wish to assign multiple Styles to a frame. In this case you need to use the Style selector in the Position tab to choose and add whatever Styles you want applied to the frame.

x Will remove a selected style.

Style Selector

Pro Tip: Conflicting Styles Behavior
If you select multiple Styles containing the same properties (e.g., color) - the Style which appears last in the Style tab will determine the property independent from the order in which the styles are mentioned in the style selector of the frame. Also, Document Styles will win over Template Styles.

Style Wizard

The Style Wizard is a great way to create Styles in conjunction with form fields while simultaneously learning a lot about how Styles can be used to create great user experiences.

Style Wizard

Press the Add Style button Add Style Button on the top-left to open the Style Wizard. From here, you can select an example to insert and enter a name for the Style before it is created. The only thing left to do is create a feasible frame and add the Style to the Style Selector in the Position tab.

Conditional Styles Helper

Styles can be made conditional. Read more about conditional styles here!

If a series of Styles are using the same form field to activate it, the Printess Editor automaticlly recognizes this and displays a little button on the top to set the form field value so that the selected conditional Style is active.

Style Wizard

This allows you to work faster as you don’t need to switch between the Form Field and Style tabs all the time while testing and adjusting. Check out our Avatar T-shirt example to see a bunch of conditional Styles in action.

Styles and Multi Line Text

Special kinds of Styles are the character, paragraph, and base Styles of a frame. Paragraph Styles may contain all paragraph properties (e.g., indents, alignments, and paragraph distances) plus all character properties like font size, font color, etc. Character Styles can only use character properties such as font size and tracking.

Both Styles can either be applied to the frame (by using the Style selector from above) or selected within the Multi Line Text Editor in the Text tab. Syles can also be comfortably created within the Multi Line Text Editor.

Learn more about Multi Line text frame features here!

Select Style

Both usages have different outcomes. If you apply a Style within the Multi Line Text Editor (paragraph or character Style Selector), the properties which are set in the Style tab will disable the respective UI elements and you cannot overwrite the properties.

If you set the Style for the complete frame, it will form the new base style of the text (resetting all styles will also revert to this style). Properties can be overwritten in Designer & Buyer Side UI.

WARNING

Use a Style to define the base Style of the frame which will be used for Rich Text Editing. Otherwise once the buyer deletes all content there is no text Style assigned and the frame will return to the default base Style: Noto Sans, 12pt, black.

This can be achieved by selecting the base Style in the Text tab while not being in the Editor:

Select Base Style

Another convenient option if no Style has been created is to format the text as you want the base Style of the frame to be (for a minimum of one paragraph) and while the I-beam pointer is in the paragraph press the Add Paragraph Style button:

Select Base Style

A popup will appear asking for the name of the Style, which you must enter and select Set as base style for selected Frame. This will create a new Style and assign it to the current Multi Line Text Frame as its base Style.

Select Base Style

Tabulators

A special paragraph Style that cannot be addressed via the UI elsewhere are the tabulator settings.

Start by creating a new paragraph Style with tabulator settings included:

Create Tabs Style

This will create a Style where all tabulator-related properties are included. Alternatively you can add them manually to a Style by adding from the paragraph Style properties.

Create Tabs Style

Here is the same Style expressed in code:

.myTabs {
	fontSize: 12pt;
	tabSize: 150%;
	tabs: L1cm C_3cm R5cm .7cm;
	tabLineColor: [Black];
	tabLineType: dotted;
	tabLineHeight: 1pt;
}

Rule Above, Rule Below

Another special paragraph Style that cannot be addressed via the UI are the ruleAbove and ruleBelow Styles. Either use Add rules above and below in the Create New Paragraph Style dialogue or manually add the following properties to a style from the paragraph Styles properties.

ruleAbovexxx properties control a line above the paragraph and ruleBelowxxx properties control the line below a paragraph.

Select Style

The above Style will create the following output when it is assigned to the first paragraph.

Select Style

Here is the same Style expressed in code:

.headlineWithRuleBelow { 
 	font:Noto Sans; 
 	fontSize: 24pt; 
 	fontColor: [Black]; 
 	spaceAfterParagraph:15pt; 
 	 
 	ruleBelowWidth: frame; 
 	ruleBelowColor: Pink; 
 	ruleBelowOffset: 2pt; 
 	ruleBelowHeight:2pt;  
 	ruleBelowLineType:solid; 
} 

Condition Editor

The Condition Editor is a great way to build conditional Styles.

Please also read about conditional styles here

To add a condition to a Style press the Add condition icon at the bottom of the style and select Add Condition.

start condition editor

Once added it will have the start editor icon: start condition editor beside the condition in a Style.

With the Condition Editor you can easily combine AND and OR conditions for all the tests you do.

Here is an example of a conditional Style which exchanges an image only when the form field ‘hairstyle’ is set to ponytail and the form field ‘glasses’ is not set to glasses or the form field ‘haircolor’ is not set to Blonde. Below is the example condition represented in the Conditional Editor:

start condition editor

A big plus in the editor is that all defined values from a selected list are directly shown in drop-downs.

And this is how the condition looks in the Code Editor:

start condition editor

The Condition Editor is also used for conditionally visible form fields.

In addition to form field values, you can also use the following special values to test for:

Style Code Editor

The Style Code Editor helps you to edit styles as code with syntax highlighting, auto-completion, and error messages.
While typing, auto-completion will start to automatically display and filter options from items contained inside of your current code.

Auto Completion

To select an item from the list simply click on it or move up and down through the list with Cursor Up or Cursor Down and Return for inserting.

If an error is detected, an error message will appear at the bottom of the Editor tab.

For convenience, any colors used in a Style will create a small color patch to the left of the line where the color is mentioned.

Coded Style Syntax

If you are using the Code Editor to define Styles there is a certain CSS-like syntax you have to comply with. A Style is a collection of different properties and has a clear Syntax:

.stylename {
propertyName:value;
secondProperty:value;
}

Note that a Style always starts with a ‘.’ directly followed by the name of the Style (which must be unique). This is followed by the Style’s properties which are enclosed in two curly brackets {}. The properties can be nearly any aspect of a frame and even its content (e.g., fillColor, textColor, strokeWidth, etc.).

Each property needs to be set by propertyName followed by a ‘:’. Then comes the value after this there must be a semicolon ‘;’.

Here is the comprehensive cheat sheet of all the stylable properties of frames!