Page.To Svg String Method
Converts this page to an SVG string. The string can for example be saved to a file, or inlined in HTML.
public string ToSvgString( SvgConversionOptions? options = null, CancellationToken cancellationToken = default )
- options SvgConversionOptions (Optional)
- Additional configuration options for the conversion.
- cancellationToken CancellationToken (Optional)
- Token for monitoring cancellation requests.
SVG fragment without XML declaration. The fragment can be saved to a file or included as inline SVG in HTML.
|PermissionException||Content extraction from this document is forbidden by the document author. Not thrown if the document is opened with the owner password.|
|PdfException||The conversion failed, possibly because of a malformed PDF.|
Note that if you parse the returned SVG fragment as XML, you need to preserve space and not add indentation. Text content will otherwise not render correctly.