Subscribe to News feed

10 Years of Muhimbi - A look at the past, present and future

Posted at: 16:54 on 17 September 2018 by Muhimbi

10-yearWow, time flies when you're having fun! I cannot believe that as of September 2018 we are celebrating Muhimbi's 10th anniversary. As is usual with milestones like this, it is a good time to reflect on the past and have a look at what our team has achieved over this period.

When Muhimbi was founded in September of 2008, we didn't have a clear plan about the kind of products we would focus on, other than SharePoint products. With the introduction of SharePoint 2007, the platform had really matured and we all agreed a healthy 3rd party market would develop in the next few years. Boy, were we right!

We initially focused on building a robust - Enterprise ready - PDF Converter for SharePoint, which was quickly adopted by the market as the de facto standard for doing any kind of PDF Conversion, Merging, Security, Watermarking and OCR in SharePoint.

Like Rome, the PDF Converter was not built in one day. During the next few years we worked closely with our customers to make the product truly Enterprise ready. Support for additional file formats, workflow engines such as Nintex Workflow and K2 were added as were the latest and greatest SharePoint, Office and Windows versions. I can count 25 public releases on our release history page, with a 26th coming out soon.

PDF CollageMuhimbi PDF Converter for SP2007-2019 - Via SharePoint UI, Nintex Workflow and even SharePoint Designer

 

As my mum used to say, you cannot walk on just one leg. Sound advice, so we decided to start development on a completely different product line. The first version of the Muhimbi SharePoint Audit Suite was released in 2009 with the initial focus being a friendly viewer around SharePoint's built in auditing facility. As always, customers quickly demanded more, resulting in a comprehensive product that fills in the many gaps in SharePoint's own auditing facilities. It even audited page views, very useful.

It soon became clear that - in order to provide our demanding customers with the service and feature set they required - maintaining 2 major product lines was perhaps a bit too ambitious. As a result the Audit product line was acquired by Idera for inclusion in their SharePoint range of products, which was subsequently acquired by Metalogix.

Audit CollageMuhimbi SharePoint Audit - Good old times

 

With the focus back on the Muhimbi PDF Converter, we innovated rapidly. Adding support for non-SharePoint based PDF server platforms (C#, Java, PHP, Ruby), additional file formats including InfoPath, MSG, AutoCAD, HTML, URLs, Images and many other file types.

Customers being customers, that wasn't quite good enough :-). In 2014 it became clear that the world was moving to SharePoint Online and other online cloud-based platforms. We decided to invest heavily in this area - and I'd be liar if said it was easy - resulting in the first release of the PDF Converter for SharePoint Online in June of 2015.

Since that initial Online release, we haven't exactly sat on our hands. The pace of innovation is high and - as I write this - we are about the push out the 13th Online release. Some of the highlights include full support for Microsoft Flow and Azure Logic Apps, support for real time watermarks when files are downloaded, a full featured REST based API and the ability to convert and archive SharePoint Online URLs such as List Items.

SharePointConversionList Item PDF Conversion in SharePoint Online - Brilliant for sharing and archiving

 

Whether you need to create meeting or board packs, automatically archive documents in PDF/A format for regulatory purposes, secure and track PDF files after downloading, or share files in PDF format for any other reason, we've got you covered. New versions of the PDF Converter for SharePoint on-premise, Online and non-SharePoint (API) versions are imminent, and a completely new PDF related product line is under development..... stay tuned.

I would like to take this opportunity to thank the various teams in Muhimbi, our partners and our customers, we couldn't have done it without you.

Labels:

Use Microsoft Flow to copy SharePoint metadata

Posted at: 13:54 on 22 February 2018 by Muhimbi

FlowLogoAs part of our ongoing series about Muhimbi's Microsoft Flow and Azure Logic Apps facilities, a quick post about copying SharePoint Online metadata.

When we first introduced the Muhimbi PDF Converter for SharePoint, nearly ten years ago, we threw in a wildcard facility, something that we thought could be handy, but no-one had actually asked for... the ability to copy SharePoint metadata from one file to another. It turns out that customers absolutely love it.

Due to the popularity of this facility we released an improved version - at the time for SharePoint Designer workflows - that takes copying metadata to the next level and provide field level control about which metadata to copy, which fields to skip, and even the content type to apply.

Fast forward a couple of years and Microsoft Flow, Azure Logic Apps and our REST API have suddenly become popular. The focus is no longer on 'just SharePoint', but it still plays a large role and people still need to be able to copy metadata.

When we created our Flow Actions, and the underlying API, we made sure to bake in support for SharePoint metadata. It can be used as follows:

Create a Microsoft Flow / Azure Logic App as usual, insert a trigger and - in the appropriate place in the flow - choose the option to add a new action, enter copy metadata to filter the results.
 

Copy metadata - Search

 

This inserts the following Copy metadata action

Copy metadata - Action

 

The fields are as follows

  • Site URL: The fully qualified URL (including http(s)://) to the site collection in which the metadata will be copied.
  • Source File URL: The file to copy metadata from, excluding http:// and domain name. (details about specifying paths)
  • Destination file path: The file to copy metadata to, excluding http:// and domain name. (details about specifying paths)
  • User name & Password (Optional): In environments where the Muhimbi App is NOT installed on the relevant site collection, it is a requirement to specify credentials to carry out the operation. In environments with Multi Factor Authentication specify an app password. We strongly recommend installing Muhimbi's App rather than embedding credentials into your flow.
  • Fields to copy (Optional): When left empty all fields are copied automatically. If one or more - but not all - fields need to be copied, then enter them here in a comma separated list.
  • Destination content type (Optional): While copying meta-data you have full control over the content type of the destination file. The following options can be specified: 
    • (source): The content type of the source file is copied to the destination file. Please include the round brackets.
    • (target): The content type of the destination file is not modified and remains what it was before the copy operation. Please include the round brackets.
    • (default): The default content type for the document library is applied to the destination file. Please include the round brackets.
    • Name of Content type: The destination file is set to a specific, named, content type. Please do not use round brackets around the name of the content type.

That is all there is to it. The way our customers tend to use this is to use our facilities to convert, merge, watermark, secure and OCR files, write the generated file to SharePoint and then copy the various fields from one or more source items.

Any questions or comments? Leave a message below or contact our friendly support desk, we love talking to our customers.

.

Labels: , , ,

PDF Converter for SharePoint Online 9.10 - Web Page Conversion, Scalability Improvements

Posted at: 15:49 on 16 October 2017 by Muhimbi

sharepoint-online-logoIn addition to releasing new versions of the on-premise editions of our popular PDF Converter for SharePoint and PDF Converter Services (for C#, Java, PHP), our team has been working hard on a new  PDF Converter for SharePoint Online release.

The latest release, version 9.10, was rolled out last weekend and will have reached all our customers by the time you read this. As our servers deal with an ever increasing number of customers we have made considerable improvements in the area of scalability and long running operations.

Although I am sure it will make everyone sleep better at night, scalability and reliability is no fun from an end-user perspective. However, what is fun - within reason - is our new facility to convert SharePoint Online pages (List Items, Wiki pages and other SharePoint Online URLs) to PDF. Not only from the SharePoint Online user interface, but also via SharePoint Designer Workflows, Microsoft Flow and our REST based API.
 

Please note that all SharePoint Online versions are numbered in the 9.X range. At the time of writing the most recent version of the on-premise software is 8.3. If you are an existing customer, or installed a trial version before mid-October 2017, then we recommend installing the latest workflow actions for the best possible experience.
 
   
 
For those not familiar with the product, the Muhimbi PDF Converter for SharePoint Online is a lightweight subscription based solution that allows end-users to merge, split, watermark, secure, OCR and convert common document types - including InfoPath, AutoCAD, MSG (email) MS-Office, HTML and images - to PDF using SharePoint Online through a friendly user interface or via workflows, without the need to install any client-side software or Adobe Acrobat. More details can be found on the
product page.  
  

SP Online UI ConversionNew SharePoint Online List Item Conversions


In addition to the changes listed above, the key changes and additions in the new version are as follows:

3098 API Improvement Some API request from Nintex Workflow for O365 generate 'HTTP 400' errors
3603 HTML Improvement Add new HTML converter to Microsoft Flow
3100 HTML New Implement new HTML Converter in SharePoint Online
2976 HTML New Add Web Page conversion to SharePoint Online's user interface
3605 Merging Fix Merge action does not detect invalid file during conversion
3147 Metadata Fix Implement workaround for 'The property or field 'Title' has not been initialized'
3853 OCR Fix Chinese characters in workflow and API show up as '?'
3378 OCR Fix Fix encoding issues of OCR operations
3558 OCR Improvement Improve long running OCR operations
3569 Security Improvement Enable HTTPS for all workflow actions
3611 System Fix Implement workaround for 'Error while retrieving settings from List'.
2999 System Improvement Expose converter specific settings introduced in back-end, to front-end
2875 System Improvement Always send alert emails to primary contact
2881 System Improvement Improve reliability during (very) Long Running Operations
3121 UI Fix Site owners cannot convert from sub-site to first level parent site in 'picker'
3474 UI Improvement Show 'Please wait' message for long running operations
3585 UI Improvement Conversion does not work when a mix of valid and invalid files is selected
3163 UI Improvement File name validation skipped when batch converting files
3078 UI Improvement Remove specialised SharePoint document libraries from folder picker
3111 UI Improvement Reduce latency on Merge screen during post backs
3102 UI Improvement Add 'Document Set' Icon to Muhimbi folder picker
3445 UI Improvement 'Operation size exceeded' message does not show actual size
2894 Watermarking Fix Numerical filter is fixed on 2 decimal places
3051 Watermarking Improvement Implement real-time watermarking for Modern View pages
3075 Watermarking Improvement Tighten security in real-time watermarking facility
3564 Workflow Improvement Improve reliability of unstable Microsoft Workflow Manager instances
3079 Workflow Improvement Improve long running SharePoint Designer workflows


For more information check out the following resources:


As always, feel free to contact us using Twitter, our Blog, regular email or subscribe to our newsletter.
 

Start your 30 day trial by installing the App and Workflow Actions

.

Labels: , , , ,

Converting SharePoint Online Pages / Items to PDF

Posted at: 15:21 on 12 October 2017 by Muhimbi

HTML5 logo and wordmarkA couple of months ago we released a new version of our core document conversion platform, with the main change being a completely overhauled HTML converter. It supports the latest HTML, JavaScript, Print and Screen CSS media types and does a great job overall when it comes to converting HTML content to PDF.

In addition to supporting the latest HTML standards, it also comes with the ability to convert SharePoint Online web pages and URLs, a unique facility exclusive to Muhimbi's range of products. This new facility is particularly useful when it comes to archiving Lists and List Items to PDF Format, or sharing the content of SharePoint pages and Wikis with 3rd parties.

Although it is also possible to convert SharePoint Online URLs using our on-premise products, this new functionality is primarily aimed at our Online customers. In this article we will show how to carry out these kinds of conversions using the SharePoint Online User Interface, SharePoint Designer Workflows, Microsoft Flow and Logic Apps, as well as a REST based API.

 

User Interface

Although automating conversions is very powerful, sometimes all you need is a quick PDF of the current web page, generated by clicking a link in SharePoint's user interface. Please follow the steps below to set this up:

  1. Elevate the Muhimbi App to allow links to be added to the SharePoint User Interface. This requires Site Collection Administrator privileges.
  2. Enable the Muhimbi PDF Converter - Convert Web Page App Feature as described at the end of this Knowledge Base Article.
  3. Specify the default user credentials for converting SharePoint Online pages.
     

SP Online UI Conversion The original list (left), Convert via Personal Actions (middle), resulting PDF (right)

 
With everything configured, navigate to a Classic View SharePoint Online page (At the time of writing this functionality is only available in Classic view due to limitations in SharePoint Online's Modern View). From the Personal Actions menu (the menu that is opened when clicking on your name at the top-right corner of the screen), select Convert Page to PDF.

The resulting PDF is automatically optimised for print purposes. The left-hand navigation menu is removed as are (most of) the other user interface elements. If you prefer the PDF to look exactly like what is displayed in the web browser, including user interface elements, then switch to the Screen media type in the HTML Conversion configuration screen (the same screen used for specifying the default credentials).

 

SharePoint Designer Workflows

Converting via the SharePoint User Interface is nice and well, but more often than not conversion is part of an automated process. For example, every time a List Item is updated, or whenever a List Item's status changes to Approved, a PDF rendition will need to be created and archived / emailed or whatever other business process is important to your organisation.

The easiest way to automate this is by creating a SharePoint Designer Workflow. Please follow the steps below to set this up:

  1. Install and activate the Muhimbi Workflow Actions. Make sure to use version 9.10 or later.
  2. Although there is no need to Elevate the Muhimbi App, and enabling the Muhimbi PDF Converter - Convert Web Page App Feature, it may come in handy if you do not wish to store HTML Conversion credentials inside the workflow itself. You can specify the default credentials, as well as a number of optional aliases, using Muhimbi's User Credentials facility.
  3. Create a new SharePoint Designer workflow. In our case we navigate to the List and use SharePoint's List ribbon to create a workflow in SharePoint Designer. A full tutorial for creating SharePoint Designer Workflows is beyond the scope of this article, have a look at this video for a basic introduction.
  4. Give the workflow a name, set its Start Options (we use manual in this example) and design the workflow.
  5. Insert the Convert HTML to PDF workflow action and fill in the blanks.
     
    HTMLConversion-SPD - Online
    • this url / html: The fully qualified URL to convert. In this example we would like to convert the List Item so navigate to the View Item URL for the list item, and copy the URL up to and including '?ID=''. This will result in something like https://acme.sharepoint.com/sites/somesite/Lists/some_list/DispForm.aspx?ID=. Select this url, click the ... button and paste the address. Place the cursor at the end of the URL and click the Add or Change Lookup button. From the Field from source option, select ID to automatically insert the ID of the item that is being converted.
    • this file: Specify the location to write the PDF file to, e.g. Shared Documents/item.pdf. Naturally you can make the file name unique by inserting the ID in the same way as described in the previous step. For details about specifying output paths, see this blog post.
    • Orientation: Page orientation of the converted file. Use Portrait or Landscape.
    • Credentials: In order to convert SharePoint Online web pages - not files, this applies to URLs only - the HTML Converter needs to authenticate during conversion. Specify credentials, or leave them empty to use the default credentials configured centrally. If one or more aliases have been configured then they can be used by specifying the alias name between curly braces in the user name field (e.g. {SomeAliasName}). The password field can be left empty in this case.
    • Authentication: Accept the default value for URLs located in SharePoint Online. For external - non-SharePoint - URLs, specify Web (for normal web based authentication) or anonymous for sites that require no authentication.
    • Viewport: Optionally specify a virtual screen resolution to allow responsive web content to output the appropriate version (e.g. mobile or desktop version).
    • Media Type: Control if output should be optimised for Print layout (using the Print CSS Media type) or rendered exactly as displayed on screen.
    • Conversion delay: Control the delay between initially loading the page, including JavaScript rendering, and starting the PDF Conversion process. Do not set this value too low as SharePoint Online pages contain very rich content.
  6. Finish the workflow, publish it, and start it on a list item of your choice. After a few seconds you will find a PDF rendition in the output folder.

  
 

Microsoft Flow & Logic Apps

Microsoft Flow, and its big brother Logic Apps, are rapidly increasing in popularity. It is easy to see why, not only does it provide a great browser-based workflow editor for SharePoint Online, it can also be used in combination with non-SharePoint environments such as OneDrive, Dropbox, Google Drive, SalesForce and hundreds of other systems. Muhimbi's PDF Converter is available out of the (Flow) box, and makes it easy to convert, merge, watermark, secure, split and OCR files, just have a look at these tutorials.

As of mid-October 2017 our Flow actions also support the conversion of SharePoint Online pages. The SharePoint Designer workflow created in the previous section can easily be recreated in Flow. From a high level perspective, the steps are as follows:

  1. Create a new Flow and use the SharePoint Online trigger When an item is created or modified. Fill out the URL for the site collection and select the relevant SharePoint list from the dropdown menu.
  2. Insert Muhimbi's Convert HTML to PDF action and fill it out as per the screenshot displayed below. Naturally you will need to substitute the source URL, User name and password. Make sure that for SharePoint Online conversions you select Print as the Media type.
  3. Insert a Create File action to write the converted file back to SharePoint Online (or Dropbox, OneDrive, Google Drive, or send the PDF via email).
  4. Publish the workflow and create / update a list item in the specified list. After a few seconds the Flow will trigger and a PDF file will be generated.     
     

HTML Conversion - Flow

 

REST API

All functionality exposed by the Muhimbi PDF Converter is also available via an online REST based API. Sample code is beyond the scope of this blog post, you can find details for languages such as C#, Java and PHP on GitHub.

 

Troubleshooting / Caveats

Please keep in mind that HTML is not the best format for print or PDF Conversion purposes. Although our new HTML Converter is excellent, it is not magic. Depending on your exact needs and source material, you may need to experiment with the various settings. Our support desk staff is very experienced, so contact us if you have any questions or require assistance.

Some points to take into account:

  1. Modern Views: In SharePoint Online it is possible to display Lists and Libraries in Modern or Classic mode. Modern View is undergoing constant change (by Microsoft), as a result we currently only support the conversion of pages displayed in Classic View. Some Modern View pages will convert fine while others don't.
  2. Multi Factor Authentication (MFA):  An increasing number of SharePoint Online / Office 365 environments are secured using MFA. Although this is a positive development, it gets in the way of automated systems such as our HTML converter. If your environment uses MFA then please create an App password for HTML conversions, or disable MFA on your HTML Conversion account.
  3. HTML Conversion link not displayed: The option to convert the current page to PDF is only available in Classic SharePoint pages. Modern pages currently do not provide a facility for extending the personal actions menu. We will make sure it is added as soon as Microsoft makes this functionality available.
  4. The generated PDF looks different from what is displayed on screen. By default the page being converted is optimised for print / PDF output. If you prefer the PDF to look exactly like what is displayed on screen, including user interface elements, then set the Media Type to Screen in the HTML Conversion configuration screen.
  5. User modified content is not converted: Please keep in mind that the converter has no knowledge about the information currently displayed in the user's browser (e.g. size of the browser window, or custom data entered but not yet submit to the server). The converter always requests a fresh copy of the URL and converts that information to PDF.
  6. User specific information is missing: HTML Conversion is carried out in the context of the configured user account, the system is not aware of the user carrying out the HTML conversion. Be careful, don't specify accounts that display more information than the users should have access to.

.

Labels: , , , , , , ,

Convert PowerApps data to PDF (with some help from Microsoft Flow)

Posted at: 10:31 on 22 August 2017 by Muhimbi

PowerApps-LogoMuhimbi's range of server side PDF Conversion products is very popular amongst InfoPath users as we are the only software vendor with a credible solution for converting InfoPath forms to PDF, including attachments and the ability to specify which views to convert. Yes, this post is about PowerApps, not InfoPath, bear with me for a moment while I get to the point.

Although InfoPath is still popular amongst our customers, it is no longer actively developed by Microsoft. Similar to many other organisations who operate in the Digital Forms field, we have been keeping an eye out for possible replacements. Nintex Forms is a popular choice for organisations who operate in the SharePoint field, but in the past year another player has emerged; Microsoft's own PowerApps solution, part of Office 365.

For details about how to use our software to convert Nintex Forms - including attachments - to PDF, see this blog post. The focus of this post is on how to use PowerApps to capture data and turn that data into a richly formatted PDF. Please note that this article is NOT about converting the layout of the PowerApp screen to PDF. Due to architectural difficulties, that is currently not possible.
 

In this post we will:

  • Create a simple PowerApps form to capture user data.
  • Create a Microsoft Flow to use the captured data, enrich it with HTML, and convert it to PDF.
  • Invoke the Flow from PowerApps.

Although the Muhimbi Connector can be added to PowerApps directly, at the time of writing PowerApps does not have any built-in facilities for dealing with the generated PDF file. To keeps thing easy to understand, we carry out the actual PDF generation in Flow, from where the file can be emailed, or passed on to a service such as SharePoint, OneDrive, DropBox etc.

Update (2018): It is now possible to  directly interact with the Muhimbi Actions from PowerApps, without the need for Flow. Check out this (3rd party) blog post about how to achieve this.
 

 
Prerequisites

Before you begin, please make sure the following prerequisites are in place:

  • An Office 365 subscription with access to PowerApps and Flow.
  • Muhimbi PDF Converter Services Online full, free or trial subscription (Start trial)
  • The appropriate privileges to create PowerApps and Flows.
  • Working knowledge of both PowerApps and Flow. This is not a generic tutorial for those technologies.


 
Building the PowerApp & Associated Flow

Let's begin by creating a PowerApp. It doesn't really matter what it looks like, as long as it contains two text fields named TextEmail and TextName as well as a button named ButtonGenerate. A stylised version of the form can be found in the screenshot below. Note that we also added a Pen Input field, which you may need in the Further Enhancements section. 
 

PowerApp-PDF-Screen

 
 
With the form and various fields in place, create a new Flow using the Flows option in the Action ribbon. Click on the Create a new flow option in the right-hand side pane as per the screenshot above.

The Flow editor is opened and the PowerApps trigger is automatically inserted. Let's begin by giving the Flow a sensible name (the default is PowerApps button), instead name it PowerApps PDF Generator.

Click New step and select the Add an action option. Muhimbi's Flow actions are available out-of-the-box, there is nothing to install, just search for Muhimbi and select the Convert HTML to PDF option from the list. This action can convert URLs to PDF, but also has the option to convert HTML fragments, and... anything is possible in HTML.

If this is the first time you are using a Muhimbi action in Flow then you will be asked to specify your Muhimbi account. If you don't have one, click the Try for free button to create a new subscription.
 

The sky is the limit when it comes to HTML, but let's not go overboard for this simple example. Insert the following HTML in the Source URL or HTML field.

<html><body style="font-family: Arial">
      <h1>PowerApp PDF Demo</h1>
      <p>
        <b>Name</b>: <br/>
        <b>Email</b>: <br/>
      </p>
     <p>Generated using <a href="
http://www.muhimbi-online.com">www.muhimbi-online.com</a></p>
</body></html>

 
Now, this is where things get slightly tricky. We need to generate the parameters for the data we want to pass from the PowerApp to the Flow, in this case the contents of the TextEmail and TextName fields. To do this, position the cursor behind the semi column (:) after the Name label in the HTML fragment. With the cursor positioned, click the Ask in PowerApps option in the Parameters list, which will insert the incredibly undescriptive parameter named ConvertHTMLtoPDF_SourceURLorHTML.

In a similar fashion position the cursor behind the Email label in the HTML fragment, and click the Ask in PowerApps option again, which will insert and create the ConvertHTMLtoPDF_SourceURLorHTML_1 parameter, oh well, we can clean these names up after the Flow has been created and tested.
 

PowerApp-PDF-FlowHTML

 
Depending on your exact use case, and number of variables that need passing between your PowerApp and Flow, you may want to generate the HTML inside the PowerApp, and pass it as a single parameter into the Flow.

Add another step to process the generated PDF file. The file can be written to SharePoint, OneDrive, DropBox or any other Flow service that knows how to deal with files. In this example we will email the file as an attachment, so insert the Send email action of your choice (there are several services that can send email, we picked the one simply named Mail).

Remember how ConvertHTMLtoPDF_SourceURLorHTML_1 contains the email field? Insert that into the To field (or hardcode an address, it is up to you). Enter a descriptive Subject, Email Body and Attachment file name (under advanced options), make sure the file name ends in '.pdf'.

In the Attachment field, insert the Processed file content field from the Convert HTML to PDF action.
 

PowerApp-PDF-FlowEmail

 
That is our Flow done, it is fairly simple as you can see in the screenshot below.
 

PowerApp-PDF-Flow

 
 
Save the Flow and return to the PowerApps editor.

With the Generate PDF button selected, select the Flow option in the Action ribbon. Select the newly authored Flow from the list. If you named it the same as we did (PowerApps PDF generator) then a method name will automatically be generated and inserted in the button's OnSelect field. Please make sure the parameters for the name and email are passed in in this order.

      PowerAppsPDFGenerator.Run(TextName.Text, TextEmail.Text)

That is it, save the form and preview the app (F5). Enter your name and email address, and click the button. After a few seconds you will receive an email with the PDF attachment in your inbox.
 
 

Troubleshooting

PowerApps, Flow, a third-party PDF Converter, all excellent products but there are quite a few moving parts in this tutorial. It is not unlikely that you will experience a problem during the development.

If you do experience problems then please have a look at the following:

  • Ask PowerApps: Please make sure that the number of parameters created by clicking Ask PowerApps matches the number of parameters passed to the Flow in the button's OnSelect event.
  • Flow Name: Make sure the correct flow name is used in the button's OnSelect event. PowerApps will automatically generate the name, don't just copy the name from our example as it may differ slightly.
  • Muhimbi account: The first time you interact with the Muhimbi Actions from Flow, you will be asked to login or create an account. If you organisation has a subscription, but you don't know the credentials, then please reach out to the appropriate team or create a new test account.
  • Muhimbi support: If, after double checking all prerequisites and going over all troubleshooting steps in this section, you are stuck, please contact our friendly support desk, we are here to help

 

Further enhancements

Although this is a nice and easy to follow, tutorial, we can think of a number of refinements and enhancements that will come in handy in the real world:

  • Rename Ask PowerApps variables: The names of the parameters generated by Flow are undescriptive. You can actually fix this using the full Flow website (not the more limited version integrated in PowerApps). Export the Flow, unzip it on your local system, rename the variables in the included XML files to something more descriptive, zip the files again, upload the Flow and overwrite the existing one. Then refresh the Flow reference under the button. Telegram style instructions, but they worked for us.
  • Generating HTML:  In the real world it is likely that you have quite a few more parameters that your want to merge into the HTML. Passing them as individual parameters into the Flow is a bit painful, so consider creating the HTML fragment inside the PowerApp and pass it as a single parameter to the Flow.
  • Insert Pen Input: Implementation of this is beyond the scope of this tutorial, but consider it an interesting exercise. It is not possible to easily pass the bitmap associated with the Pen Input to a flow. However, it is possible to create an Excel Data source in PowerApps and pass images to that data source. This should make it possible to query the location of the image using Flow, copy it to a location where it is accessible for anonymous users and include a reference to the image in the HTML. Easy?....NO. Possible?..... Maybe. Use this as a starting point.
  • Other output: Conversion is not limited to HTML, it is just a format that is easy for tutorials such as this one. The Muhimbi PDF Converter supports most common file formats, including Word XML.

 
What do you think, is this something that could work for your organisation? Feel free to leave a comment below or contact our support desk if you have any technical or commercial questions.

.

Labels: , , , , ,

Use Nintex Workflow for Office 365 to PDF Convert, Merge, Watermark, Secure & OCR files

Posted at: 17:00 on 17 August 2017 by Muhimbi

Nintex Logo 2We have been a little bit in love with Nintex Workflow ever since we integrated it into the Muhimbi PDF Converter for SharePoint all the way back in the SharePoint 2007 era. Although we started simple with just a basic PDF Conversion workflow action, over the years we added Nintex Workflow support for all our Workflow Actions to make it possible to Convert, Merge, Watermark, Secure and OCR documents.

With more and more companies moving to Office 365, and specifically SharePoint online, the industry's focus is moving towards online services, resulting in such products as the Muhimbi PDF Converter for SharePoint Online and Nintex Workflow for Office 365. Although other workflow engines such as Microsoft Flow, Azure Logic Apps, and the built-in SharePoint Online Workflow Manager make it possible for 3rd parties such as Muhimbi to directly integrate their services, this is currently not possible in Nintex Workflow for Office 365.

We don't like 'not possible' and, as many of our shared customers frequently request Muhimbi / Nintex Workflow for Office 365 integration, we decided to see if perhaps we can implement a workaround to make the two products work together. The workaround that our customers have been using for years (Create a SharePoint Designer Workflow using our workflow actions and invoke that from Nintex Workflow for Office 365) works well, but it is just....well...unsatisfactory. In this post, we'll show how to integrate the functionality exposed by the Muhimbi PDF Converter for SharePoint Online directly into a Nintex Workflow by invoking our comprehensive REST API.

  

Background

When we first released the Muhimbi PDF Converter for SharePoint Online in early 2015, we were very much aware that - due to technical limitations in the SharePoint Online platform - it would not be possible to bring the full power of our existing on-premise (SP2007-SP2016) products to The Cloud. The first release focused on the most important elements (the PDF Conversion user interface and Workflow Actions for SharePoint Designer), but one of the key features of our on-premise products was missing, an API to allow integration with 3rd party solutions and software partners.

Although our customers are very happy with the comprehensive Web Services (SOAP) interface exposed by our on-premise products, it is less suitable for use by online subscription based services. Instead we decided to go for a brand-new, and much-simplified, REST based interface as that is how modern systems, especially Cloud based products, talk to each other.

This new REST based service was launched earlier this year as part of the Muhimbi PDF Converter Services Online product. A separate product that has no dependencies on SharePoint and can be used to integrate with such services as Microsoft Flow, Azure Logic Apps, C#, Java, PHP, JavaScript, Python Ruby and many other services including ... and here it comes .... Nintex Workflow for Office 365.

Although available as a stand-alone subscription, this new service is automatically included in each PDF Converter for SharePoint Online subscription at no additional charge.

 

Prerequisites

Before you begin, please make sure the following prerequisites are in place:

Please note that this tutorial is for the SharePoint Online version of Nintex Workflow. For details about using our software in combination with the on-premise (2007-2016) versions of SharePoint, see this Knowledge Base article.

 

Building the workflow

Let's have some fun and build a workflow! It is strongly recommended to follow the tutorial below, but the workflow is available for download as well. Import it in Nintex Workflow for Office 365, SET THE API KEY, publish it and you are ready to go.

Navigate to a site collection and document library of your choice, one that matches the prerequisites listed above, and choose the option to create a new Nintex Workflow. In this example, we use the standard Shared Document library that is available on most site collections.

Create the following workflow variables as we need them later:

  • JSON (Text): Contains the JSON, JavaScript Object Notation, the command that will be sent to the conversion service.
  • API_KEY (Text): A unique ID that will be used to look up your Muhimbi subscription details.
  • ResponseText (Text): The status message returned by the Conversion Service.
  • ResponseCode (Integer): The status code returned by the Conversion Service.

 
As a first step (you should always do this) insert a Set Workflow Status action, edit it and set it to Started. This will show us that the workflow has actually triggered (it is always a guess in SharePoint Online), it will also give us something to click on to inspect the current status of the workflow.

Add a Build String action and set the Output to the JSON workflow variable. In the String field enter the following:

[
    "sharepoint_file":
    [
     "site_url":"‍{Workflow Context:Current site URL}‍",
     "source_file_url":"‍{Current Item:Server Relative URL}‍",
     "destination_file_url":"‍{Current Item:Server Relative URL}‍.pdf"
    ],
    "output_format":"PDF",
    "fail_on_error":true
]

 

Nintex-O365-Convert-JSON

 
PAY ATTENTION TO:

  • JSON Notation: You may be familiar with JSON notation, but please note that we have replaced the curly braces - { } - with square brackets [ ]. This is due to a bug in Nintex Workflow for Office 365. If you have concerns about using square brackets (as they are also used for Array types) feel free to replace them with anything else. In a follow-up step we will fix them.
  • Copy & Paste: Be careful when copying this bit of JSON from the browser window. Always paste it in Notepad (and copy back) to strip out non-standard characters and formatting.
  • References: The text displayed in red are Nintex Workflow references. You can't just copy and paste them and expect it to work, after pasting the entire fragment replace each Nintex reference using the Insert Reference facility (Currently on the right-hand side of the action's edit screen, see screenshot above).
  • Output file name: In this basic example, we just add '.pdf' to the end of the output path and file name. This is not particularly pretty, but in order to keep things simple we are not including the Nintex Workflow actions to strip off the old extension and add the new one. You can use whatever you like here as long as it is a valid output path and file name.

 
As mentioned above, we have mangled the JSON by using square brackets, we need to replace them with curly braces again. To do so, insert a Replace Substring in String action and configure it as follows:

  • Search String: Enter the opening square bracket [.
  • Replace String: Enter the opening curly brace {.
  • String: Insert a reference to the workflow variable named JSON.
  • Output: Pick the JSON workflow variable to store the results in.

Click the Save button and copy the workflow action (using the action's ... menu), and paste it as the next action (click the little square on the workflow's timeline). Configure the newly pasted workflow action and replace the opening bracket with the closing bracket ']'. Do the same for the curly brace and replace '{' with '}'. Save the action, we now have valid JSON that we can send to the Conversion Service.
 

Before we can talk to the Conversion Service, we need to set the API_KEY. Insert a Set Workflow Variable action and configure it to set the API_KEY workflow variable to the API Key you received by email when signing up for the Muhimbi PDF Converter Services Online. e.g.:

     decafbad-baad-baad-baad-decafbaaaaad

Do not try to use this particular key, it will not work. Also, do not try to be clever and put curly braces around the key.

Save the action, we are almost done!

 
Insert the Web Request action and configure it as follows:

  • URL: https://api.muhimbi.com/api/v1/operations/convert
  • Method: POST
  • Content type: application/json
  • Add header: Click Add header, specify API_KEY as the Header name and insert a reference to the API_KEY workflow variable for the Header value.
  • Body: Select the Content option, add a reference to the JSON workflow variable in the Data field.
  • Store response content in: ResponseText.
  • Store http status code in: ResponseCode.

Click the Save button.
 

Finally, insert another Set Workflow Status action and configure it with the text Completed. When we run the workflow, we can now easily see when it has completed.

Your workflow should look something like the following:

Nintex-O365-ConvertBasic-Part1Nintex-O365-ConvertBasic-Part2  

 
We are DONE, at least with the initial version. Publish the workflow, give it a sensible name, set the Start Options to a value of your choice.

Once published, open the document library the workflow is associated with, make sure a file of the supported type is present, and manually start the workflow. After a few seconds, the PDF file will show up next to the file the workflow was started on.
 
 

Troubleshooting

Although both Nintex Workflow for Office 365 and the Muhimbi PDF Converter are mature services, in workflows like this there are a lot of 'moving parts'. Custom generated JSON, customer specific API keys, paths to document libraries etc. The first time you create a workflow like this, something is bound to go wrong.

Some common issues and troubleshooting tips are provided below:

  • Check prerequisites: Double check the prerequisites - listed at the beginning of this article - are in place.
  • Log to History List: If it is not clear what is going wrong, log critical parts such as the JSON workflow variable (after the replace operation) as well as the ResponseText workflow variable (after the web request) using the Log To History List workflow action. You can see the contents of this list by clicking on the Workflow Status column for the List Item the workflow is running on.
  • Send email: The amount of text that can be logged to the History List is limited (roughly 250 characters I believe), so for larger messages use the Send an Email action action to send an email, with debug content in the body, to yourself.
  • Copy & Paste: Be very careful when copying the JSON fragment from this article into your workflow. Browsers tend to insert hidden characters that are not filtered out by the Nintex Workflow editor. When copying text from a browser, paste it into Notepad first to clean it. Then copy it from Notepad and paste it into your workflow.
  • Nintex References: Make sure that the Nintex Workflow references in the JSON provided in this article are replaced by actual Nintex Workflow references. You can double check if the references are active by logging the JSON workflow variable to the History List. You should see the actual paths, not {Current Item:Server Relative URL}.
  • Muhimbi Support: If, after double checking all prerequisites and going over all troubleshooting steps in this section, you are stuck, please contact our friendly support desk, we are here to help.
     

Fine tuning

Don't get me wrong, the workflow we created earlier is great, but I wouldn't use it for mission critical processes. There is no error handling whatsoever, and there is a possible recursion problem where the workflow will be triggered for PDF files it has created itself.

A version of the workflow that is more production ready can be found in the screenshot below. Full details are beyond the scope of this post, but you can download the full workflow here. Import it into Nintex Workflow for Office 365, SET THE API KEY, publish it and you are ready to go.

Nintex-O365-Convert-Part2Nintex-O365-Convert-Part3

Other operations

This article shows how to invoke the Convert action on Muhimbi's REST interface. In addition to PDF Conversion, we expose additional end-points for Merge, Watermark, Secure, Split, OCR and even Copy Metadata operations. Full examples are beyond the scope of this article, but you can find examples in the SharePoint section of our GitHub repository.

Many of our customers already use the functionality described in this blog post in their mission critical SharePoint Online processes. What do you think, is this something that could work for your organisation? Feel free to leave a comment below or contact our support desk if you have any technical or commercial questions.

.

Labels: , , , , , , , ,

PDF Converter Services 8.3 - New HTML & Image Converters

Posted at: 18:17 on 11 August 2017 by Muhimbi

PDFConverterServicesBox4_thumb3

We are happy to announce a new version of the Muhimbi PDF Converter Services. Although a lot of fixes, workaround and small tweaks have been added, the key change in the 8.3 release is a completely overhauled HTML to PDF Converter, which is more up to date with the latest web based technologies, and more importantly, no longer has a dependency on Internet Explorer.

The key changes are as follows:

  • Brand new Image Converter (For GIF, BMP, PNG and JPG)
  • Improved resource usage of OCR engine.
  • Support for PDF Named Destinations.    

SharePointConversion_thumb2_thumbOriginal Web page (left), converted to PDF using the Screen Media type (middle) and the Print Media type (right)

 

A quick introduction for those not familiar with the product: The Muhimbi PDF Converter Services is an ‘on premises’ server based SDK that allows software developers to convert typical Office files to PDF format using a robust, scalable but friendly Web Services interface from Java, .NET, Ruby & PHP based solutions. It supports a large number of file types including MS-Office and ODF file formats as well as HTML, MSG (email), EML, AutoCAD and Image based files and is used by some of the largest organisations in the world for mission critical document conversions. In addition to converting documents the product ships with a sophisticated watermarking engine, PDF Splitting and Merging facilities, an OCR facility and the ability to secure PDF files. Separate SharePoint and Cloud-based Subscription services are available as well.
 

When upgrading from a previous version, read this Knowledge Base article first.

 
Some of the main changes and additions in the new version are as follows:

2980 AutoCAD Fix Fix text alignment issues in DWG Conversions
1822 AutoCAD Fix System.AccessViolationException under stress in DWG Conversions
2065 AutoCAD Improvement Improve performance of converting complex DWG files
2969 HTML Fix IE HTML Conversion adds additional white pages / repeats content
2966 HTML Fix IE HTML Converter hides half a line
3145 HTML Improvement Allow '-1' to be used for (HTML) ConversionDelay
3127 HTML Improvement Add conversion delay to Diagnostics Tool
2970 HTML Improvement IE HTML Conversion weird aspect ratio issue on form fields
2085 HTML Improvement HTML Converter - Investigate support for offline mode
1638 HTML Improvement Improve error messaging for HTML to PDF conversions.
1834 HTML Improvement Allow Proxy settings to be configured in config file.
2925 HTML New Completely overhaul HTML Converter
2946 HTML New Support 'Screen' and 'Print' CSS media types during HTML Conversion
1426 Image Improvement Completely overhaul the Image Converter
1005 InfoPath Fix Fix potential deadlock in InfoPath converter
2566 Merging Fix System.ArgumentOutOfRangeException when merging file
2937 Merging Fix System.ArgumentOutOfRangeException when merging file
2193 Merging New Add support for converting and merging files attached via PDF annotations
3233 MSG Fix Incorrect word breaking during MSG conversion
2918 MSG Fix MSG Converter does not process page numbers
2277 MSG Fix Rogue hyperlinks when converting some emails
2111 MSG Fix OLE Drawing object becomes opaque on IE9 when converting emails
2626 MSG Fix Text goes missing when converting emails under certain conditions
2628 MSG Fix Some images included twice when converting emails
2995 MSG Improvement Improve message for 'BreakOnUnsupportedAttachment'
3103 MS-Word Fix When converting to DOCX, documents are saved in 'compatibility mode'
3054 OCR Fix The characters 'fi' & 'fl' cannot be blacklisted during OCR Text extraction
3044 OCR Fix Chinese OCR not working properly
2465 OCR Fix OCRed PDFs balloon in file size when resaved in Acrobat DC
2951 OCR Fix Under high load, OCR operations sometimes results in a syntax error
2916 OCR Fix Small PDF Syntax errors in OCRed PDFs
2598 OCR Fix JPXDecoded files appear to leak memory during OCR
3019 OCR Improvement Improve OCR for PDFs that are internally rotated
2707 OCR Improvement Excessive memory use when parsing complex PDF file / OCR Generation
3039 Other Fix NullReferenceException in get_PageScaling() during postprocessing
2886 PDF Fix Add Page trimming to PDF Passthrough Converter
2160 PDF Fix Removing attachments from PDF balloons file size and slows down operations
2398 PDF Fix PDF Bookmark corruption when merging files and empty parent bookmarks
2466 PDF Fix Certain PDF files cause Acrobat Pro to crash
1871 PDF New Add support for turning bookmarks into PDF Named destinations
2406 Service Fix Conversion Service stuck on 'starting' after reboot
3038 Setup Fix Installer does not detect MS-Office click-to-run version
3104 Setup Fix Link to 'disable loopback' KB article broken.
2529 Setup Fix Additional firewall rule is created during every installation
2608 Setup Improvement Automate printer compression settings using code
2163 TIFF Fix Page orientation when converting TIFF is not always correctly identified
2859 TIFF New Allow page size and margins to be specified for TIFF conversions
3020 Watermarking Improvement Improve watermarking for PDFs that are internally rotated


For more information check out the following resources:


As always, feel free to contact us using Twitter, our Blog, regular email or subscribe to our newsletter.

Download your free trial here (100MB). .

.

Labels: , ,

Need support from experts?

Access our Forum

Download Free Trials