Convert
Leave feedback
On this page
Converts source document. Saves the whole converted document.
public void Convert(Func<SaveContext, Stream> targetStreamProvider, ConvertOptions convertOptions,
CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| targetStreamProvider | Func`2 | The delegate that saves converted document to a stream. |
| convertOptions | ConvertOptions | The convert options specific to desired target file type. |
| cancellationToken | CancellationToken | The cancellation token. |
Learn more
- More about document conversion basic scenarios: How to convert document in 3 steps
- Conversion use cases, advanced settings and customizations: Convert document with advanced settings
- class SaveContext
- class ConvertOptions
- class Converter
- namespace GroupDocs.Conversion
- assembly GroupDocs.Conversion
Converts source document. Saves the whole converted document.
public void Convert(ConvertOptions convertOptions, Action<ConvertedContext> documentCompleted,
CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| convertOptions | ConvertOptions | The convert options specific to desired target file type. |
| documentCompleted | Action`1 | Delegate that receives the converted document stream. Signature: Action<ConvertedContext>. The ConvertedContext parameter contains the converted document stream and metadata. |
| cancellationToken | CancellationToken | The cancellation token. |
Learn more
- More about document conversion basic scenarios: How to convert document in 3 steps
- Conversion use cases, advanced settings and customizations: Convert document with advanced settings
- class ConvertOptions
- class ConvertedContext
- class Converter
- namespace GroupDocs.Conversion
- assembly GroupDocs.Conversion
Converts source document. Saves the whole converted document.
public void Convert(Func<SaveContext, Stream> targetStreamProvider,
Func<ConvertContext, ConvertOptions> convertOptionsProvider,
CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| targetStreamProvider | Func`2 | Delegate that provides the stream to save the converted document. Signature: Func<SaveContext, Stream>. The SaveContext parameter contains information about the save operation. |
| convertOptionsProvider | Func`2 | Delegate that provides conversion options. Signature: Func<ConvertContext, ConvertOptions>. The ConvertContext parameter contains information about the conversion operation. |
| cancellationToken | CancellationToken | The cancellation token. |
Learn more
- More about document conversion basic scenarios: How to convert document in 3 steps
- Conversion use cases, advanced settings and customizations: Convert document with advanced settings
- class SaveContext
- class ConvertContext
- class ConvertOptions
- class Converter
- namespace GroupDocs.Conversion
- assembly GroupDocs.Conversion
Converts source document. Saves the whole converted document.
public void Convert(Func<ConvertContext, ConvertOptions> convertOptionsProvider,
Action<ConvertedContext> documentCompleted, CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| convertOptionsProvider | Func`2 | Delegate that provides conversion options. Signature: Func<ConvertContext, ConvertOptions>. The ConvertContext parameter contains information about the conversion operation. |
| documentCompleted | Action`1 | Delegate that receives the converted document stream. Signature: Action<ConvertedContext>. The ConvertedContext parameter contains the converted document stream and metadata. |
| cancellationToken | CancellationToken | The cancellation token. |
Learn more
- More about document conversion basic scenarios: How to convert document in 3 steps
- Conversion use cases, advanced settings and customizations: Convert document with advanced settings
- class ConvertContext
- class ConvertOptions
- class ConvertedContext
- class Converter
- namespace GroupDocs.Conversion
- assembly GroupDocs.Conversion
Converts source document. Saves the whole converted document.
public void Convert(string filePath, ConvertOptions convertOptions,
CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| filePath | String | The file path to the source document. |
| convertOptions | ConvertOptions | The convert options specific to desired target file type. |
| cancellationToken | CancellationToken | The cancellation token. |
Learn more
- More about document conversion basic scenarios: How to convert document in 3 steps
- Conversion use cases, advanced settings and customizations: Convert document with advanced settings
- class ConvertOptions
- class Converter
- namespace GroupDocs.Conversion
- assembly GroupDocs.Conversion
Converts source document. Saves the converted document page by page.
public void Convert(Func<SavePageContext, Stream> targetStreamProvider,
Func<ConvertContext, ConvertOptions> convertOptionsProvider,
CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| targetStreamProvider | Func`2 | Delegate that provides a stream for saving each converted page. Signature: Func<SavePageContext, Stream>. The SavePageContext parameter contains page number and document information. |
| convertOptionsProvider | Func`2 | Delegate that provides conversion options. Signature: Func<ConvertContext, ConvertOptions>. The ConvertContext parameter contains information about the conversion operation. |
| cancellationToken | CancellationToken | The cancellation token. |
Learn more
- More about document conversion basic scenarios: How to convert document in 3 steps
- Conversion use cases, advanced settings and customizations: Convert document with advanced settings
- class SavePageContext
- class ConvertContext
- class ConvertOptions
- class Converter
- namespace GroupDocs.Conversion
- assembly GroupDocs.Conversion
Converts source document. Saves the converted document page by page.
public void Convert(Func<SavePageContext, Stream> targetStreamProvider,
ConvertOptions convertOptions, CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| targetStreamProvider | Func`2 | Delegate that provides a stream for saving each converted page. Signature: Func<SavePageContext, Stream>. The SavePageContext parameter contains page number and document information. |
| convertOptions | ConvertOptions | The convert options specific to desired target file type. |
| cancellationToken | CancellationToken | The cancellation token. |
Learn more
- More about document conversion basic scenarios: How to convert document in 3 steps
- Conversion use cases, advanced settings and customizations: Convert document with advanced settings
- class SavePageContext
- class ConvertOptions
- class Converter
- namespace GroupDocs.Conversion
- assembly GroupDocs.Conversion
Converts source document. Saves the converted document page by page.
public void Convert(ConvertOptions convertOptions, Action<ConvertedPageContext> documentCompleted,
CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| documentCompleted | ConvertOptions | Delegate that receives each converted page. Signature: Action<ConvertedPageContext>. The ConvertedPageContext parameter contains page number, stream, source file name, and target file type. |
| convertOptions | Action`1 | The convert options specific to desired target file type. |
| cancellationToken | CancellationToken | The cancellation token. |
Learn more
- More about document conversion basic scenarios: How to convert document in 3 steps
- Conversion use cases, advanced settings and customizations: Convert document with advanced settings
- class ConvertOptions
- class ConvertedPageContext
- class Converter
- namespace GroupDocs.Conversion
- assembly GroupDocs.Conversion
Converts source document. Saves the converted document page by page.
public void Convert(Func<ConvertContext, ConvertOptions> convertOptionsProvider,
Action<ConvertedPageContext> documentCompleted, CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| convertOptionsProvider | Func`2 | Delegate that provides conversion options. Signature: Func<ConvertContext, ConvertOptions>. The ConvertContext parameter contains information about the conversion operation. |
| documentCompleted | Action`1 | Delegate that receives each converted page. Signature: Action<ConvertedPageContext>. The ConvertedPageContext parameter contains page number, stream, source file name, and target file type. |
| cancellationToken | CancellationToken | The cancellation token. |
Learn more
- More about document conversion basic scenarios: How to convert document in 3 steps
- Conversion use cases, advanced settings and customizations: Convert document with advanced settings
- class ConvertContext
- class ConvertOptions
- class ConvertedPageContext
- class Converter
- namespace GroupDocs.Conversion
- assembly GroupDocs.Conversion
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.