Converts the specified HTML string to PDF using a base URL to resolve the external resources
and saves the rendered PDF document to the specified stream.
The urlBase parameter allows the converter to determine the full URLs from relative URLs for images
and CSS files appearing in the HTML string.
Because this method does not specify the full URL of the document referenced by the internal links,
the urlBase will be used by default.
To make sure the the external resources referenced by relative URLs and the internal links with anchors
are correctly resolved by the converter, the
SavePdfFromHtmlStringToStream(String, String, String, Stream) method with the
urlBase and internalLinksDocUrl additional parameters can be used.
Namespace: EvoPdfAssembly: evohtmltopdf (in evohtmltopdf.dll) Version: 4.12.0.0
Syntax
| C# |
|---|
public void SavePdfFromHtmlStringToStream(
string htmlString,
string urlBase,
Stream outPdfStream
) |
| Visual Basic |
|---|
Public Sub SavePdfFromHtmlStringToStream (
htmlString As String,
urlBase As String,
outPdfStream As Stream
) |
| Visual C++ |
|---|
public:
void SavePdfFromHtmlStringToStream(
String^ htmlString,
String^ urlBase,
Stream^ outPdfStream
) |
Parameters
- htmlString
- Type: System..::..String
The HTML string to be converted to PDF.
- urlBase
- Type: System..::..String
The urlBase parameter allows the converter to determine the full URLs from
relative URLs for images and CSS files appearing in the HTML string.
When a relative URL from the HTML string is prefixed by the urlBase, the correct full URL of the image
or of the CSS file should be produced.
- outPdfStream
- Type: System.IO..::..Stream
The output stream where to save the generated PDF document.
See Also