One of the more popular features of the Muhimbi PDF Converter for SharePoint is the ability to convert web pages as well as HTML fragments to PDF format using the SharePoint User Interface, from your own code, or as part of a SharePoint Designer workflow. Although we have supported integration with Nintex Workflow for a while, we did not have a native Nintex Workflow activity to convert HTML to PDF.
That all changes with the introduction of version 5.1 of the PDF Converter for SharePoint, which adds Nintex Workflow versions for all existing SharePoint Designer based Muhimbi PDF Workflow Activities, including PDF Merging, applying PDF Security, applying PDF Watermarks as well as HTML to PDF Conversion, which we will discuss in this blog post.
Similar to all other Nintex Activities provided by Muhimbi, the HTML to PDF Conversion activity integrates with Nintex Workflow at a deep level. It supports SharePoint 2007-2016, 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.
Convert HTML to PDF using Nintex Workflow 2007, 2010, 2013 and 2016
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 converted file to, either: - 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. Always use forward slashes, for details about specifying paths and file names, see this post.
- Source URL / HTML: Either a fully qualified URL of the page to convert or an HTML fragment.
- Page Orientation: Specify if you wish to use Portrait or Landscape for the generated PDF file.
- Username: By default all pages are requested by the conversion service using the account the service is running under. If that account has no privileges on the requested URL then specify an alternative user name in this field.
- Password: The password associated with the optional user name. Please note that any password entered here is displayed in clear text to allow field references to be added.
- PDF List ID: If you wish to carry out further actions on the generated PDF file, e.g. 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 generated PDF file can optionally be written to a workflow variable of type Item ID (in SharePoint 2007) or Integer (in SharePoint 2010 and later).
- 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.
Please note that various enhancements have been made to this Workflow Action in the 8.3 release. For more details see this Blog post.
Labels: Articles, News, Nintex, pdf, PDF Converter, Workflow