---
schema_version: "1"
id: 8fbfb327b04b7f8424782afe93932dd079befd7e6f96d63e9f8295891e53e532
title: Create a PrintLayoutV2 Contract
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/create_a_printlayoutv2_contract.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.create_a_printlayoutv2_contract.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 60e9fcf6c26a71569231c0d114ef0fe53f2d42c4aa90896b0f95d07145ef86dc
description: To show PDF reports in the Consumer Goods offline mobile app and to print those reports, create a PrintLayoutV2 contract in Visual Studio Code-based Modeler .
products:
  - Consumer Goods
release: "264"
---
# Create a PrintLayoutV2 Contract

To show PDF reports in the Consumer Goods offline mobile app and to print those reports, create a PrintLayoutV2 contract in Visual Studio Code-based Modeler .

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Professional</strong>, <strong>Enterprise</strong>, and <strong>Unlimited</strong> Editions that have Consumer Goods Cloud enabled</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d52544e63">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d52544e63 ">To create a PrintLayoutV2 contract:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d52544e63 ">CG Cloud Developer AND Admin</td>

          </tr>
        </tbody>
      </table>

1. Open Visual Studio Code-based Modeler.
2. In your Modeler workspace, create a folder called MyDisplayPDF at the location: $workspace/src/MyDisplay/PL.
3. To create a PrintLayoutV2 contract, copy this template in a blank XML file:
    
    ```
    <PrintLayout name="${#Name#}PDF" xmlns="https://www.salesforce.com/cgcloud/xsds" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Declarations></Declarations>
    <ReportLayout></ReportLayout>
    </PrintLayout>
    ```
4. Save the contract as MyDisplayPDF.printlayoutv2.xml.
5. To check for validation errors, build your contracts by running `sf mdl build`.
6. In the Declaration section, create two declarations:
    
    ```
    <DataDeclaration name="currentDisplay" type="BoMyDisplay" />
    <DataDeclaration name="loDisplays" type="LoMyDisplays" />
    ```
7. Save your changes.
8. To check for validation errors, build your contracts by running `sf mdl build`.

#### See Also

- [Create a PrintLayoutV2 Contract](https://help.salesforce.com/s/articleView?id=ind.modeler_vscode_create_printout.htm&type=5&language=en_US)