Dealing with attachments when converting emails, InfoPath forms and merging documents

When we create or update our popular range of PDF converters, we don't just phone it in, we talk to our customers and really go the extra mile to make sure that our software works exactly how they want it to work.

Let's take the topic of attachments as an example. For many years we have supported various file formats that may contain attachments, for example emails, InfoPath forms, and PDF files containing attached files. Historically, before release 10.0, we provided two options to deal with these attachments.

  • Convert all attachments to PDF, and merge them to the output PDF.
  • Or ignore all attachments.

This served most of our customers well, but from time to time our support desk reported ' annoying customers who wanted something not supported by the product', specifically in the area of how our software deals with attachments. We don't like to disappoint our customers - which is why we get such great reviews - so as of version 10.0 of the Muhimbi PDF Converter for SharePoint (on premise), Muhimbi PDF Converter Services, and the Muhimbi PDF Converter for SharePoint Online, the following facilities are available to deal with attachments.

  • Convert attachments to PDF, and merge them - alongside the main document - into a single PDF (Legacy behaviour).
  • Convert attachments to PDF, but store them in the main PDF output file as PDF attachments.
  • Convert the main file to PDF, but store the attachments in their original format in the PDF.
  • Control how unsupported or corrupt attachments are dealt with, either fail the entire conversion, ignore the attachments, or store the attachment in its original file format in the output PDF.
  • Control how small images are filtered out of emails. Emails tend to have loads of small attachments (twitter logo, company logos etc). As of version 10.0 the converter filters out any image based attachments (excluding TIFFs) that are smaller than 150 pixels in width or height.

To illustrate how this functionality can be used in the real world, have a look at the following video created by our Clavin. He uses MS-Flow - but it works the same for our other supported platforms - to convert emails to PDF and control how the attachments are processed.

As our software is very flexible, this new behaviour can be controlled via several mechanisms. Details can be found below.

Conversion Service's Config file

The conversion service's behaviour can be controlled globally via its config file. Any changes made here apply to all operations unless overridden at the individual request level. For details about where to find, and how to edit, this config file, see this Knowledge Base article.

The relevant config settings are as follows:

For PDF source files containing attachments

For InfoPath forms containing attachments

For Emails containing attachments

XML override

For Nintex Workflow, SharePoint Designer workflows, Microsoft Flow and REST API requests, it is possible to specify Muhimbi's XML override syntax on a request by request basis. As it is not feasible to have a a switch in our user interface for every imaginable tweak or setting, we allow settings to be passed in via XML.

It is this technique that is used in the video in the introduction of this post. There are literally hundreds of settings, exact details can be found in the Developer Guide.

An example, to control the conversion of email attachments during PDF Conversion, is as follows:

Via SOAP API

The on-premise version of the Muhimbi PDF Converter comes with a rich SOAP based web service, as well as plenty of sample code. For details see our GitHub repository.

The object model, classes and properties can be found in the Developer Guide.

As always, if you have any questions leave a comment below, or contact our friendly support team.

Labels: Articles, EML, InfoPath, Merging, MSG, pdf

Have a Question?
We’re Always Happy to Help.

© Muhimbi Ltd. 2008 - 2024
This website uses cookies to ensure you get the best experience. Learn more