XPS-to-PDF conversion using Nutrient's range of server-based PDF converters
A quick search online for products that convert one format to another results in a sometimes overwhelming list, with some utilities boasting the ability to convert hundreds of different formats. Needless to say, most of these products produce less-than-high-fidelity conversions — how can they produce high-quality conversions when they deal with so many different formats?
Our focus at Nutrient has always been high-fidelity conversions that provide professional quality results, along with a supporting environment that makes implementing conversions a truly enterprise-level prospect. This means we limit the number of formats we convert natively to important ones we can perfect and update when new versions are released, so even some fairly well-known file types just don’t make the cut.
Luckily, our range of document conversion products has had the ability to use third-party converters for a long time. This ability fills in the gaps — whether for an esoteric format like HPGL, or a more prosaic one, such as XPS. Yes, XPS, that wonderful XML-based format that was going to wrestle the market away from PDFs. Unfortunately for XPS, the most common thought when someone sees its extension is “How can I convert this into something useful, like a PDF”? Well, that’s where we’ve got you covered! Using the Nutrient Document Converter and GhostXPS, you can convert XPS documents just like any other.
The first thing to do — after installing Nutrient Document Converter — is to download and install GhostXPS on you conversion server(s).
-
Download the latest GhostXPS GPL Release from the Ghostscript website. Ensure you download the Windows version.
-
Install GhostXPS in a location of your choice on every server that runs Document Conveter. Make note of the location of the installation so you can point the Document Converter to it.
-
Modify the
Muhimbi.DocumentConverter.Service.exe.config
file as described in this guide and add the following entry to thesection:
<add key="XPSConverter" description="XPS to PDF Converter" fidelity="Full" supportedExtensions="xps" supportedOutputFormats="pdf" type="Muhimbi.DocumentConverter.WebService.CommandLineConverter, Muhimbi.DocumentConverter.WebService, Version=1.0.1.1, Culture=neutral, PublicKeyToken=c9db4759c9eaad12" parameter="C:\gs\gxps-9.14-win32.exe | -sDEVICE=pdfwrite -sOutputFile={1} -dNOPAUSE {0} "/>
More details on the parameters can be found in this blog post, though you shouldn’t need to change them.
-
Once everything has been configured, XPS files will be picked up automatically and treated exactly the same as all other file formats supported by Nutrient Document 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.