Using Document Converter from PowerShell
This article is about using PowerShell with the ‘on-premise’ version of Nutrient Document Converter. See MuhimbiConvertOnlineTo-PDF PowerShell module for a PowerShell example of our online subscription based service.
For a basic example of how to convert a file to PDF using PowerShell, see MuhimbiConvertTo-PDF PowerShell module.
This example invokes our ‘Convert’ method, and can easily be modified to deal with document merging, watermarking, applying PDF security and even OCR. Although we provide no PowerShell sample code for those scenarios, as PowerShell is similar to other .NET environments, have a look at our generic code samples.
The PowerShell sample linked to above does not use PowerShell’s built in web services facilities New-WebServiceProxy
, as that make things very difficult when dealing with complex Web Services such as the one exposed by Nutrient Document Converter.
Instead, the sample uses the pre-generated proxy DLLs that ship alongside our software. They can be found in the folder where the Conversion Service has been deployed (See Muhimbi Document Converter/Open Installation folder shortcut in the Windows start menu).
For details about how to use the various objects and methods, see Where can I find details about the PDF converter’s object model.