Skip to content

Instantly share code, notes, and snippets.

@GroupDocsGists
Created September 24, 2019 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/5bde6c08e20e327b32766681cbd70660 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/5bde6c08e20e327b32766681cbd70660 to your computer and use it in GitHub Desktop.
string documentPath = "sample.docx";
string outputPath = @"C:\output\converted.pdf";
//Instantiating the conversion handler
ConversionHandler conversionHandler = Common.getConversionHandler();
var saveOptions = new GroupDocs.Conversion.Converter.Option.PdfSaveOptions();
saveOptions.ConvertFileType = PdfSaveOptions.PdfFileType.Pdf;
var convertedDocumentPath = conversionHandler.Convert(documentPath , saveOptions);
convertedDocumentPath.Save(@"C:\output\converted.pdf");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment