PdfConverterSavePdfFromHtmlStringToStreamAsync Method |
Converts the specified HTML string into a PDF document asynchronously and saves it to the specified stream.
Namespace: ExpertPdf.HtmlToPdfAssembly: ephtmltopdf (in ephtmltopdf.dll) Version: 22.0.0
Syntaxpublic Task SavePdfFromHtmlStringToStreamAsync(
string htmlString,
string urlBase,
Stream outPdfStream,
CancellationToken cancellationToken = default
)
Public Function SavePdfFromHtmlStringToStreamAsync (
htmlString As String,
urlBase As String,
outPdfStream As Stream,
Optional cancellationToken As CancellationToken = Nothing
) As Task
Parameters
- htmlString String
- The HTML string to be converted to PDF.
- urlBase String
- The full URL of the page from where this string was taken, used to resolve the images and CSS
files referenced by a relative URL in the HTML string.
- outPdfStream Stream
- The stream the PDF document is written to.
- cancellationToken CancellationToken (Optional)
- A token that cancels the wait for the conversion.
Return Value
TaskA task that completes when the PDF document is written.
Remarks
See Also