Invoke 3rd party converters using Muhimbi’s PDF Converter
Muhimbi’s range of PDF Conversion products has had the ability to add custom converters for a long time. Although these plug-ins work very well, if you are not a developer, or you are not familiar with .NET based development, then implementing a custom converter may be less than trivial.
We were recently approached by one of our defence industry customers who has exactly this problem. They really like Muhimbi’s friendly and scalable web services interface, but they were looking to add support for a number of niche file formats (hp, hpg, hpgl, hpgl2, plt, cgm, mlr) that are currently not supported by our products. Writing converter’s for individual file formats is not trivial, to say the least. Fortunately they have Siemens Teamcenter, which comes with ‘visconvert’, a basic command line application that does have support for these file formats
To allow existing, 3rd party, converters to be hooked into the Muhimbi PDF Converter engine we developed a new and generic Command Line Converter that acts as a wrapper for existing software. This new facility is available as of version 6.1 and as you can see in the following config file fragment it is very simple to setup.
<add key="CommandLineConverter" description="Converts using 3rd party executables" fidelity="Full" supportedExtensions="hp,hpg,hpgl,hpgl2,plt,cgm,mlr" supportedOutputFormats="pdf" type="Muhimbi.DocumentConverter.WebService.CommandLineConverter, Muhimbi.DocumentConverter.WebService, Version=1.0.1.1, Culture=neutral, PublicKeyToken=c9db4759c9eaad12" parameter="c:\splm\vis20072\VVCP\prepare.exe | -PDF {0} -combine -page all -out {1} –overwrite -size {Parameter1}"/>
The parameters are as follows:
-
key: Give the converter a unique name in case multiple Command Line Converters are in use. Otherwise accept the default value.
-
description: The description of the converter exposed via the web services API. As, for example, displayed in our SharePoint Central Administration screen.
-
supportedExtensions: A list of input file formats supported by this converter.
-
supportedOutputFormats: The file formats the converter can generate. This is not limited to just PDF as our software fully supports cross-conversion.
-
type: Do not touch.
-
parameter: The location of the 3rd party converter and the arguments to send to it. Note that these 2 values are separated by a vertical pipe character ‘|’. The arguments section supports the following parameters:
-
{0}: This will automatically be replaced with the full path to the input file.
-
{1}: This will automatically be replaced with the full path and filename where the output file should be generated.
-
{Parameter1}, {Parameter2}….{Parameter10}: Optional parameters that can be passed in via the web services interface using ConverterSpecificSettings_CommandLineConverter. Use this to pass proprietary information to the third party converter such as page size or special processing instructions.
-
That is all there is to it. Once everything has been configured, all mapped file formats will be picked up automatically and treated exactly the same as all other file formats supported by the Muhimbi PDF Converter.
Clavin is a Microsoft Business Applications MVP who supports 1,000+ high-level enterprise customers with challenges related to PDF conversion in combination with SharePoint on-premises Office 365, Azure, Nintex, K2, and Power Platform mostly no-code solutions.