Subscribe to News feed

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

Posted at: 2:48 PM 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, 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.
 

HTML-to-PDF-Combined
Convert HTML to 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 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.
  • 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 / 2013).
  • 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: , , , , , ,

2 Comments:

  • Can we modify header, footer and page margins during this conversion ?

    By Anonymous Anonymous, At 12 August, 2013 16:43  

  • Hi,

    You can indeed modify headers and footers during conversion using our extensive watermarking facilities. For the Nintex Workflow one see http://blog.muhimbi.com/2011/08/watermark-pdfs-using-nintex-workflow.html

    If you have any other questions feel free to contact our support desk at support@muhimbi.com.

    By Blogger Muhimbi, At 12 August, 2013 16:57  

Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link