Save file to local disk

To save the conversion results to a local disk, use the convert(String filePath, ConvertOptions convertOptions) implementation of the convert() method. This implementation accepts the path of the output file and converter options as parameters.

File path can be absolute or relative. If the resulting file does not exist, it will be created.

The following code snippet shows how to save a file to a local disk:

public static void Run()
{
    // Specify source file location
    Converter converter = new Converter("c:\\files\\sample.docx"); 

    PdfConvertOptions options = new PdfConvertOptions();
    // Specify output file location
    converter.convert("c:\\files\\converted.pdf", options);

}