---
title: "Safety Lines"
canonical: https://customerscanvas.com/docs/cc6/safety-lines.htm
archived: true
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Design Editor"
    versions: ["6.15.0", "6.x (may differ)"]
---

**You’re viewing outdated documentation.** [View the latest Customer’s Canvas On-Premises documentation](https://customerscanvas.com/docs/on-premises/).

# Safety Lines

**Applies to:** Customer's Canvas On-Premises; Design Editor 6.15.0, 6.x (may differ) · **Archived documentation**
 
No one wants a part of the graphics painstakingly designed by a customer to be suddenly cut off. For example, if you place a design element right on the product edge and need to print many product copies on a single paper sheet, then it is not an easy task to cut off these copies both without white borders left and keeping the design intact. So, your users should be aware of a safety zone, where they can safely place their design elements. At the other hand, your personnel should know a bleed zone, where they can safely cut off printed products.
 
Customer's Canvas manages this case using safety lines and [crop marks](https://customerscanvas.com/docs/cc6/crop-marks.htm.md). The safety/bleed lines show the safety zone and allow for warning your users of placing the elements too close to a product edge in the web-to-print editor. The crop marks define the bleed zone on printed orders so that your personnel sees where they can safely cut off the product copies.
 
## Safety Lines
  
You can define the safety lines through the product configuration in the editor but not through the PSD templates. These lines are shown only at the design time as follows:
 
![The safety lines on a pocket calendar.](https://customerscanvas.com/docs/cc6/images/SafetyLines.png)
 
Technically, the [ISafetyLine](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.isafetyline.htm.md) interface defines these lines. It contains parameters to set up a width of the bleed zone and a style of safety lines. The width is measured in points (1/72 of an inch). For example, if you need the bleed zone of 1/8 of an inch, you should set margins to `9`. You can set up a single margin for all four product sides or two separate margins for top/bottom and left/right sides.
 
### The Product Definition
 
You can configure the safety lines for either all product surfaces or a single surface.
 
To define safety lines for all product surfaces, pass the [IProductDefinition.defaultSafetyLines](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.iproductdefinition.htm.md) property to [loadEditor](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.loadeditor.htm.md).
 
```
let productDefinition = {
    defaultSafetyLines: [{
        margin: {
            horizontal: 5,
            vertical: 10
        },
        color: "rgba(0,255,0,1)",
        altColor: "rgba(255,255,255,0)",
        stepPx: 5,
        widthPx: 1
    }],
    surfaces: ["pocket_calendar", "pocket_calendar_back"]
};

CustomersCanvas.IframeApi.loadEditor(iframe, productDefinition);
```
 
Note that the default measurement units in Customer's Canvas are points. If a parameter accepts other units, then the unit name is specified in the parameter name like **stepPx** and **widthPx** in this example.
 
If the [IProductDefinition.defaultSafetyLines](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.iproductdefinition.htm.md) property is set up, then all product surfaces will have the same safety lines by default. The default safety lines can be overridden for any surface by setting the surface's safety lines as follows:
 
```
let productDefinition = {
    surfaces: [{
        designFile: "pocket_calendar", 
        safetyLines: [{
            margin: 9,
            color: "rgba(0,255,0,1)",
            altColor: "rgba(255,255,255,0)",
            stepPx: 5,
            widthPx: 1
        }]
    }]
};
```
 
Here, the [IPrintAreaTemplate.safetyLines](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.iprintareatemplate.htm.md) property sets safety lines for a surface having a design template. To set safety lines for a blank surface having no design template, use the [IPrintAreaDefinition.safetyLines](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.iprintareadefinition.htm.md) property.
 
```
let productDefinition = {
    surfaces: [{
        width: 200, 
        height: 150, 
        printAreas:[{
            bounds: { x:0, y:0, width: 200, height: 150}, 
            safetyLines: [{
                margin: 9,
                color: "rgba(0,255,0,1)",
                altColor: "rgba(255,255,255,0)",
                stepPx: 5,
                widthPx: 1 
            }]
        }]
    }]
};
```
 
### The Safety Zone with Rounded Corners
 
You may want to define rounded corners of the safety zone for some products. In this case, add the **borderRadius** property to the **safetyLines** definition.
 
```
let productDefinition  = {
    surfaces: [{
        designFile: "sticker", 
        safetyLines: [{
            margin: 9,
            borderRadius: "10 20"
        }]
    }]
};
```
 
The **borderRadius** property takes a string containing space-separated values. As well as in the CSS format, you can specify up to four values for all the corners:
 
- `borderRadius: "10"` - one common radius for all four rounded corners.
- `borderRadius: "10 20"` - the upper-left and lower-right radiuses are `10`, and the upper-right and lower-left radiuses are `20` points.
- `borderRadius: "10 20 30"` - the upper-left radius is `10`; the upper-right and lower-left radiuses are `20`; the lower-right radius is `30`.
- `borderRadius: "10 20 30 40"` - the upper-left, upper-right, lower-right, and lower-left radiuses.

By default, these values are measured in points. Also, you can define them in percent of the width and height of the design: `"20%"`. To apply arcs of ellipses to the rounded corners, you can specify the values as follows: `"5/20"`. For example, `borderRadius: "10 20 30/20 5%"` is equivalent to the following widths and heights of ellipses:
 
- The upper-left corner: (10;20).
- The upper-right corner: (20;5%).
- The lower-right corner: (30;20).
- The lower-left corner: (20;5%).

### The Editor Configuration
 
You can configure the safety lines' behavior both globally through the `clientConfig.json` file and for a single product through the [IConfiguration](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.configuration.iconfiguration.htm.md) interface. In the later case, you should pass the configuration to the [loadEditor](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.loadeditor.htm.md) method.
 
If at least one safety line is specified for a surface, the **Safety lines** check box is displayed under **Markings** in the user interface.
 
![The safety lines toggle button.](https://customerscanvas.com/docs/cc6/images/SafetyLinesButton.png)
 
This button allows the user to show and hide safety lines. You can disable this check box using the **safetyLinesCheckboxEnabled** configuration parameter to disallow your users to hide these lines. There are several other configuration parameters related to safety lines:
 
- **previewModeCheckboxEnabled** enables the Preview mode in the editor; in this mode, safety lines as well as bleed and slug areas are not displayed on the canvas.
- **safetyLineViolationWarningEnabled** enables a warning displayed if a design element crosses a safety line.
- **proofImageSafetyLinesEnabled** draws safety lines on the proof images.
- **proofImageCropSafetyLine** sets the name of a safety line which proof images are cropped to; if there is no safety line with the given name, proof images are not cropped. For more information, see the [Configuring High Resolution and Proof Images](https://customerscanvas.com/docs/cc6/configuring-high-resolution-and-proof-images.htm.md) topic.
- **alignToSafetyLineName** sets the name of a safety line which design items can be aligned to; if there is no safety line with the name, then the first safety line in the array is used.

For example, let us enable the warning, crop proof images, and disallow for hiding the safety lines for a product.
 
```
let productDefinition = {
    surfaces: [{
        designFile: "pocket_calendar", 
        safetyLines: [{
            name: "line1",
            margin: 9,
            color: "rgba(0,0,255,1)",
            altColor: "rgba(255,255,255,0)"
        }]
    }]
};

let configuration = {
    widgets: {
        BottomToolbar: { safetyLinesCheckboxEnabled: false }
    },
    violationWarningsSettings: { safetyLineViolationWarningEnabled: true },
    rendering: { proofImageCropSafetyLine: "line1" }
};

CustomersCanvas.IframeApi.loadEditor(iframe, productDefinition, configuration);
```
 
### PDF Page Boxes
 
When you render hi-res outputs to PDF files, you can use the **pdfBox** property to apply margins of your safety lines to either **CropBox**, **TrimBox**, or **BleedBox**. By default, PDF outputs are not cropped. In the following example, we set two safety lines in a product definition and specify that they will be assigned to **CropBox** and **TrimBox** page boxes in the resulting PDF file.
 
```
let productDefinition = {
    surfaces: [{
        designFile: "invitation",
        safetyLines: [
            { 
                margin: 8,
                color: "rgba(200,10,10,0.7)",
                pdfBox: "Crop"
            },
            {
                margin: { horizontal: 8, vertical: 10 },
                color: "rgba(10,200,10,0.7)",
                pdfBox: "Trim"
            }
        ]
    }]
};
```
 
## Crop Marks
  
You can draw safety lines on proof images to verify that all elements are fit the safety zone. To specify bleed zones where the printed page should be cut off, you can draw crop marks. Customer's Canvas allows for drawing additional page information like an order number, a file name, a date, and more. Crop marks are shown on both proof images and hi-resolution outputs.
 
For details, you can refer to the [Crop Marks](https://customerscanvas.com/docs/cc6/crop-marks.htm.md) topic.
 
## The Bleed and Slug Areas in InDesign
  
Customer's Canvas imports the bleed and slug margins from InDesign templates. The editor expands the product boundaries to accommodate the slug area and marks the bleed area with safety lines. To change styles of these lines, you can define the `bleed` and `slug` safety lines in either [defaultSafetyLines](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.iproductdefinition.htm.md) or [safetyLines](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.isafetyline.htm.md), for example:
 
```
let productDefinition = {
    surfaces: [{
        designFile: "flyer",
        safetyLines: [
            { name: "bleed", color: "rgba(0,0,0,1)", altColor: "rgba(0,0,0,0)", stepPx: 15, widthPx: 1 },
            { name: "slug", color: "rgba(110,110,110,1)" }
        ]
    }]
};
```
 
You can also change the appearance of bleed and trim lines on the canvas through the `printZone` object in the editor's config, for example:
 
```
let configuration = {
    canvas: {
        printZone: {
            bleed: {
                color: "rgb(0,100,0)",
                altColor: "rgb(0,100,0)",
                step: 5,
                width: 1
            },
            trim: {
                color: "rgb(0,0,0)"
            }
        }
    }
};
```
 
When a template contains the bleed and slug areas, the corresponding lines appear on the canvas. You can set **proofImageSafetyLinesEnabled** to `true` to enable them on proof images. To display these areas in the hi-res output, you need to define the [crop marks](https://customerscanvas.com/docs/cc6/crop-marks.htm.md).
 
## The Trifold Example
  
Let us look at a real use case of setting up a flexible markup. For example, if you print trifold-brochures, then every printed page is folded into three parts. While designing such a product in Customer's Canvas, you can display safety lines for all three parts, [folding lines](https://customerscanvas.com/docs/cc6/configuring-folding-lines-and-spines.htm.md), and the bleed zone with [crop marks](https://customerscanvas.com/docs/cc6/crop-marks.htm.md).
 
![The trifold-brochure markup.](https://customerscanvas.com/docs/cc6/images/CropMarksTrifold.png)
 
This is the proof image, so neither safety lines nor folding lines are printed on the resulting hi-res output. We applied the following settings for this markup.
 
```
let productDefinition = {
    surfaces: [{
        width: 792, 
        height: 612,
        foldingLines: [{
            margin: "264",
            isVertical: true,
            pen: { color: "green", altColor: "green", width:2 }
        }, {
            margin: "528",
            isVertical: true,
            pen: { color: "green", altColor: "green", width:2 }
        }],
        printAreas: [{
            bounds: { x:0, y:0, width: 792, height: 612}, 
            cropMarks: [{
                margin: 8,
                length: 7,
                color: "black",
                topNotes: [
                    { fontSize: 7, alignment: "Left", text: "trifold-brochure.pdf", edgeMargin: 0.1 },
                    { fontSize: 7, alignment: "Center", text: '1/8" Bleed', edgeMargin: 0.1 }          
                ]
            }],
            safetyLines: [
                { margin: 9, color: "yellow", altColor: "yellow" },
                { margin: { horizontal: 255, vertical: 9 }, color: "yellow", altColor: "yellow" },
                { margin: { horizontal: 273, vertical: 9 }, color: "yellow", altColor: "yellow" }
            ]
        }]
    }]
};

let configuration = {
    rendering: {
        proofImageSafetyLinesEnabled: true
    },
    violationWarningsSettings: { safetyLineViolationWarningEnabled: false }
};

CustomersCanvas.IframeApi.loadEditor(iframe, productDefinition, configuration);
```
 
Note that margins, heights, and widths are in points. In this example, they define the 8.5" x 11" page with the 1/8" bleed zone.
 
## Non-rectangular Products
  
You can easily set up safety lines and [crop marks](https://customerscanvas.com/docs/cc6/crop-marks.htm.md) for rectangular products in the web-to-print editor as this topic describes. Alternatively, you can put bleed lines in a design template in Photoshop as shown in the following image.
 
![The bleed zone for non-rectangular products.](https://customerscanvas.com/docs/cc6/images/CropMarksRound.png)
 
Here, the red circle defines the safety zone. This layer has the `<VNP>` marker to show only in the editor. The black circle defines where your personnel should cut off this product. To hide a layer in the editor but at the same time print it on hi-res outputs, you can add the `<VNS>` marker to this layer in Photoshop.
 
However, when a product shape allows for applying the built-in functionality of Customer's Canvas, like rounded corners of the safety zone, do not include such lines in your templates. Editing the designer's configuration is more flexible than modifying your PSD files.
 
## See Also
  
### Manual
 
- [Understanding Print Products](https://customerscanvas.com/docs/cc6/understanding-print-products.htm.md)
- [Crop Marks](https://customerscanvas.com/docs/cc6/crop-marks.htm.md)
- [Configuring High Resolution and Proof Images](https://customerscanvas.com/docs/cc6/configuring-high-resolution-and-proof-images.htm.md)
- [Supported Markers](https://customerscanvas.com/docs/cc6/supported-markers.htm.md)

### IFrame API Reference
 
- [ISafetyLine](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.isafetyline.htm.md)
- [ICropMark](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.icropmark.htm.md)
