Subscribe to News feed

Invoke 3rd party converters using Muhimbi’s PDF Converter

Posted at: 15:24 on 16 July 2012 by Muhimbi

plug_in

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, 
PublicKeyTo
ken=c9db4759c9eaad12"
     parameter="c:\splm\vis20072\VVCP\prepare.exe | -PDF {0} -combine -page all -out {1} –overwrite 
-size {Parameter
1}"/>

 
The parameters are as follows:

  1. key: Give the converter a unique name in case multiple Command Line Converters are in use. Otherwise accept the default value.
  2. description: The description of the converter exposed via the web services API. As, for example, displayed in our SharePoint Central Administration screen.
  3. supportedExtensions: A list of input file formats supported by this converter.
  4. supportedOutputFormats: The file formats the converter can generate. This is not limited to just PDF as our software fully supports cross-conversion.
  5. type: Do not touch.
  6. 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.

.

Labels: , , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

Links to this post:

Create a Link

Need support from experts?

Access our Forum

Download Free Trials