---
title: "Starting print file rendering | Customer&#x27;s Canvas Hub"
canonical: "https://customerscanvas.com/docs/hub/dev-center/scenarios/direct-mail/starting-print-file-rendering/"
---

# Starting print file rendering

> After you have [created a design](https://customerscanvas.com/docs/hub/dev-center/scenarios/direct-mail/pre-designing-variable-templates.md) and prepared and [saved VDP data to the design](https://customerscanvas.com/docs/hub/dev-center/scenarios/direct-mail/adding-a-dataset.md), you can apply this data while rendering print files.

This guide explains how to render designs with variable data using Customers Canvas. You'll learn how to configure a pipeline with the `render-vdp-hires` task, run a project via the **Storefront API**, and manage the resulting artifacts.

## Step 1: Configure the pipeline

To render high-resolution print files, create a pipeline in your Customer's Canvas account first. The pipeline must include the [render-vdp-hires](https://customerscanvas.com/docs/hub/printer-guide/pipelines/tasks/render-vdp-hires.md) task to apply data samples stored in the rendered designs. Below is an example configuration:

```json
{
    "tasks": [
        {
            "description": "Extract design from project",
            "name": "extract",
            "type": "extract-project-design",
            "parameters": {},
            "outputArtifacts": [
                "design"
            ]
        },
        {
            "description": "Render multipage print file",
            "name": "render-vdp-hires",
            "type": "render-vdp-hires",
            "inputArtifacts": [
                "design"
            ],
            "parameters": {
                "hiResOutputDpi": 300,
                "hiResOutputFileFormat": "pdf",
                "hiResOutputColorSpace": "cmyk",
                "hiResOutputRgbColorProfileName": "",
                "hiResOutputCmykColorProfileName": "",
                "hiResOutputGrayscaleColorProfileName": "",
                "hiResOutputToSeparateFiles": false,
                "hiResOutputChannelContainersToSeparateFiles": false,
                "hiResOutputChannelContainersRenderEmptyPage": true,
                "hiResOutputBackgroundColor": "White",
                "hiResOutputCompression": "Jpeg",
                "hiResOutputJpegCompressionQuality": 90,
                "hiResOutputFlipMode": "None",
                "hiResOutputRotateMode": "None",
                "hiResOutputPdfTextMode": "Text",
                "hiResOutputPdfAuthor": "",
                "hiResOutputPdfCreator": "",
                "hiResOutputPdfKeywords": "",
                "hiResOutputPdfSubject": "",
                "hiResOutputPdfTitle": "",
                "hiResOutputInStringPlaceholderHintsEnabled": false,
                "hiResOutputArchiveType": "None",
                "hiResOutputArchiveCompressionType": "LZMA"
            },
            "outputArtifacts": [
                "printFile"
            ]
        },
        {
            "description": "Finalize",
            "name": "finalize",
            "type": "finalize",
            "finalArtifacts": [
                "printFile"
            ]
        }
    ]
}
```

## Step 2: Create a project via API

First, choose the right endpoint. Customer's Canvas provides two endpoints for creating projects for processing VDP data:

1. [`POST /api/storefront/v1/projects/with-single-item`](https://customerscanvas.com/docs/hub/dev-center/api/storefront.md#tag/projects/CreateWithSingleItem)

   Use this endpoint when your PIM products are linked via a product reference (e.g., an online store product ID).

   _Example: You have a product in your e-commerce system, and you want to personalize it with VDP data._

2. [`POST /api/storefront/v1/projects/by-scenario/specific-pipeline`](https://customerscanvas.com/docs/hub/dev-center/api/storefront.md#tag/projects/CreateBySpecificPipelineScenario)

   Use this endpoint when you haven't linked products by product reference, need to process multiple line items in an order, or only render design files.

   _Example: You want to render multiple designs in a single project without direct product references._

Once a project is created, the system will automatically run the pipeline linked to the product or specified in the request parameters.

### Option 1: Using /projects/with-single-item

This endpoint is used when your products are linked via a product reference in your online store.

**cURL**

```bash
curl -X POST "https://api.customerscanvashub.com/api/storefront/v1/projects/with-single-item?storefrontId=12" \
-H "accept: text/plain" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <TOKEN>" \
-d '{
     "ownerId": "6527afc635b52bfadd355226",
     "item": {
          "productReference": "invitation",
          "designIds": ["642e793dc46d098d64514607"]
     }
}'
```

**HTTP**

```http
POST https://api.customerscanvashub.com/api/storefront/v1/projects/with-single-item?storefrontId=12
Content-Type: application/json
{
    "ownerId": "6527afc635b52bfadd355226",
    "item": {
        "productReference": "invitation",
        "designIds": ["642e793dc46d098d64514607"]
    }
}
```

**C#**

```cs
// Set a real storefront ID
var storefrontId = 12;
// Set a product reference, order ID, and design IDs
var body = """
{
     "orderId": 1004,
     "item": {
          "productReference": "invitation",
          "designIds": ["642e793dc46d098d64514607"]
     }
}
""";
var project = await projectsApiClient.CreateWithSingleItemAsync(storefrontId, null, body);
```

**TS**

```ts
// Set a real storefront ID
var storefrontId = 12;
// Set a product reference, order ID, and design IDs
var body = `
{
     "orderId": 1004,
     "item": {
          "productReference": "invitation",
          "designIds": ["642e793dc46d098d64514607"]
     }
}`;
var project = _projectsApiClient.createWithSingleItem(storefrontId, null, body);
```

**PHP**

```php
// Set a real storefront ID
$storefrontId = 12;
// Set a product reference, order ID, and design IDs
$body = '
{
     "orderId": 1004,
     "item": {
          "productReference": "invitation",
          "designIds": ["642e793dc46d098d64514607"]
     }
}';
$project = $projectsApiClient->projectsCreate($storefrontId, null, $body);
```

### Option 2: Using /projects/by-scenario/specific-pipeline

This endpoint is ideal for processing multiple line items in an order when products are not linked by a product reference.

**cURL**

```bash
curl -X POST \
  "https://api.customerscanvashub.com/api/storefront/v1/projects/by-scenario/specific-pipeline?storefrontId=12" \
  -H "accept: text/plain" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <TOKEN>" \
  -d '{
    "orderDetails": {"orderId": "1004"},
    "ownerId": "6527afc635b52bfadd355226",
    "items": [{
      "designIds": ["62da200abb25c5477797d9cb"]
    }],
    "scenario": {"pipelineId": 247}
  }'
```

**HTTP**

```http
POST https://api.customerscanvashub.com/api/storefront/v1/projects/by-scenario/specific-pipeline?storefrontId=12
Content-Type: application/json
Authorization: Bearer <TOKEN>

{
  "orderDetails": {"orderId": "1004"},
  "ownerId": "6527afc635b52bfadd355226",
  "items": [{
    "designIds": ["62da200abb25c5477797d9cb"]
  }],
  "scenario": {"pipelineId": 247}
}
```

**C#**

```csharp
var storefrontId = 12;
var body = """
{
  "orderDetails": {"orderId": "1004"},
  "ownerId": "6527afc635b52bfadd355226",
  "items": [{
    "designIds": ["62da200abb25c5477797d9cb"]
  }],
  "scenario": {"pipelineId": 247}
}
""";
var project = await projectsApiClient.CreateBySpecificPipelineScenarioAsync(storefrontId, null, body);
```

**TS**

```typescript
var storefrontId = 12;
var body = {
  "orderDetails": {"orderId": "1004"},
  "ownerId": "6527afc635b52bfadd355226",
  "items": [{
    "designIds": ["62da200abb25c5477797d9cb"]
  }],
  "scenario": {"pipelineId": 247}
};
var project = _projectsApiClient.createBySpecificPipelineScenario(storefrontId, null, JSON.stringify(body));
```

**PHP**

```php
// Set a real storefront ID
$storefrontId = 12;
// Set a product reference, order ID, and design IDs
$body = '
{
  "orderDetails": {"orderId": "1004"},
  "ownerId": "6527afc635b52bfadd355226",
  "items": [{
    "designIds": ["62da200abb25c5477797d9cb"]
  }],
  "scenario": {"pipelineId": 247}
}';
$project = $projectsApiClient->projectsCreateBySpecificPipelineScenario($storefrontId, null, $body);
```

## Step 3: Retrieve rendered files

You can find artifact links through the BackOffice UI or implement sending the results outside of Customer's Canvas: 

- Use the **artifact links** provided in the project results.
- For **push strategies**, add tasks like [upload-to-ftp](https://customerscanvas.com/docs/hub/printer-guide/pipelines/tasks/upload-to-ftp.md), [invoke-url](https://customerscanvas.com/docs/hub/printer-guide/pipelines/tasks/invoke-url.md), or [export-to-ecommerce](https://customerscanvas.com/docs/hub/printer-guide/pipelines/tasks/export-to-ecommerce.md) to your pipeline.

To access artifacts, you can log in to your Customer's Canvas account and find the artifact links in the **Projects** section: click your projects and then click the **Results** tab.

To automatically deliver rendered files, extend your pipeline with tasks like:

```json
{
  "tasks": [
    {
      "description": "Upload to FTP",
      "name": "upload-to-ftp",
      "type": "upload-to-ftp",
      "inputArtifacts": ["printFile"],
      "parameters": {
        "ftpHost": "ftp.example.com",
        "ftpUser": "user",
        "ftpPassword": "password",
        "ftpPath": "/output/"
      }
    }
  ]
}
```

## Related Topics

- [VDP preview pipeline example](https://customerscanvas.com/docs/hub/printer-guide/pipelines/examples/render-vdp-preview.md)
- [Delivering pipeline results](https://customerscanvas.com/docs/hub/printer-guide/pipelines/tasks.md#4-delivering-results)
- [Working with Project API](https://customerscanvas.com/docs/hub/dev-center/api/storefront/working-with-projects.md)
