/// <summary> /// PowerPoint PPTX to PDF /// </summary> /// Convert Office PowerPoint Documents (pptx) to standard PDF /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='inputFile'> /// Input file to perform the operation on. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <System.IO.Stream> PptxToPdfAsync(this IConvertDocument operations, System.IO.Stream inputFile, CancellationToken cancellationToken = default(CancellationToken)) { var _result = await operations.PptxToPdfWithHttpMessagesAsync(inputFile, null, cancellationToken).ConfigureAwait(false); _result.Request.Dispose(); return(_result.Body); }
/// <summary> /// PowerPoint PPTX to PDF /// </summary> /// Convert Office PowerPoint Documents (pptx) to standard PDF /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='inputFile'> /// Input file to perform the operation on. /// </param> public static System.IO.Stream PptxToPdf(this IConvertDocument operations, System.IO.Stream inputFile) { return(Task.Factory.StartNew(s => ((IConvertDocument)s).PptxToPdfAsync(inputFile), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }