Method CreatePdfAsync
- Namespace
- BitMiracle.Docotic.Pdf.HtmlToPdf
- Assembly
- BitMiracle.Docotic.Pdf.HtmlToPdf.dll
CreatePdfAsync(Uri, HtmlConversionOptions?)
Creates a new PdfDocument with the contents at the specified URL as an asynchronous operation.
public Task<PdfDocument> CreatePdfAsync(Uri url, HtmlConversionOptions? options = null)
Parameters
url
UriThe URL for the contents to create the document with.
options
HtmlConversionOptionsThe options for the conversion.
Returns
- Task<PdfDocument>
The Task<TResult> that represents the asynchronous operation, containing the PdfDocument of the operation.
Remarks
Check the Convert HTML to PDF in C# and VB.NET article for examples of using this method.
CreatePdfAsync(string, HtmlConversionOptions?)
Creates a new PdfDocument with the contents of the specified HTML file as an asynchronous operation.
public Task<PdfDocument> CreatePdfAsync(string fileName, HtmlConversionOptions? options = null)
Parameters
fileName
stringThe name of the HTML file to create the document with.
options
HtmlConversionOptionsThe options for the conversion.
Returns
- Task<PdfDocument>
The Task<TResult> that represents the asynchronous operation, containing the PdfDocument of the operation.
Remarks
Check the Convert HTML to PDF in C# and VB.NET article for examples of using this method.
CreatePdfAsync(Stream, HtmlConversionOptions?)
Creates a new PdfDocument with the contents of the specified HTML stream as an asynchronous operation.
public Task<PdfDocument> CreatePdfAsync(Stream stream, HtmlConversionOptions? options = null)
Parameters
stream
StreamThe HTML stream to create the document with.
options
HtmlConversionOptionsThe options for the conversion.
Returns
- Task<PdfDocument>
The Task<TResult> that represents the asynchronous operation, containing the PdfDocument of the operation.
Remarks
Check the Convert HTML to PDF in C# and VB.NET article for examples of using this method.