FitToViewPort

SvgSaveOptions.FitToViewPort property

指定输出 SVG 是否应填充可用视口区域(浏览器窗口或容器)。 当设置为真的输出 SVG 的宽度和高度设置为 100%.

默认值为错误的

public bool FitToViewPort { get; set; }

例子

演示如何在将 .docx 文档转换为 .svg 时模仿图像的属性。

Document doc = new Document(MyDir + "Document.docx");

// 配置 SvgSaveOptions 对象以保存无页面边框或可选文本。
SvgSaveOptions options = new SvgSaveOptions
{
    FitToViewPort = true,
    ShowPageBorder = false,
    TextOutputMode = SvgTextOutputMode.UsePlacedGlyphs
};

doc.Save(ArtifactsDir + "SvgSaveOptions.SaveLikeImage.svg", options);

也可以看看