Subscribe to News feed

Convert and Merge PDFs using Nintex Workflow and the PDF Converter for SharePoint

Posted at: 12:09 PM on 17 August 2011 by Muhimbi

Nintex-logo5The Muhimbi PDF Converter for SharePoint has been able to convert and merge multiple files / URLs into a single PDF file for some time, a facility used by many of our customers. Previously it was possible to use the SharePoint User Interface, our API and the Muhimbi Workflow Power Pack to control this merge process, but as of version 5.1 it is also possible to merge files using both SharePoint Designer and Nintex Workflow.

Version 5.1 of the PDF Converter for SharePoint 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.

Similar to all other Nintex Activities provided by Muhimbi, the Merging files to PDF activity integrates with Nintex Workflow at a deep level. It supports SharePoint 2007, 2010 & 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.
 

PDF-Merging-CombinedMerge multiple files into a single PDF using Nintex Workflow 2007, 2010 and 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 merged file to, either:
    - Leave it empty to use the same filename (and path) as the file that triggered the workflow.
    - 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/…’., See this post for details.
  • Source Files: This field specifies the list of documents to merge (and convert if needed). Each file must be specified on a new line and each line may contains three ‘;’ separated values:
     
    • File Path: The path to the file, or URL, to merge. This may already be a PDF file, but if not – and the file format is supported by the converter – then it will be converted first. The path can be relative to the current site (e.g. Shared Documents/Some File.docx) or absolute (e.g. /sites/Finance/Shared Documents/Some Folder/Some file.docx). Nintex Workflow References are fully supported, which can be used to dynamically generated the path for the current file, e.g. {ItemProperty:FileLeafRef}. Some string manipulation to generate the exact path to the file may be needed. When specifying a file please make sure the path does not include the host name, e.g. ‘http://your site/…’. When converting a web page then the path MUST start with http:// or https://. 
    • Include Bookmarks: The source file may already include PDF Bookmarks, or may be able to generate such bookmarks as part of the conversion process, e.g. an MS-Word file. Specify true to copy these bookmarks to the merged PDF file, or false to strip out any bookmarks. This value is optional
    • Custom Bookmark value: The Bookmark parameter (see below for details) can be overridden using the third parameter. Specify the content of the ‘top level bookmark’ for the file, specify "" to remove the bookmark for this document or don’t specify anything at all to use the value stored in the content specified in the Bookmark parameter. 
  • Bookmark: In a way similar to the User Interface for the merge facility, it is possible to specify a name of the column, or any kind of Nintex Reference, which contents will be used to populate the PDF Bookmark for the merged document. For example, specifying Name or Title (using the appropriate Nintex Workflow lookup Syntax) makes it very easy to jump between the various sections of the merged PDF file.
  • PDF List ID: If you wish to carry out further actions on the generated PDF file, e.g. merge additional documents 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 generated 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 merged 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.

 

.




Labels: , , , , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link