One of the many advantages provided by the PDF file format is the ability to password protect files to make sure they cannot be opened by unauthorised users. Even more useful, in my opinion, is the ability to apply restrictions to PDF files to prevent users from copying its content or even sending it to a printer.
The Muhimbi PDF Converter for SharePoint has supported PDF Security for quite some time using SharePoint Designer Workflows, our Web Services based API as well as using our own Workflow Power Pack. With the introduction of version 5.1 we are adding support for the popular, and rather brilliant, Nintex Workflow as well. In addition to the new Secure PDF Nintex Workflow Activity, we are also adding Activities for PDF Merging, applying PDF Watermarks as well as HTML to PDF Conversion.
Similar to all other Nintex Activities provided by Muhimbi, the Secure PDF activity integrates with Nintex Workflow at a deep level. It supports SharePoint 2007, 2010 and 2013, allows errors to be handled and even supports integration with Nintex’ iterators to deal with multiple items and loops. For a comprehensive example and details about how to enable the Nintex Workflow integration see the blog post that discusses our generic Nintex PDF Conversion activity.
Secure PDF files using Nintex Workflow 2007, 2010 & 2013
Building a full example workflow is out of the scope of this post as it is very simple. For details see our generic PDF Conversion for Nintex Workflow example. The fields supported by this Workflow Activity are as follows:
Destination Path: Enter the path to write the secured file to, either:
- Leave it empty to use the same filename (and path) as the file that triggered the workflow.
- A file name, without the full path, to write a differently named file to the same location as the source file.
- A relative path to a subsite / document library / folder, e.g. Shared Documents/Some Folder/Some File.pdf.
- An absolute path to a different site collection, e.g. /sites/Finance/Shared Documents/Some Folder/Some File.pdf.
Please make sure the path does not include the host name, e.g. ‘http://your site/…’.
Open Password: An optional password that the user must enter in order to open the document. Please note that any password entered here is displayed in clear text to allow Nintex field references to be added.
Owner Password: An optional password that the user must enter in order to change the PDF restrictions. When specifying any PDF Restrictions then this password must be set. Please note that any password entered here is displayed in clear text to allow Nintex field references to be added.
Individual PDF Restrictions: Select the individual restrictions such as Disable Printing or Disable Content Copying.
PDF List ID: If you wish to carry out further actions on the secured PDF file, e.g. send it by email or perform a check-in, then you can optionally write the ID of the List the PDF was written to in a workflow variable of type String.
PDF List Item ID: Similarly to PDF List ID, the Item ID of the secured PDF file can optionally be written to a workflow variable of type Item ID (in SharePoint 2007) or Integer (in SharePoint 2010 / 2013).
Source List ID & List Item: The item that triggered the workflow is secured by default. You can optionally specify the ID of a different List and List Item using workflow variables. Please use the same data types as used by PDF List ID and PDF List Item ID.
Error Handling: Similar to the way some of Nintex’ own Workflow Activities allow errors to be captured and evaluated by subsequent actions, all of Muhimbi’s Workflow Activities allow the same. By default this facility is disabled meaning that any error terminates the workflow.