Nutrient

Home

SDK

Software Development Kits

Low-Code

IT Document Solutions

Workflow

Workflow Automation Platform

DWS API

Document Web Services

T
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Company

About

Team

Careers

Contact

Security

Partners

Legal

Resources

Blog

Events

Try for free

Contact Sales
Contact sales
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

products

Web

Web

Document Authoring

AI Assistant

Salesforce

Mobile

iOS

Android

visionOS

Flutter

React Native

MAUI

Server

Document Engine

Document Converter Services

.NET

Java

Node.js

AIDocument Processing

All products

solutions

USECASES

Viewing

Editing

OCR and Data Extraction

Signing

Forms

Scanning & Barcodes

Markup

Generation

Document Conversion

Redaction

Intelligent Doc. Processing

Collaboration

Authoring

Security

INdustries

Aviation

Construction

Education

Financial Services

Government

Healthcare

Legal

Life Sciences

All Solutions

Docs

Guides overview

Web

AIAssistant

Document Engine

iOS

Android

visionOS

Java

Node.js

.NET

Document Converter Services

Downloads

Demo

Support

Log in

Resources

Blog

Events

Pricing

Try for free

Free Trial

Company

About

Security

Partners

Legal

Contact Sales
Contact Sales
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

products

Products overview

Document Converter

Document Editor

Document Searchability

Document Automation Server

Integrations

SharePoint

Power Automate

Nintex

OneDrive

Teams

Window Servers

solutions

USECASES

Conversion

Editing

OCR Data Extraction

Tagging

Security Compliance

Workflow Automation

Solutions For

Overview

Legal

Public Sector

Finance

All Solutions

resources

Help center

Document Converter

Document Editor

Document Searchability

Document Automation Server

learn

Blog

Customer stories

Events

Support

Log in

Pricing

Try for free

Company

About

Security

Partners

Legal

Contact Sales
Contact Sales
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Product

Product overview

Process Builder

Form Designer

Document Viewer

Office Templating

Customization

Reporting

solutions

Industries

Healthcare

Financial

Manufacturing

Pharma

Education

Construction

Nonprofit

Local Government

Food and Beverage

Departments

ITServices

Finance

Compliance

Human Resources

Sales

Marketing

Services

Overview

Capex-accelerator

Process Consulting

Workflow Prototype

All Solutions

resources

Help center

guides

Admin guides

End user guides

Workflow templates

Form templates

Training

learn

Blog

Customer stories

Events

Support

Pricing

Support

Company

About

Security

Partners

Legal

Try for Free
Contact Sales
Try for Free
Contact Sales
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Services

Generation

Editing

Conversion

Watermarking

OCR

Table Extraction

Pricing

Docs

Log in

Try for Free
Try for Free

Free trial

Blog post

Apply SharePoint Document IDs to PDF files easily

Clavin Fernandes Clavin Fernandes

Table of contents

    Illustration: Embed Document IDs in PDF and generate Short URLs

    Some time ago we wrote about some new functionality in the PDF Converter for SharePoint that allows ‘real-time’ and ‘user specific’ watermarks to be added to PDF files as soon these files are opened / downloaded / copied. This has proven a real hit with our customers and one of the questions that recently came up is how to use this functionality in combination with the SharePoint 2010’s Document ID Service. (Hint, the internal field names are called _dlc_DocId, _dlc_DocIdUrl and _dlc_DocIdPersistId).

    In this post we’ll show how to automatically apply a watermark containing the Document ID to PDF files and then generate a Short URL based on this Document ID. Rather than using our watermark on open facility, we’ll create a SharePoint Designer workflow that carries out the work. Once a Document ID has been created it never changes so although real-time watermarking will work, it is not necessary and a waste of valuable processing resources.

    Please note that the example in this post uses both the Muhimbi PDF Converter for SharePoint and the Muhimbi URL Shortener for SharePoint. If you are only interested in URL Shortening or just in Watermarking then you can change the sample accordingly. Also in this example we are not carrying out any PDF Conversion. Examples for PDF Conversion are available on our site for SharePoint Designer as well as Nintex Workflow.

    OK, let’s get all the prerequisites in place first.

    1. Download and install the PDF Converter for SharePoint and install it as described in Chapter 2 of the included Administration Guide.

    2. Download and install the URL Shortener for SharePoint and configure it to accept short URLs on a web application of your choice as described in the included Administration Guide.

    3. If not already installed, download and install the free SharePoint Designer for your environment.

    4. Make sure you have the appropriate privileges to create workflows on a site collection.

    5. Enable and configure SharePoint 2010’s Document ID Service

    image

    Item with Document ID Populated

    With the prerequisites in place, let’s build our custom solution.

    1. On a Document Library of your choice, modify the View to include the Document ID field. (This is just for reference, you don’t need it in the real world.)

    2. On this same document library create a new field named Short URL of type Hyperlink. (This is just to see the name of the short URL after the workflow has executed, it is not needed in the real world).

    3. Create a new SharePoint Designer Workflow using a method of your choice. In this example we’ll do this by navigating to the Library Tab and then selecting Settings / Workflow Settings / Create a Workflow in SharePoint Designer.

    4. Give the workflow a sensible name, e.g. Document ID Processing and change the workflow settings to automatically start when an item is created.

    5. Switch to Edit Workflow and insert a Create Short URL workflow Action.

    6. Click optional short name, followed by the fx button.

    7. From the ‘lookup string’ dialog, select Document ID Value from the Field from source drop down and close the dialog.

    8. Click this ID / address, followed by the ‘…’ button.

    9. Enter the Document ID URL for your site, you can copy it from the Document ID of an existing item. Generally it is something like https:///_layouts/DocIdRedir.aspx?ID= .

    10. Position the cursor after the ‘=’, click the Add or Change Lookup button and select the Document ID Value again. Close the String Builder.

    11. From Document / Display Form select Document.

    12. From Overwrite / Return null select Overwrite.

    13. When the workflow executes it will write the shortened URL to a workflow variable named this variable. The variable name can be changed, but we accept the default.

    14. Insert a set field in current item workflow action, select Short URL as the field.

    15. Click value, followed by the fx button. From the Data Source select Workflow Variables and Parameters and from Field from source select this variable.

    The URL Shortening part of the example is now ready. Publish the workflow, upload a file to your document library and after a few seconds the Short URL field will be populated. Click the Short URL to verify it works.

    WM-and-Short-URLThis is what the final workflow will look like after the Watermarking is added as well

    You can do whatever you like with this Short URL. Send it by email, tell someone on the phone, or…. embed it in a watermark, something we’ll do next.

    Return to the Workflow editor and add the following steps:

    1. Position the cursor JUST ABOVE the previously added Set field action and add the If current item field matches condition.

    2. Click field and select File Type.

    3. In value enter pdf (lower case, no ‘.’ prefixed) .

    4. Position the cursor inside the condition and add the Add Text Watermark activity (other watermark types are also available).

    5. Fill out the fields for the watermark

    - this document: Set to Current Item.

    - this file: Leave the default to overwrite the existing file.

    - content: Add the this variable Workflow Variable to insert the previously generated URL. Other content can be added as well.

    - position: Bottom Center.

    - width x height: 600 x 30

    That should take care of the watermarking. Publish the workflow and upload a PDF file. You should now see the Short URL being created and when the document is opened you should see the Short URL at the bottom of the document.

    If you find this useful, or have any questions, then feel free to leave a comment below.

    Author
    Clavin Fernandes
    Clavin Fernandes Developer Relations and Support Services

    Clavin is a Microsoft Business Applications MVP who supports 1,000+ high-level enterprise customers with challenges related to PDF conversion in combination with SharePoint on-premises Office 365, Azure, Nintex, K2, and Power Platform mostly no-code solutions.

    Explore related topics

    Low-Code
    Free trial Ready to get started?
    Free trial

    Related articles

    Explore more
    LOW-CODELow-CodeAIOCRDigital Transformation

    Digital transformation is failing without intelligent document automation

    SDKINSIGHTSLow-CodeWorkflow AutomationDocument Converter for SharePointDocument SearchabilityDocument Automation ServerDocument Editor

    The rise of no-code and low-code: Are enterprises ready for the next document revolution?

    SDKTUTORIALSSDKLow-CodeDocument ManagementIndexingSearchingArchivingSharePointPower Automate

    How to manage large document libraries: Indexing, searching, and archiving

    Company
    About
    Security
    Team
    Careers
    We're hiring
    Partners
    Legal
    Products
    SDK
    Low-Code
    Workflow
    DWS API
    resources
    Blog
    Events
    Customer Stories
    Tutorials
    News
    connect
    Contact
    LinkedIn
    YouTube
    Discord
    X
    Facebook
    Popular
    Java PDF Library
    Tag Text
    PDF SDK Viewer
    Tag Text
    React Native PDF SDK
    Tag Text
    PDF SDK
    Tag Text
    iOS PDF Viewer
    Tag Text
    PDF Viewer SDK/Library
    Tag Text
    PDF Generation
    Tag Text
    SDK
    Web
    Tag Text
    Mobile/VR
    Tag Text
    Server
    Tag Text
    Use Cases
    Tag Text
    Industries
    Tag Text
    Resources
    Blog
    Tag Text
    Events
    Customer Stories
    Tag Text
    Tutorials
    Tag Text
    Features List
    Tag Text
    Compare
    Tag Text
    community
    Free Trial
    Tag Text
    Documentation
    Tag Text
    Nutrient Portal
    Tag Text
    Contact Support
    Tag Text
    Company
    About
    Tag Text
    Security
    Tag Text
    Careers
    Tag Text
    Legal
    Tag Text
    Pricing
    Tag Text
    Partners
    Tag Text
    connect
    Contact
    Tag Text
    LinkedIn
    Tag Text
    YouTube
    Tag Text
    Discord
    Tag Text
    X
    Tag Text
    Facebook
    Tag Text
    low-code
    Document Converter
    Tag Text
    Document Editor
    Tag Text
    Document Automation Server
    Tag Text
    Document Searchability
    Tag Text
    Use Cases
    Tag Text
    Industries
    Tag Text
    Resources
    Blog
    Tag Text
    Events
    Customer Stories
    Tag Text
    Support
    Help Center
    Tag Text
    Contact Support
    Tag Text
    Log In
    Tag Text
    Company
    About
    Tag Text
    Careers
    Tag Text
    Security
    Tag Text
    Legal
    Tag Text
    Pricing
    Tag Text
    Partners
    Tag Text
    connect
    Contact
    Tag Text
    LinkedIn
    Tag Text
    YouTube
    Tag Text
    Discord
    Tag Text
    X
    Tag Text
    Facebook
    Tag Text
    Popular
    Approvals matrix
    Tag Text
    BPMS
    Tag Text
    Budgeting process
    Tag Text
    CapEx approval
    Tag Text
    CapEx automation
    Tag Text
    Document approval
    Tag Text
    Task automation
    Tag Text
    workflow
    Overview
    Tag Text
    Services
    Tag Text
    Industries
    Tag Text
    Departments
    Tag Text
    Resources
    Blog
    Tag Text
    Events
    Customer Stories
    Tag Text
    Support
    Help Center
    Tag Text
    FAQ
    Tag Text
    Troubleshooting
    Tag Text
    Contact Support
    Tag Text
    Company
    About
    Tag Text
    Careers
    Tag Text
    Security
    Tag Text
    Legal
    Tag Text
    Pricing
    Tag Text
    Partners
    Tag Text
    connect
    Contact
    Tag Text
    LinkedIn
    Tag Text
    YouTube
    Tag Text
    Discord
    Tag Text
    X
    Tag Text
    Facebook
    Tag Text
    DWS api
    PDF Generator
    Tag Text
    Editor
    Tag Text
    Converter API
    Tag Text
    Watermark
    Tag Text
    OCR
    Tag Text
    Table Extraction
    Tag Text
    Resources
    Log in
    Tag Text
    Help Center
    Tag Text
    Support
    Tag Text
    Blog
    Tag Text
    Company
    About
    Tag Text
    Careers
    Tag Text
    Security
    Tag Text
    Pricing
    Tag Text
    Legal
    Privacy
    Tag Text
    Terms
    Tag Text
    connect
    Contact
    Tag Text
    X
    Tag Text
    YouTube
    Tag Text
    Discord
    Tag Text
    LinkedIn
    Tag Text
    Facebook
    Tag Text

    Copyright 2025 Nutrient. All rights reserved.

    Thank you for subscribing to our newsletter!

    We’re thrilled to have you join our community. You’re now one step closer to receiving the latest updates, exclusive content, and special offers directly in your inbox.

    This builtin is not currently supported: DOM

    PSPDFKit is now Nutrient. We've consolidated our group of trusted companies into one unified brand: Nutrient. Learn more

    This builtin is not currently supported: DOM

    PSPDFKit is now Nutrient. We've consolidated our group of trusted companies into one unified brand: Nutrient. Learn more

    This builtin is not currently supported: DOM

    New Feature Release. Tap into revolutionary AI technology to instantly complete tasks, analyze text, and redact key information across your documents. Learn More or View Showcase

    This builtin is not currently supported: DOM

    Aquaforest and Muhimbi are now Nutrient. We've consolidated our group of trusted companies into one unified brand: Nutrient. Learn more

    This builtin is not currently supported: DOM

    Integrify is now Nutrient. We've consolidated our group of trusted companies into one unified brand: Nutrient. Learn more

    This builtin is not currently supported: DOM

    Join us on April 15th. Join industry leaders, product experts, and fellow professionals at our exclusive user conference. Register for conference