---
title: "Config Reference"
canonical: https://customerscanvas.com/docs/cc6/preflight-tool-config.htm
archived: true
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Preflight Tool"
    versions: ["1.15.3", "1.8.4-1.23.8 (may differ)"]
---

**You’re viewing outdated documentation.** [View the latest Customer’s Canvas On-Premises documentation](https://customerscanvas.com/docs/on-premises/).

# Config Reference

**Applies to:** Customer's Canvas On-Premises; Preflight Tool 1.15.3, 1.8.4-1.23.8 (may differ) · **Archived documentation**
 
In the [distribution package](https://customerscanvas.com/docs/cc6/preflight-tool-install.htm.md), you can find the `config.json` file. This file configures both the multistep editor (not covered in this topic) and the Preflight Tool widget. In this file, you must define such properties as the URL of the server component, preflight rules, and front-end parameters.
 
**Note** 
You can load this configuration from an external file (as in the provided [sample](https://customerscanvas.com/docs/cc6/preflight-tool-install.htm.md)), define it as a variable in JavaScript code, or even read it from your database.
 
Front-end parameters allow you to set up the workflow and appearance of this tool. Now, let's see how you can configure the **preflight** widget. The following example represents the **params.config** object and shows how you can specify a 720 x 576 pt product with 300 dpi, configure the bleed zone, set a preflight rule to check the color space, and enable a button to upload the users' files.
 
```
{
    "language": "en",
    "backendUrl": "https://pt.example.com/",
    "startFromUploader": true,
    "uploader": {
        "fileTypes": [".pdf", ".jpg", ".jpeg"],
        "multiple": true,
        "initialMode": "default",
        "fileUploadBehavior": "insertCurrent"
    },
    "product": {
        "allowAddPages": true,
        "allowAddPagesUploading": false,
        "allowDeletePages": true,
        "pages": [{title: 'First'}, {title: 'Second'}],
        "dpi": 300,
        "bleed": 20,
        "bleedLineWidth": 20,
        "size": {
            "width": 720,
            "height": 576
        },
        "safetyLines": [{
            "name": "bleed",
            "margin": 40
            "color": "#00ff00",
            "altColor": "#00ff00",
            "stepPx": 5,
            "widthPx": 1,
            "borderRadius": 0,
            "legend": {
                "title": 720,
                "description": 576
            }
        }],
        "mockup": {
            "size": { width: 0, height: 0 },
            "location": { x: 0, y: 0 },
            "image": "",
            "sourceType": ""
        }
    },
    "viewer": {
        "locked": false,
        "shadeBleedZone": false,
        "bleedZoneColor": "",
        "keepAspectRatio": false,
        "rulers": {
            "enabled": true,
            "unit": "inch",
            "customUnitScale": 1,
            "origin": { "x": 0, "y": 0 }
        },
        "zoom": {
            "min": 0.2,
            "max": 1.2,
            "step": 0.1,
            "default": 1,
            "mode": "none"
        }
    },
    "rules": [{
        "type": "colorspace",
        "severity": "error",
        "enableFix": true,
        "params": {
            "allowedColorSpaces": ["cmyk"]
        }
    }],
    "rendering": {
        "hiResOutputToSeparateFiles": false,
        "trimPreviewOnBleed": true,
        "showTrimLineOnPreview": false,
        "keepPdfOriginalColors": false,
        "cmykColorProfileId": "",
        "grayscaleColorProfileId": "",
        "rgbColorProfileId": "",
        "previewSize": {
            "width": 800,
            "height": 800
        },
        "hiResOutputPdfMetadata": {
            "author": "",
            "creator": "",
            "keywords": "",
            "subject": "",
            "title": ""
        }
    },
    "interface": {
        "topToolbar": [{
            "name": "upload",
            "visibility": "",
            "enabled": "",
            "style": {
                "background-color": "white"
            }
        }],
        "customButtons": [{
            "title": "Fix all",
            "filter": {
                "severity": ["error"],
                "types": ["colorspace"]
            },
            "style": {
                "background-color": "white"
            }
        }]
    }
}
```
 
Now, let's see the description of these configuration parameters and their values.
 
|  Name |  Data type |  Description |
| --- | --- | --- |
   |  language |  string |  The language of the user interface, either `"en"` or `"nl"`. The default value is `"en"`. |
 |  backendUrl |  string |  The URL that links to the running back end. |
 |  startFromUploader |  boolean |  If `true`, displays the file uploader when opening the Preflight Tool. The default value is `true`. |
 
#### The file uploader
 
object: `uploader`
 
|  Name |  Data type |  Description |
| --- | --- | --- |
   |  fileTypes |  array containing any combination of `".pdf", ".ai", ".jpg", ".jpeg", ".tiff", ".eps", ".psd", ".png"` |  Extensions of files that a user is allowed to upload to the Preflight Tool. The default value is `[".pdf"]`. |
 |  multiple |  boolean |  If `true`, this parameter enables multiple selection of files to be uploaded. In this case, the Preflight Tool creates a multipage document, and the page order is the same as their upload order. The number of the uploaded pages cannot exceed the product.pages value. The default value is `true`. |
 |  initialMode |  `"fitToBleed"`, `"fitToTrim"`, `"fillToTrim"`, `"fillToBleed"`, `"default"` |  Defines how the file should be adjusted after it is uploaded. You can fit or fill the file to the product **BleedBox** and **TrimBox**. By default, the file is inserted as is. |
 |  fileUploadBehavior |  `"replaceFull"`, `"insertCurrent"`, `"insertNew"` |  Defines how the file should be placed on the pages.<ul> <li> <code>"replaceFull"</code> - clears the current product and inserts the uploaded file starting from the first page.</li> <li> <code>"insertCurrent"</code> - inserts the uploaded file starting from the current page.</li> <li> <code>"insertNew"</code> - inserts the uploaded file into the newly added pages.</li> </ul>The default value is `"insertCurrent"`. |
 
#### Products
 
object: `product`
 
|  Name |  Data type |  Description |
| --- | --- | --- |
   |  allowAddPages |  boolean |  Allows users to add new pages to the product. The default value is `false`. |
 |  allowAddPagesUploading |  boolean |  Automatically adds pages to the product if the uploaded file has more pages than defined. The default value is `false`. |
 |  allowDeletePages |  boolean |  Allows users to delete pages from the product. The default value is `false`. |
 |  pages |  number | Page[] | [PageLimit](https://customerscanvas.com/docs/cc6/preflight-tool-faq.htm.md) |  Defines either an array of product pages or the number of pages. A **Page** object contains a **title** property and allows you to define page titles in the user interface. **PageLimit** contains the **init**, **min**, and **max** properties and allows you to set the initial number of pages as well as page number limits. The default value is `1`. For details, see the [Frequently Asked Questions](https://customerscanvas.com/docs/cc6/preflight-tool-faq.htm.md). |
 |  dpi |  number |  The resolution of the output image. The default value is `300`. |
 |  bleed |  number | [IMarginLTRB](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.imarginltrb.htm.md) | [IMarginHV](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.imarginhv.htm.md) |  The bleed zone. This margin extends the resulting image. The default value is `0`. |
 |  bleedLineWidth |  number |  The width of the line indicating the bleed zone, in points. This property changes only the visual representation in the veiwer and does not affect rendering to the print file. The default value is `0.5`. |
 |  The product size object: `size` |
 |  width |  number |  The width of the resulting image, in points. |
 |  height |  number |  The height of the resulting image, in points. |
 |  Safety lines on the previews object: `safetyLines` |
 |  name |  string |  The name of the safety lines, an arbitrary string. |
 |  margin |  number |  The distance between safety lines and design bounds. |
 |  color |  string |  The main color of safety lines in the CSS format. |
 |  altColor |  string |  The alternative color of safety lines in the CSS format. |
 |  stepPx |  number |  The length of the safety line dashes. |
 |  widthPx |  number |  The width of safety lines. |
 |  borderRadius |  string or number |  The definition of rounded corners in the CSS format. For details, see the [Safety Lines](https://customerscanvas.com/docs/cc6/safety-lines.htm.md) topic. |
 |  The safety line description object: `safetyLines.legend` |
 |  title |  string |  The title of the safety line, which appears on the right panel. |
 |  description |  string |  The description of the safety line, which appears on the right panel. |
 |  Mockups object: `mockup` |
 |  size |  object |  The width and height of the mockup, in points. If not set, the mockup fills in the entire product. Note that the real size of the mockup should be equal to or greater than the product size. |
 |  location |  object |  The position of the upper-left corner of the mockup. The default value is `{ x: 0, y: 0 }`. |
 |  image |  string |  If **sourceType** is `"web"`, it should be the URL to the image; if **sourceType** is `"local"`, it should be the name of a file in the [mockup folder](https://customerscanvas.com/docs/cc6/preflight-tool-install.htm.md); if sourceType is `"assetStorage"`, it should be the ID or the path to resource in asset storage. |
 |  sourceType |  `"assetStorage"`, `"local"`, `"web"` |  The asset source type. The default value is `"web"`. |
 
#### The Viewer
 
object: `viewer`
 
|  Name |  Data type |  Description |
| --- | --- | --- |
   |  locked |  boolean |  If `true`, does not allow for manipulating elements. The default value is `false`. |
 |  shadeBleedZone |  boolean |  If `true`, applies the bleedZoneColor to the bleed zone. The default value is `false`. |
 |  bleedZoneColor |  string |  The color of the bleed zone is applied when shadeBleedZone is `true`. The default value is `"cmyk(0%,0%,0%,50%,50%)"`. |
 |  keepAspectRatio |  boolean |  If `true`, maintains the design aspect ratio. The default value is `true`. |
 |  Rulers object: [rulers](https://customerscanvas.com/docs/cc6/configuring-rulers-and-grids.htm.md) |
 |  enabled |  boolean |  If `true`, displays the rulers. The default value is `true`. |
 |  unit |  `"inch"`, `"mm"`, `"cm"`, `"point"`, `"custom"` |  The measurement unit of the rulers. The default value is `'inch'`. |
 |  customUnitScale |  number |  The ratio of the custom unit to points. This parameter is applied only if the unit parameter is set to `"custom"`. For more details, you can refer to the [Markings](https://customerscanvas.com/docs/cc6/configuring-rulers-and-grids.htm.md) topic. The default value is `1`. |
 |  origin |  object |  The point of origin relative to the upper-left corner of the design. The coordinates are measured in the units specified by the **unit** parameter. The default value is `{ "x": 0, "y": 0 }`. |
 |  Viewer zoom object: `zoom` |
 |  min |  number |  The minimum zoom of the viewer. The default value is `0.1`. |
 |  max |  number |  The maximum zoom of the viewer. The default value is `1.5`. |
 |  step |  number |  The step of increasing or decreasing the zoom level of the viewer. The default value is `0.1`. |
 |  default |  number |  The initial zoom value of the viewer. This parameter has a higher priority than the zoom mode. The default value is `1`. |
 |  [mode](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.editor.zoommode.htm.md) |  `"none", "bestFit", "bestFitShrinkOnly", "fitToWidth", "fitToHeight", "fitToWidthShrinkOnly", "fitToHeightShrinkOnly"` |  This parameter only works when you do not specify zoom.default in the configuration. For example, you can place an entire large product in the viewer if you omit **zoom.default** and set **zoom.mode** to `"bestFit"`. The default value is `"none"`. |
 
#### Preflight rules
 
object: [rules](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md)
 
|  Name |  Data type |  Description |
| --- | --- | --- |
   |  type |  ["colorspace"](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md), ["spotcolors"](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md), ["resolution"](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md), ["safetyboxes"](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md), ["nomargins"](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md), ["insideBleedbox"](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md), ["sameorientation"](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md), ["forbiddenfonts"](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md), ["allowedfonts"](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md), ["fonttypes"](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md), ["minfontsize"](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md), ["textascurves"](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md), ["embeddedfonts"](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md) |  The rule type. |
 |  severity |  `"error"`, `"warning"` |  The rule severity. All errors must be fixed before rendering the resulting image, whereas warnings may remain on the design. |
 |  enableFix |  boolean |  If `true`, displays the **Fix** button to autofix errors. |
 |  params |  object |  Parameters of the rule depending on its type. For more details, see the [Preflight Rules](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md) topic. |
 
#### Rendering settings
 
object: `rendering`
 
|  Name |  Data type |  Description |
| --- | --- | --- |
   |  hiResOutputToSeparateFiles |  boolean |  If `true`, the hi-res output for each page of a multipage product is put in a separate file. The default value is `false`. |
 |  trimPreviewOnBleed |  boolean |  If `true`, trims preview images and page thumbnails to the Bleed area. The default value is `true`. |
 |  showTrimLineOnPreview |  boolean |  If trimPreviewOnBleed is `false` and this value is `true`, displays trim lines on preview images. The default value is `false`. |
 |  keepPdfOriginalColors |  boolean |  If `true`, saves the output PDF file with the original color profile. The default value is `false`. |
 |  cmykColorProfileId |  string |  The identifier of the CMYK color profile in Asset Storage. |
 |  grayscaleColorProfileId |  string |  The identifier of the grayscale color profile in Asset Storage. |
 |  rgbColorProfileId |  string |  The identifier of the RGB color profile in Asset Storage. |
 |  The size of preview images object: `previewSize` |
 |  width |  number |  The width of preview images, in pixels. The default value is `800`. |
 |  height |  number |  The height of preview images, in pixels. The default value is `800`. |
 |  PDF metadata object: `hiResOutputPdfMetadata` |
 |  author |  string |  The author of the PDF document. |
 |  creator |  string |  The creator of the PDF document. |
 |  keywords |  string |  Keywords of the PDF document. |
 |  subject |  string |  The subject of the PDF document. |
 |  title |  string |  The title of the PDF document. |
 
#### The user interface
 
object: `interface`
 
|  Name |  Data type |  Description |
| --- | --- | --- |
   |  Top Toolbar buttons array: `topToolbar` |
 |  name |  string |  The button name. In the current implementation, you can use the following predefined button names: `"upload", "fillToBleed", "fillToTrim", "fitToBleed", "fitToTrim", "center", "reset", "keepAspectRatio", "rotateCanvas", "rotateImage", "applyToAll", "fullscreen"`. |
 |  visibility |  `"always"`, `"topButtonChanges"`, `"surfaceChanges"` |  Defines when the button gets visible: always, when the current surface has changed with top buttons, or when the current surface has changed in some way. |
 |  enabled |  `"always"`, `"topButtonChanges"`, `"surfaceChanges"` |  Defines when the button gets enabled: always, when the current surface has changed with top buttons, or when the current surface has changed in some way. |
 |  Style of a Top toolbar button object: `style` |
 |  &lt;property&gt; |  string |  CSS properties. You can specify a new style through a key-value pair, where the key is the property name, and the value is in the CSS format or a [CSS variable](https://customerscanvas.com/docs/cc6/preflight-tool-faq.htm.md). For example, you can change the button `color`, `background-color`, and more. For an example of customizing the **Fix All** button, you can refer to the [F.A.Q](https://customerscanvas.com/docs/cc6/preflight-tool-faq.htm.md). |
 |  Custom Fix buttons array: `customButtons` |
 |  title |  string |  The button title that appears on the right panel. |
 |  Preflight rules to fix object: `filter` |
 |  severity |  array |  Severity of the rules to be fixed with the button. This array may contain `"error"`, `"warning"`, or both. |
 |  types |  array |  This array may contain any combination of rule types. |
 |  Style of a custom button object: `style` |
 |  &lt;property&gt; |  string |  CSS properties. You can specify a new style through a key-value pair, where the key is the property name, and the value is in the CSS format or a [CSS variable](https://customerscanvas.com/docs/cc6/preflight-tool-faq.htm.md). For example, you can change the button `color`, `background-color`, and more. For an example of customizing the **Fix All** button, you can refer to the [F.A.Q](https://customerscanvas.com/docs/cc6/preflight-tool-faq.htm.md). |
 
## See Also
  
### Manual
 
- [Frequently Asked Questions](https://customerscanvas.com/docs/cc6/preflight-tool-faq.htm.md)
- [Preflight Rules](https://customerscanvas.com/docs/cc6/preflight-tool-rules.htm.md)
