Subscribe to News feed

A hop, skip, and a Tiff- Converting all supported document types to Tiff

Posted at: 07:29 on 15 July 2014 by David Radford

filetype_tiffBoth the Muhimbi PDF Converter for SharePoint and Muhimbi PDF Converter Services have long been able to  cross-convert one file format to another out of the box, not just to PDF.  This works very well, but what happens when you really want to mix it up- say convert a grid based text format like Excel to a multi-page image format like TIFF?  As we told the customer who requested this- “I’m not sure, but I know we can figure it out for you!”

And so here it is!  The solution is actually fairly simple and relies on two features that already exist within Muhimbi’s Converter products.  The first is the multi-step converter we built to allow cross-conversions and the second is our ability to integrate 3rd party converters within Muhimbi’s own conversion process.

The multi-step converter allows for an intermediate format to be used when there is no converter that can directly convert between the file types requested.  This stepping stone approach happens inside the Converter and is completely invisible to the user.  There is only one step to creating the multi-step TIFF converter:

  1. Modify the ‘Muhimbi.DocumentConverter.Service.exe.config’ file as described here and add the following entry to the <MuhimbiDocumentConverters> section.  This tells the Converter that all the listed extensions can be converted to TIFF by first converting them to PDF and then from there to TIFF.

 

<add key="CrossConverter_TIFF"
    description="Convert all formats to TIFF"
    fidelity="Full"
    supportedExtensions="xml,infopathxml,doc,docx,docm,rtf,txt,wps,odt,ott,xls,xlsx,xlsm,xlsb,
    csv,dif,ods,ots,html,htm,mht,gif,png,jpg,jpeg,bmp,ppt,pptx,pptm,xml,odp,otp,pps,
    ppsx,ppsm,vsd,vdx,svg,svgz,vdw,dxf,dwg,msg,eml"
    supportedOutputFormats="tiff"
    type="Muhimbi.DocumentConverter.WebService.MultiStepConverterFullFidelity,
    Muhimbi.DocumentConverter.WebService, Version=1.0.1.1, Culture=neutral, 
    PublicKeyToken=c9db4759c9eaad12">
  <steps>
    <step from="" to="pdf"/>
    <step from="pdf" to=""/>
  </steps>
</add>      

 

The 3rd party converter integration actually allows the Converter to do the conversion from PDF to TIFF and complete the job.  This step is really no different than adding any 3rd party converter.  It also has the added benefit of allowing PDF to TIFF conversion.

  1. Download the latest Ghostscript GPL Release from the Ghostscript website (please ensure you download the Windows Version).
  2. Install Ghostscript in a location of your choice on every server that runs the Muhimbi Conversion Service. Please make note of the location of the installation so you can point the Converter to it in the XML fragment listed below.

 

The next step is to modify the ‘Muhimbi.DocumentConverter.Service.exe.config’ file again and add the following entry to the same <MuhimbiDocumentConverters> section. Please remove the line wrapping from the content of the parameter attribute, this example has been reformatted to make it fit in a browser window. Please update the location of the Ghostscript executable as well.

<add key="PDF_TIFFConverter"
     description="PDF to TIFF Converter"
     fidelity="Full"
     supportedExtensions="pdf"
     supportedOutputFormats="tiff"
     type="Muhimbi.DocumentConverter.WebService.CommandLineConverter,
           Muhimbi.DocumentConverter.WebService, Version=1.0.1.1, Culture=neutral, 
PublicKeyTo
ken=c9db4759c9eaad12"
     parameter="C:\Program Files\gs\gs9.14\bin\gswin64c.exe |-dBATCH -dNOPAUSE -sDEVICE=tiff24nc 
-sCompression=lzw -r300x300 -sOutputFile={1} {0}
"/>

 
More details on the Muhimbi parameters can be found here, though you shouldn’t need to change them.   You can also review the various Ghostscript options here, especially the resolution that is used (-r300x300) as you may wish to change this in order to suit your specific needs.

NOTE- For this to work you must be on at least version 7.2.1 of the Muhimbi PDF Converter.

If the source file you wish to convert is in PDF format, and you are converting via our SharePoint Workflow Actions, then please make sure the option to send PDF files to the server is enabled as by default PDF files are skipped. For details see SkipPDFFiles option in this blog post.

There you go- your Muhimbi Converter can now convert all supported formats to multi-page TIFF as well!  Want to convert an InfoPath or MSG file – including all attachments – to TIFF and apply watermarks in the process? Now you can.

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