--- title: Print Integration description: Print Integration with WoodWing Studio --- Deprecated in: [`release-2026-01`](/operations/releases/release-2026-01/) ## Motivation Livingdocs is often used as an editor for both online and print publications in a so-called content-first (or even online-first) workflow. A simple workflow just exports the Livingdocs article to a print system whenever a publish is performed. We have an open-source example for a serverless app that builds upon a Livingdocs webhook and exports to WoodWing Studio: [livingdocsIO/livingdocs-to-woodwing-exporter](https://github.com/livingdocsIO/livingdocs-to-woodwing-exporter) — Exporter from Livingdocs to WoodWing Studio Sometimes, a simple export is not enough for the editors. For this use case we have built-in support for: - choosing a layout (e.g. InDesign template) from the print system - previewing that layout in the preview window next to a Livingdocs article (actual print system rendering) With this system, editors can see how their article will be displayed in print (linebreaks, overflow, etc.) while they are writing in Livingdocs. An example of this workflow is shown in this video: [Watch video on Vimeo](https://vimeo.com/456695030) ## Print system support Out of the box, we support [WoodWing Studio](https://www.woodwing.com/en/multichannel-publishing) using a connector developed by the companies [BrixWare](http://www.brixware.com) and [a&f](https://www.a-f.ch) as well as [NewsNT](https://www.michelic-partner.com/projectnewsnt.html) using a connector developed by the company [Sternwald](https://www.sternwald.com/). Other print systems can potentially be setup but require custom development. ## Setup The presented setup assumes a workflow with different content-types for online and print. Editors can then choose on "Write new article" if they want to start with an online or a print article. If they start with the online article they have the option to make a print copy out of the online article and continue refining this for print. To get an impression of the workflow you can watch this video (although the video starts with print and copies to online): [Watch video on Vimeo](https://vimeo.com/455953898) ### Setup a print content-type In order to follow this example we advise you to use our [Service](https://edit.livingdocs.io) with the pre-configured Sandbox. The example can of course be applied to any Livingdocs project with a configurable project config. First of all, use the [CLI](/reference/cli/managing-project-configs/llms.txt) to download the project config of your service project to your local computer and open it with a code editor of your choice. In our service Sandbox we already have a content-type for an online article. It has the handle `regular`. So the first thing we need to do is to add a content-type for the print article. It will look as follows: ```js { handle: 'woodwing', documentType: 'article', info: { label: 'Print Article' }, components: [ {name: 'paragraph'}, {name: 'toptitle'}, {name: 'catchline'}, {name: 'headline'}, {name: 'print-subtitle'}, {name: 'lead'}, {name: 'byline'} ], editorWrapper: '
', defaultContent: [ {component: 'catchline'}, {component: 'headline'}, {component: 'lead'}, {component: 'byline'}, {component: 'paragraph'} ], metadata: [ { handle: 'title', type: 'li-text', config: { maxLength: 200 } } ], print: { enabled: true, enableStepZooming: true, componentMap: { // Woodwing: Obertitel 'toptitle': { title: 'toptitle' }, // Woodwing: Spitzmarke 'catchline': { title: 'catchline' }, // Woodwing: Titel 'headline': { title: 'title' }, // Woodwing: Kursivtitel 'print-subtitle': { title: 'subtitle' }, // Woodwing: Autor 'print-byline': { text: 'author' }, // Woodwing: Lead 'print-lead': { text: 'lead' }, // Woodwing: Grundtext 'paragraph': { text: 'text' } } } } ``` A few things to note here: - we set the option `print.enabled` to true. This activates the print features (layout selection, print preview) for this content-type. - the handle in this case is `woodwing`. You are free to name it whatever you want, but our service uses a pre-configuration with a test installation of the WoodWing Studio connector (DO NOT USE THIS PRODUCTIVELY!). - we have a `components` section and a `componentMap` section. Each component needs a respective entry in the component map in order to be exported to the print system. We only showed a subset of the supported components here, for a productive setup you want to discuss this with your print system provider. - we set the `print.enableStepZooming` option to true. In that configuration editors can zoom the print preview with a mousewheel similar to the image crop interface in the Livingdocs editor. If it is set to `false` the print preview will be static and can be toggled between sidescreen and fullscreen. We leave out the steps to create the references components as well as grouping them in the `designSettings` and requiring them in the project config's index file. Those steps are equivalent to what you do for online articles, see [here](/guides/documents/document-design/llms.txt). Once you require the new content-type in our project configs index file and publish the config you will be able to create print articles from the "Write new article" button. ### Setup an online to print copy config In order to copy a print article from an existing online article, we will use the copy feature of Livingdocs. In the `settings` section of your project config add a config as follows: ```js copy: [ { source: { contentType: 'regular' }, targets: [ { contentType: 'woodwing', metadata: { map: ['title'] }, instructions: { componentConversions: [ { match: 'article-container', exclude: true }, { match: 'head', result: [ { component: 'catchline', directives: { title: {takeFrom: 'flag'} } }, { component: 'headline', directives: { title: {takeFrom: 'title'} } }, { component: 'lead', directives: { text: {takeFrom: 'text'} } }, { component: 'byline', directives: { text: {takeFrom: 'author'} } } ] }, { match: 'subtitle', result: [ { component: 'print-subtitle', directives: { title: {takeFrom: 'title'} } } ] }, { match: 'paragraph', copy: true } ] } } ] } ] ``` A few things to note: - we copy from the content-type `regular` to the content-type `woodwing`, this is our online to print copy configuration - again we only apply the conversion to a subset of the available components for demo purposes. For more details on the available conversion rules see [here](/guides/editor/declarative-document-copy/llms.txt) As before, use the [CLI](/reference/cli/managing-project-configs/llms.txt) to publish the changes to your project config. You will now have a "Copy" button in the topbar of an online article. When pressing it, you have the option to copy it to a print article. If you do so, a new print article (with the preview and layout selection) is created for you and the component of the online article are mapped to the print article according to the configured rules. ## Implementation Details This section is not about the setup but contains background information for print system integrators that want to implement the Livingdocs Print API. ### Headless API Livingdocs itself knows nothing about a print layouting system. All it does is rendering information it gets back. In order to do this, Livingdocs sends out requests to a number of defined endpoints and expects results in a certain format. Currently, the data format is in XML which was basically driven by need. If you'd rather have JSON, please get in contact with us, we'd love to do this. Most likely you will implement a middleware in between Livingdocs and your print system that takes the requests from Livingdocs and transforms them to requests of your print system, delivering back the relevant information. To sum up: - Livingdocs sends the requests. Your integration needs to respond to those. You never need to send a request to Livingdocs on your own initiative. - The data format is (currently) XML - You need to provide Livingdocs with the relevant print information otherwise Livingdocs can not perform a reliable job informing about the layouting system ### The endpoints All Livingdocs requests require you to have configured endpoints on your side where your middleware sits. The respective entry in the Livingdocs server configuration looks as follows: ``` print: { enabled: true host: 'https://your-host.com' xmlRoot: 'pathUnderWhichTheEndpointsLive' } ``` Note: this config still sits under the `hugo` key in the server configuration. This is due to legacy support, the print interface is not necessarily connected to hugo. In the example above we would send each of the following requests to `https://your-host.com/pathUnderWhichTheEndpointsLive/` The subsequent subchapters look at each of the possible requests. #### Layouts Before a print document is created and whenever a user wants to change the layout of an existing print article, Livingdocs will ask you for the list of available layouts. Layouts assume a layout-for-text workflow. Thus they are the placed and sized boxes in your InDesign file for a specific publication of your newspaper. Journalists are expected to fit their text into those layouts. Livingdocs sends the following request to get the layouts. To: ```http POST /support ``` Payload: ```xml ``` As you can see there are basically 2 parts: an authentication and the layout request. The authentication sends you a username and a password that you can use to authenticate Livingdocs with your middleware. You can currently only configure one user for all requests. The layout part queries for the requested publication and the date of this publication (e.g. tomorrow's newspaper). The date will be in the format "dd.mm.YYYY", e.g. "02.09.2016". Your response should look as follows: ```xml ``` Each line represents one layout, i.e., one placed and sized box in the InDesign file. The information you need to provide are: - `department`, the organisational department of the newspaper, e.g. 'International' - `group`, namespacing in your layout - `id`, a unique id with which you can access the layout, Livingdocs will store this and send it to the middleware in subsequent requests - `columns`, the number of columns that this layout has - `name`, the name of this layout, will be displayed in the Livingdocs layout search (see screenshot below) - `page`, the page of your newspaper where this layout is placed - `status`, one of the supported [statuses](#available-statuses) - `publication`, the publication to which this layout belongs - `publicationDate`, the date of the publication for which the layout was requested ![Choose a print layout in Livingdocs](/guides/integrations/print/print-layout.png) _The screenshot above shows how to choose a print layout in the Livingdocs user interface_ #### Templates Templates are basically the same as layouts, except that they are for text-for-layout workflows. Templates are pre-defined boxes that are not yet placed on any publication or edition but are common blueprints, e.g. a one-column text. Livingdocs sends the following request to get the templates. To: ```http POST /support ``` Payload: ```xml ``` Again, we are using an authentication block. The second block defines the publication name for which you want to get the templates. Note that you don't get a specific publication date since templates are independent of any specific edition. The `allowedOnCms` parameter will always be `true` for calls from Livingdocs. Your response should look as follows: ```xml