

Advanced Formatting is a type of branding available on the Production Set form.
With Advanced Formatting, you can brand headers and footers with a combination of fields from the Advanced Formatting drop-down list, free-form text, and carriage returns. The Advanced Formatting option also supports a scripting language that you can use to create conditional branding based on production, document, and page fields.
For conditional statements, the root context objects are
Note: If you add a field to a conditional statement incorrectly, you can still save and run the production set, but the branding will not generate an error and will produce incorrect results.
The production object stores information about the production. It is the same for every item branded in the production.
Name | Data type | Description | Name in Advanced Formatting drop-down list |
---|---|---|---|
Document | DocumentDrop | The current document being branded. | N/A |
ProductionId | int | The ID of the workspace. | Production Id |
ProductionName | string | The name of the production. | Production Name |
TotalDocuments | int | The total number of documents in the production. | Total Documents |
TotalImages | int | The total number of images in the production. | Total Images |
WorkspaceId | int | The ID of the production. |
Workspace Id |
Note: The example in this section does not demonstrate everything that you can do with the production object.
As shown in the screen shot below, you can combine free-form text with productions objects.
Number of documents in {{context.ProductionName}}: {{context.TotalDocuments}}
The screen shot below shows a document that was branded per the command in the screen shot above. In this example, the ProductionName is Production object conditional statement, and the TotalDocuments is 15.
This object stores information about the document and will change for each document.
Name | Data type | Description | Name in Advanced Formatting drop-down list |
---|---|---|---|
ArtifactId | int | The ArtifactId of the document in the production. | Artifact Id |
HasRedactions | bool | If set, the current document contains redactions on at least one page. | Document Has Redactions |
HasPlaceholder | bool | If set, the current document is a placeholder. | Has Placeholder |
BeginBates | string | The first bates number in this document. | Begin Bates |
EndBates | string | The last bates number in this document. | End Bates |
BeginBatesAttachment | string | The first attachment bates number in this document. | Begin Bates Attachment |
EndBatesAttachment | string | The last attachment bates number in this document. | End Bates Attachment |
Page | PageDrop | The current page being branded. | N/A |
["Field Name"] | FieldDrop |
Returns the field value of the specified document field. This will return null if the field does not exist or is not supported. e.g. context.Document["Control Number"].Value Only the following field types are supported:
|
N/A |
Note: The example in this section does not demonstrate everything that you can do with the document object.
As shown in the screen shot below, you can create conditional statements with the document object.
{% if context.Document.HasRedactions %} THIS DOCUMENT HAS REDACTIONS {% endif %}
The document in the screen shot below is branded per the command in the screen shot above. Since the document has a redaction, it meets the requirements of the conditional statement, so the free-form text is branded on this document.
The page object stores information about the page and will change for each page.
Name | Data type | Description | Name in Advanced Formatting drop-down list |
---|---|---|---|
BatesNumber | string | The bates number of the current page. | Bates Number |
FileName | string | The name of the file. | File Name |
HasRedactions | bool | If set, this page has redactions. | Page Has Redactions |
IsPlaceholder | bool | If true, this page is a placeholder page. | Is Placeholder |
PageNumber | int | The current page. | Page Number |
Note: The example in this section does not demonstrate everything that you can do with the page object.
As shown in the screen shot below, you can use page objects in conditional statements.
{% if context.Document.Page.PageNumber == 1 %} Only brand this text on page 1. {% endif %} {% if context.Document.Page.PageNumber > 1 %} Brand Bates number on every page after page 1: {{context.Document.Page.BatesNumber}} {% endif %}
The document in the screen shot below is branded per the commands in the screen shot above. The free-form text from the first conditional statement is only printed on the first page. The free-form text from the second conditional statement is only printed on the second page.
Below are Advanced Formatting script examples:
Production Name: {{context.ProductionName}} Page # {{context.Document.Page.PageNumber}}
{% if context.Document.Page.HasRedactions%} THIS PAGE CONTAINS REDACTIONS {% endif %}
{% if context.Document.Page.PageNumber == 1 %} This text will be branded only on page 1 {% endif %}
{% if context.Document.Page.PageNumber > 1 %} {{context.Document.Page.BatesNumber}} {% endif %}
{% if context.Document.Page.PageNumber > 1 and context.Document.Page.PageNumber < 11%} Confidential {% endif %}
{% if context.Document.Page.PageNumber > 11 and context.Document.Page.PageNumber < 21%} Attorneys’ Eyes Only {% endif %}
Brand the document that has a document field with specific value.
{% if context.Document["Confidentiality"].Value == "Attorneys’ Eyes Only" %}
Confidential - Attorneys’ Eyes Only
{% endif %}
Why was this not helpful?
Check one that applies.
Thank you for your feedback.
Want to tell us more?
Great!