ConverterAsync.ConvertHTMLAsync
ConverterAsync.ConvertHTMLAsync method
ConvertHTMLAsync(HtmlSource, SaveOptions, ICreateStreamProvider, CancellationToken)
Converts source to the streams output creates, one per part.
public static Task<ConversionResult> ConvertHTMLAsync(HtmlSource source, SaveOptions options, ICreateStreamProvider output, CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| source | HtmlSource | The HTML source. |
| options | SaveOptions | PDF or image options. |
| output | ICreateStreamProvider | The stream provider. |
| cancellationToken | CancellationToken | Cancels the conversion at its next checkpoint. |
Return Value
Task<ConversionResult>: The conversion result.
See Also
- class ConverterAsync
- namespace Aspose.Css
- assembly Aspose.CSS
ConvertHTMLAsync(HtmlSource, SaveOptions, Stream, CancellationToken)
Converts source to output, left open.
public static Task<ConversionResult> ConvertHTMLAsync(HtmlSource source, SaveOptions options, Stream output, CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| source | HtmlSource | The HTML source. |
| options | SaveOptions | PDF or image options. |
| output | Stream | A writable stream. |
| cancellationToken | CancellationToken | Cancels the conversion at its next checkpoint. |
Return Value
Task<ConversionResult>: The conversion result.
See Also
- class ConverterAsync
- namespace Aspose.Css
- assembly Aspose.CSS
ConvertHTMLAsync(HtmlSource, SaveOptions, string, CancellationToken)
Converts source to the file outputPath.
public static Task<ConversionResult> ConvertHTMLAsync(HtmlSource source, SaveOptions options, string outputPath, CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| source | HtmlSource | The HTML source. |
| options | SaveOptions | PDF or image options. |
| outputPath | string | The output file; replaced only when the conversion succeeds. |
| cancellationToken | CancellationToken | Cancels the conversion at its next checkpoint. |
Return Value
Task<ConversionResult>: The conversion result.
See Also
- class ConverterAsync
- namespace Aspose.Css
- assembly Aspose.CSS
ConvertHTMLAsync(string, SaveOptions, string, CancellationToken)
Converts the HTML file inputPath to the file outputPath.
public static Task<ConversionResult> ConvertHTMLAsync(string inputPath, SaveOptions options, string outputPath, CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| inputPath | string | The input file; its directory is an allowed file root. |
| options | SaveOptions | PDF or image options. |
| outputPath | string | The output file. |
| cancellationToken | CancellationToken | Cancels the conversion at its next checkpoint. |
Return Value
Task<ConversionResult>: The conversion result.
See Also
- class ConverterAsync
- namespace Aspose.Css
- assembly Aspose.CSS
ConvertHTMLAsync(Stream, string, SaveOptions, Stream, CancellationToken)
Converts the HTML bytes of input to output; both stay open.
public static Task<ConversionResult> ConvertHTMLAsync(Stream input, string baseUri, SaveOptions options, Stream output, CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| input | Stream | The input, read on the pool thread from its current position. |
| baseUri | string | An absolute http(s) or file URI, or about:blank. |
| options | SaveOptions | PDF or image options. |
| output | Stream | A writable stream. |
| cancellationToken | CancellationToken | Cancels the conversion at its next checkpoint. |
Return Value
Task<ConversionResult>: The conversion result.
See Also
- class ConverterAsync
- namespace Aspose.Css
- assembly Aspose.CSS
ConvertHTMLAsync(Stream, string, SaveOptions, string, CancellationToken)
Converts the HTML bytes of input to the file outputPath.
public static Task<ConversionResult> ConvertHTMLAsync(Stream input, string baseUri, SaveOptions options, string outputPath, CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| input | Stream | The input, read on the pool thread from its current position and left open. |
| baseUri | string | An absolute http(s) or file URI, or about:blank. |
| options | SaveOptions | PDF or image options. |
| outputPath | string | The output file. |
| cancellationToken | CancellationToken | Cancels the conversion at its next checkpoint. |
Return Value
Task<ConversionResult>: The conversion result.
See Also
- class ConverterAsync
- namespace Aspose.Css
- assembly Aspose.CSS
ConvertHTMLAsync(string, string, SaveOptions, Stream, CancellationToken)
Converts the markup html to output, left open.
public static Task<ConversionResult> ConvertHTMLAsync(string html, string baseUri, SaveOptions options, Stream output, CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| html | string | The markup. |
| baseUri | string | An absolute http(s) or file URI, or about:blank. |
| options | SaveOptions | PDF or image options. |
| output | Stream | A writable stream. |
| cancellationToken | CancellationToken | Cancels the conversion at its next checkpoint. |
Return Value
Task<ConversionResult>: The conversion result.
See Also
- class ConverterAsync
- namespace Aspose.Css
- assembly Aspose.CSS
ConvertHTMLAsync(string, string, SaveOptions, string, CancellationToken)
Converts the markup html to the file outputPath.
public static Task<ConversionResult> ConvertHTMLAsync(string html, string baseUri, SaveOptions options, string outputPath, CancellationToken cancellationToken = default)
| Parameter | Type | Description |
|---|---|---|
| html | string | The markup. |
| baseUri | string | An absolute http(s) or file URI, or about:blank. |
| options | SaveOptions | PDF or image options. |
| outputPath | string | The output file. |
| cancellationToken | CancellationToken | Cancels the conversion at its next checkpoint. |
Return Value
Task<ConversionResult>: The conversion result.
See Also
- class ConverterAsync
- namespace Aspose.Css
- assembly Aspose.CSS