User Manual Quickstart General Concepts Buyer Side Snippets Styles and Form Fields Flex Designs Sub Documents Use for Preview Use as Functional Block Other Use Cases Scripting Print Workflow Tutorial Videos Frame Features Resources Style Reference Change Log Glossary Acknowledgements Api Reference Authorization Iframe Api Js Api Backend Api

Sub Documents

Sub Documents are the Swiss Army Knives of complex tasks in Printess.

Sub Documents are especially useful in the following situations:

One has to imagine a Sub Document as one of the pages of another document placed into the main document like an image. The magic thing is: it’s not an image, but a personalizable document.

Essentially every document can be a Sub Document. Just create another document. Simply go back to the main document and switch to the Sub Document tab, then all other documents are shown with their first page as icons in the Sub Document Feature tab.

Sub Document Tab

The small folder icon beside the document name will switch to this Sub Document. Click on the icon to insert the Sub Document into your document. Once inserted you can adjust the size of it and much like an image, you can fit, fill or crop it in its frame. (Read more about Sub Document fitting here!)

A Sub Document also has the option to select from one of its pages (Spreads). This is done by giving each spread in the Sub Document a unique name and enabling Show as Form Field in the Sub Document Frame Feature tab. (Read more about Sub Page selection here.).

One interesting aspect of selecting a page of a Sub Document on the Buyer Side, is that if you use text or image Frames and switch on Show as Form Fields for personalizable features, the Buyer can select a Page and this will also define the user interface shown, as only the Frames on the selected page will show its form fields. This clearly does not work with general document form fields created in the Resource tab, as they are global to all pages.

Use for Preview

Normally one would like to create their design on a flat surface. Once the design is done a good product preview will sell the item.

This can be achieved by warping the main document into a product preview.

In this designable drinking glass document, the Buyer designs his document essentially in a Sub-Document with the de-rolled printable area as document size.

Document Design Buyer

When the Buyer is happy with his design he can switch to the Preview Document, where the design is placed as a Sub Document warped on the glass front and back by cropping and using the Mug Warp feature.

Preview Design

The same principle applies to creating a document for printing, besides the printing area, the document may need to contain a barcode for the production workflow, a human readable customer name and a preview of the finalized product for quality control. Printess can achieve all of this in one simple Template!

Preview Design

Our example document Chocolate Bars shows a very nice example of a configurable chocolate bar where the Photorealistic Preview itself is the configuration interface. This example also uses the Spread Selection form field to change the Sub Documents between Banana or Strawberry - really impressive!

Chocolate Bar Example

Please have a look at the Chocolate Bar Example which is available in the Create New Document screen. If you look under the hood of this document you will see that the design itself is still just a simple, flat, very easy to maintain document.

Use as Functional Block

Sometimes one needs a graphical element which is also a functional block of the document. Lets have a look at a simple example. A typically formatted price tag with an input box to change the price.

Price Tag Example

As this cannot be achieved with a single text frame, the solution is to create a Sub Document for the price tag and break up the price into the big number and the small cents number.

Adding a Document form field and two small script literals makes this price tag functional:

Price Tag Main

Note that the text for the big number contains a small JavaScript literal:


This splits the price by . and selects the portion before it at index [0]].

Price Tag Small

The cents are done the same way except that in this case the second portion at index [1] is taken.

Grid Style Calendar
Printess enables for incredibly complex building blocks, which can then be used across several pages. One of the more intricate but powerful examples can be found in the Calendar Grid Style example one can create at the New Document tab.

Price Tag Small

Have a look into the month Sub Document. Not only can it calculate the existing days of a month in any given year but it can take data from an events table full of holidays and birthdays, and its design is completely controlled via Styles. Please read more about how the calendar was done in the Scripting section of the manual.

Other Use Cases

Please have a look at our Children’s Book example where a Sub Document is used to propagate the hair style throughout the document.

Price Tag Small

(Read more about the Children’s Book in the Styles and Form Fields chapter here.)

In the same chapter we also talk about the Retro Sign example. This example also makes extensive use of Sub Documents to create convenient features likes holes, varnishing and corner cuts in the document.

(Read more about the Retro Sign in the Form Fields chapter here.)