Subscribe to News feed

Watermark PDFs using Nintex Workflow and the Muhimbi PDF Converter for SharePoint

Posted at: 16:12 on 18 August 2011 by Muhimbi

Nintex-logo5_thumb1_thumbOur popular PDF Converter for SharePoint started off as a a relative straightforward PDF Converter. As we really listen to our customers we have added a lot of functionality over the years resulting in a very complete feature set. One of the more powerful modules of the product is the integrated Watermarking Engine, which allows all kind of watermarks (Text, RTF, PDF, Images, Ellipses, Lines etc.) to be added to PDF files.

Support for SharePoint Designer, a Web Services API as well as a host of other watermarking functionality has been available for a while, but 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 PDF Watermarking Nintex Workflow Activity, we are also adding activities for PDF Security, PDF Merging as well as HTML to PDF Conversion.

Similar to all other Nintex Activities provided by Muhimbi, the Watermark 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.
 

Image-Watermark-CombinedWatermark PDF files using Nintex Workflow 2007 and 2010 (Image watermark shown)


Building a full example workflow is out of the scope of this post as it is relatively 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 watermarked 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/…’.
  • Watermark type: A number of different watermark types are supported. Unlike our individual SharePoint Designer workflow activities, all watermark types have been rolled up into a single Nintex Activity. The functionality is largely the same so have a look here for more details. The following watermark types are supported.
    • Text: Add a text based watermark with full control over the font type, size, style, rotation and field codes such as {PAGE}.
    • PDF: Add the first page of another PDF file as the watermark.
    • Image: Use a BMP, JPG, GIF, PNG, TIFF, WMF or EMF / EMF+ file as a watermark.
    • RTF: Use RTF based text as a watermark.
    • Ellipse: Add an ellipse based watermark.
    • Line: Add a line based watermark.
    • QR Code: Add a QR code as a watermark. For details see this blog post.
    • Composite: For complex watermarks, or watermarks consisting of multiple elements such as line AND text AND images use the Composite Watermark in combination with our XML based watermarking syntax.
  • PDF List ID: If you wish to carry out further actions on the watermarked 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 watermarked 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 watermarked 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: , , , , , ,

Secure PDFs using Nintex Workflow and the Muhimbi PDF Converter for SharePoint

Posted at: 16:34 on 17 August 2011 by Muhimbi

Nintex-logo5_thumb1One 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.

 

PDF-Secure-CombinedSecure 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.

 

.




Labels: , , , , ,

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

Posted at: 12:09 on 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: , , , , , ,

Convert and merge multiple PDF files using SharePoint Designer workflows

Posted at: 17:15 on 16 August 2011 by Muhimbi

mergeThe Muhimbi PDF Converter for SharePoint has been able to convert and merge multiple files (including web pages) 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.

This post shows how to use SharePoint Designer to create a workflow that automatically adds a cover page to a document whenever it is created or updated. If the document is not already in PDF Format it will convert the file as part of the merging process.

The SharePoint Designer Workflow Activity is named Merge Documents into PDF. After adding it to your workflow you will see the following Workflow Sentence.
 

SPD-Sentence

 
The following fields are available:

  • These Documents: This field specifies the list of documents / URLs 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 to merge or URL of web page to convert. 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). SharePoint Designer Workflow Lookups are fully supported, which can be used to dynamically generate the path for the current file, e.g. [%Current Item:URL Path%]. In SharePoint 2010 always use forward slashes in your file path, see KB2529610. When specifying a file please make sure the path does not include the host name, e.g. ‘http://your site/…’. If you wish to convert web pages 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 this field parameter (see below for details) can be overridden using the third parameter. Specify the name 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 column referenced by the this field parameter. For an example see the exercise below.
  • This File: An optional filename (and path) to write the merged document to. When not specified, the same name as the document that triggered the workflow will be used with a ‘.pdf’ file extension. Please make sure the path does not include the host name, e.g. ‘http://your site/…’., see this post for details.
  • This Field: In a way similar to the User Interface for the merge facility, it is possible to specify a name of the column which contents will be used to populate the PDF Bookmark for the merged document. For example, specifying name or title makes it very easy to jump between the various sections of the merged PDF file.
  • Variable: 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.
  • Variable: List Item ID: Similarly to List ID, the Item ID of the generated PDF file can optionally be written to a workflow variable.

 

OK, so that is the theory. Let’s create a sample to automatically add a cover page to each document. In this example we will use SharePoint Designer 2010, but the steps for SharePoint Designer 2007 are nearly identical.

  1. Download and install the PDF Converter for SharePoint. You will need version 5.1 or newer.
     
  2. If not already installed, download and install the free SharePoint Designer for your environment (2007 or 2010).
     
  3. Make sure you have the appropriate privileges to create workflows on a site collection.
     
  4. Create, or navigate to, the Document Library that will be used for this workflow and add a simple MS-Word file named cover page.docx. This file can really be in any format and if its content is static it is recommend to use a PDF file for this purpose so it doesn’t need to be converted repeatedly for every merge operation.
     
  5. Open SharePoint Designer, open the relevant Site, create a new workflow, associate it with the Document Library used in step #4 and enable all Start Options to make sure the workflow is triggered when an item is created and updated.
     
  6. Add a condition to check that the type property of the current item does not equal pdf. Otherwise the workflow will recursively trigger whenever the merged file is written to the same document library.
     
  7. Add the Merge Documents into PDF workflow Action and click the these documents parameter.
     
  8. Add a line for the location of the cover page, note that our Document Library is named Automatic Merging. There is no need to specify the optional Include Bookmark and Custom Bookmark values, although you can if you wish to.
     SPD-FileSelection 
  9. The second file to merge is the one that triggered the workflow. Position the cursor on the 2nd line of the String Builder and click the Add or Change Lookup button. Select Current Item as the Data Source and URL Path as the Field from source. Click OK to close the Lookup for String window. We want to include the source document’s bookmarks so enter ;true at the end of the second line.
     
    Your String Builder should now look similar to the screenshot under step #8. Click OK to accept the changes.
     
  10. In this example we want the (merged) output file to use the same name and path as the source file that triggered the workflow, so there is not need to change the this file parameter.
     
  11. Click the this field parameter and select the field you wish to use for the content of the PDF Bookmarks. In this example we’ll select Name.
     
  12. We are all done, publish the workflow and add an MS-Word file with the content to merge to the Document Library. After a few seconds a PDF file will be created consisting of the cover page and the content. Open the PDF file and use the Bookmark pane to quickly navigate to the start of the 2 documents.

 

 

.





Labels: , , , , ,

Convert HTML to PDF using Nintex Workflow and the PDF Converter for SharePoint

Posted at: 14:48 on 15 August 2011 by Muhimbi

Nintex logoOne 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.
 

HTML-to-PDF-Combined
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: , , , , , ,

Need support from experts?

Access our Forum

Download Free Trials