SvgConversionOptions.IncludeLinks Property

Determines whether web links from the PDF document will be included in the generated SVG. The default value is true.

public bool IncludeLinks { get; set; }
Namespace
PdfToSvg
Package
PdfToSvg.NET (since v0.2.0)

Property Value

Boolean

Remarks

Note that this property only affects links to websites. Other types of links, including links within the document, are currently not supported.

Example

The following example will exclude links from the generated SVG. This might be good if you don't want the SVG to lead the user away from the document.

Exclude links in generated SVG
var conversionOptions = new SvgConversionOptions
{
    IncludeLinks = false,
};

using (var doc = PdfDocument.Open("input.pdf"))
{
    var pageNo = 1;

    foreach (var page in doc.Pages)
    {
        page.SaveAsSvg($"output-{pageNo++}.svg", conversionOptions);
    }
}

See Also

SvgConversionOptions Class
PdfToSvg Namespace