添加链接
注册
登录
link管理
链接快照平台
输入网页链接,自动生成快照
标签化管理网页链接
相关文章推荐
非常酷的豆腐
·
可可幂精选精彩视频资源:超肥美无毛,一见倾心 ...
·
2 月前
·
苦恼的羊肉串
·
改进面板:增加透明化、改变背景色以及继承于 ...
·
10 月前
·
爱笑的回锅肉
·
typeScript ...
·
11 月前
·
非常酷的双杠
·
指针*pbuffer和getchar ...
·
1 年前
·
率性的橙子
·
从精神病院走出的强者 叶冰 - 抖音
·
1 年前
·
link管理
›
保存 SVG 文档 - C#
svg格式
矢量图
aspose
svg
https://docs.aspose.com/svg/zh/net/save-svg-document/
儒雅的菠萝
2 月前
</noscript><div class="header"><div><a rel="nofollow" href="https://www.aspose.com" alt="Aspose Pty Ltd Logo" aria-label="Aspose Pty Ltd Logo" class="logo"/><div class="bar"><ul class="menu"><li class="products desktop-only"><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com">Products</a><ul class="submenu grid-4"><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/total/"><span class="title">Aspose.Total</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/words/"><span class="title">Aspose.Words</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/pdf/"><span class="title">Aspose.PDF</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/cells/"><span class="title">Aspose.Cells</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/email/"><span class="title">Aspose.Email</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/slides/"><span class="title">Aspose.Slides</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/imaging/"><span class="title">Aspose.Imaging</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/barcode/"><span class="title">Aspose.BarCode</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/diagram/"><span class="title">Aspose.Diagram</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/tasks/"><span class="title">Aspose.Tasks</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/ocr/"><span class="title">Aspose.OCR</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/note/"><span class="title">Aspose.Note</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/cad/"><span class="title">Aspose.CAD</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/3d/"><span class="title">Aspose.3D</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/html/"><span class="title">Aspose.HTML</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/gis/"><span class="title">Aspose.GIS</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/zip/"><span class="title">Aspose.ZIP</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/page/"><span class="title">Aspose.Page</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/psd/"><span class="title">Aspose.PSD</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/omr/"><span class="title">Aspose.OMR</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/pub/"><span class="title">Aspose.PUB</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/svg/"><span class="title">Aspose.SVG</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/finance/"><span class="title">Aspose.Finance</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/drawing/"><span class="title">Aspose.Drawing</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/font/"><span class="title">Aspose.Font</span><span class="description">Product Solution</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://products.aspose.com/tex/"><span class="title">Aspose.TeX</span><span class="description">Product Solution</span></a></li></ul></li><li class="desktop-only"><a class="menu-item" rel="noopener nofollow" href="#">Purchase</a><ul class="submenu"><li><a class="menu-item" rel="noopener nofollow" href="https://purchase.aspose.com/buy"><span class="title">Buy Now</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://purchase.aspose.com/pricing"><span class="title">Pricing Information</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://releases.aspose.com/"><span class="title">Free Trials</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://purchase.aspose.com/temporary-license/"><span class="title">Temporary License</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://purchase.aspose.com/policies/"><span class="title">Policies</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://purchase.aspose.com/orders"><span class="title">My Orders & Quotes</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://purchase.aspose.com/renew"><span class="title">Renew an Order</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://purchase.aspose.com/upgrade"><span class="title">Upgrade an Order</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://helpdesk.aspose.com/"><span class="title">Paid Support</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://consulting.aspose.com/"><span class="title">Paid Consulting</span></a></li></ul></li><li class="desktop-only"><a class="menu-item" rel="noopener nofollow" href="#">Support</a><ul class="submenu"><li><a class="menu-item" rel="noopener nofollow" href="https://docs.aspose.com/"><span class="title">Docs</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://reference.aspose.com/"><span class="title">API Reference</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://demos.aspose.com/"><span class="title">Live Demos</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://aspose.github.io/"><span class="title">Code Samples</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://forum.aspose.com/"><span class="title">Free Support</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://blog.aspose.com/"><span class="title">Blog</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://kb.aspose.com/"><span class="title">Knowledge Base</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://releases.aspose.com/"><span class="title">New Releases</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://status.aspose.com/"><span class="title">Status</span></a></li></ul></li><li class="desktop-only"><a class="menu-item" rel="noopener nofollow" href="https://websites.aspose.com/">Websites</a><ul class="submenu grid-4"><li><a class="menu-item" rel="noopener nofollow" href="https://websites.aspose.com/aspose/com/"><span class="title">aspose.com</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://websites.aspose.com/aspose/cloud/"><span class="title">aspose.cloud</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://websites.aspose.com/aspose/app/"><span class="title">aspose.app</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://websites.aspose.com/aspose/ai/"><span class="title">aspose.ai</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://websites.aspose.com/groupdocs/com/"><span class="title">groupdocs.com</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://websites.aspose.com/groupdocs/cloud/"><span class="title">groupdocs.cloud</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://websites.aspose.com/groupdocs/app/"><span class="title">groupdocs.app</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://websites.aspose.com/groupdocs/ai/"><span class="title">groupdocs.ai</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://websites.aspose.com/conholdate/com/"><span class="title">conholdate.com</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://websites.aspose.com/conholdate/cloud/"><span class="title">conholdate.cloud</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://websites.aspose.com/conholdate/app/"><span class="title">conholdate.app</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://websites.aspose.com/conholdate/ai/"><span class="title">conholdate.ai</span></a></li></ul></li><li class="desktop-only"><a class="menu-item" rel="noopener nofollow" href="https://about.aspose.com">About</a><ul class="submenu"><li><a class="menu-item" rel="noopener nofollow" href="https://about.aspose.com"><span class="title">About Us</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://about.aspose.com/contact/"><span class="title">Contact</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://about.aspose.com/customers/"><span class="title">Customers</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://about.aspose.com/legal/"><span class="title">Legal</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://about.aspose.com/affiliates/"><span class="title">Affiliates</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://about.aspose.com/events/"><span class="title">Events</span></a></li><li><a class="menu-item" rel="noopener nofollow" href="https://about.aspose.com/acquisition/"><span class="title">Acquisition</span></a></li></ul></li><li class="language"><span class="menu-item"><svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentcolor"><path d="M12 4c4.4183.0 8 3.58172 8 8 0 4.4183-3.5817 8-8 8-4.41828.0-8-3.5817-8-8 0-4.41828 3.58172-8 8-8zm-.381 11.428L8.57155 15.4289C8.9774 16.7012 9.60471 17.924 10.4358 19.0678 10.8198 19.1532 11.2151 19.2073 11.6191 19.2282L11.619 15.428zM15.4284 15.4289 12.38 15.428 12.3809 19.2282C12.7849 19.2073 13.1802 19.1532 13.5641 19.0687 14.3953 17.924 15.0226 16.7012 15.4284 15.4289zM18.3762 15.4285 16.0984 15.4284C15.7811 16.5746 15.31 17.6754 14.703 18.7169c1.5738-.634 2.8744-1.806 3.6732-3.2884zM7.90159 15.4284 5.62381 15.4285c.79877 1.4824 2.09943 2.6544 3.67446 3.2885-.60825-1.0416-1.07936-2.1424-1.39668-3.2886zM7.4355 12.3803 4.77175 12.3809C4.81342 13.1846 4.98617 13.9535 5.26904 14.6669L7.71488 14.6666c-.15933-.7461-.25402-1.5094-.27938-2.2863zM15.9653 12.3808 12.38 12.38v2.286L15.6434 14.6671c.1843-.7493.2928-1.5134.321899999999999-2.2863zM19.2282 12.3809 16.5645 12.3803C16.5391 13.1572 16.4444 13.9205 16.2851 14.6666L18.731 14.6669C19.0138 13.9535 19.1866 13.1846 19.2282 12.3809zM11.619 12.38 8.03469 12.3808C8.06384 13.1537 8.17229 13.9178 8.35656 14.6671L11.619 14.666V12.38zM7.78068 8.95226 5.43294 8.95224C5.05284 9.76985 4.82095 10.6703 4.77175 11.6191L7.4329 11.6194C7.45634 10.71 7.57476 9.81899 7.78068 8.95226zM15.5678 8.95239 12.38 8.952v2.667h3.588L15.9673 11.5875C15.9382 10.6945 15.8033 9.81313 15.5678 8.95239zM18.5671 8.95224 16.2193 8.95226C16.4252 9.81899 16.5437 10.71 16.5671 11.6194L19.2282 11.6191C19.1791 10.6703 18.9472 9.76985 18.5671 8.95224zM11.619 8.952 8.43217 8.95239C8.16446 9.93108 8.02667 10.9364 8.02667 11.9553L8.031 11.619h3.588V8.952zM9.22964 5.31048 9.02453 5.39982c-1.31708.59469-2.4243 1.57203-3.17995 2.79029L7.98594 8.19044C8.28727 7.19147 8.70587 6.2283 9.22964 5.31048zm3.15126-.53873L12.38 8.19 15.3312 8.18991c-.3925-1.12859-.9602-2.21592-1.6906-3.24091C13.2322 4.85405 12.8116 4.79408 12.3809 4.77175zm2.3884.53883L14.9321 5.60148C15.3809 6.43124 15.7444 7.2965 16.0141 8.19044L18.1554 8.19011C17.3607 6.9088 16.177 5.89399 14.7693 5.31058zm-4.1992-.40747L10.3594 4.949C9.629 5.97399 9.06128 7.06132 8.66884 8.18991L11.619 8.19 11.6191 4.77175C11.262 4.79027 10.9117 4.83467 10.5701 4.90311z"/></svg><span>简体中文</span></span><ul class="submenu grid-3"><li><a href="https://docs.aspose.com/svg/net/save-svg-document/" class="menu-item"><span class="title">English</span></a></li><li><a href="https://docs.aspose.com/svg/fr/net/save-svg-document/" class="menu-item"><span class="title">Français</span></a></li><li><a href="https://docs.aspose.com/svg/es/net/save-svg-document/" class="menu-item"><span class="title">Español</span></a></li><li><a href="https://docs.aspose.com/svg/de/net/save-svg-document/" class="menu-item"><span class="title">Deutsch</span></a></li><li><a href="https://docs.aspose.com/svg/ru/net/save-svg-document/" class="menu-item"><span class="title">Русский</span></a></li></ul></li></ul></div></div></div><div class="main_block"><div class="leftbar"><div class="collapse_leftbar_btn"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 320 512"><path d="M310.6 233.4c12.5 12.5 12.5 32.8.0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3.0s-12.5-32.8.0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8.0-45.3s32.8-12.5 45.3.0l192 192z"/></svg></div><nav><div class="td-sidebar__search d-flex align-items-center"><input type="text" id="internalSearch" class="search_input" placeholder="Search " aria-label="" autocomplete="off" data-index="docs.aspose.com"/> <button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fa fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-docs-nav" aria-expanded="false" aria-label="Toggle section navigation"/></div><ul><li class="active open"><a href="/svg/zh/net/">Aspose.SVG for .NET</a></li><li class="no-indent"><ul><li><a href="/svg/zh/net/what-is-an-svg-document/">什么是 SVG 文件?</a></li><li class="closeli"><a href="/svg/zh/net/getting-started/">入门</a></li><li><a href="/svg/zh/net/drawing-skia-sharp/">Aspose.SVG.Drawing.SkiaSharp</a></li><li class="closeli"><a href="/svg/zh/net/drawing-basics/">SVG 绘图基础知识</a></li><li class="active open"><a href="/svg/zh/net/how-to-work-with-aspose-svg-api/">如何使用 Aspose.SVG API</a></li><li class="no-indent"><ul><li><a href="/svg/zh/net/create-svg-document/">创建和加载 SVG 文档</a></li><li class="closeli"><a href="/svg/zh/net/svg-builder/">SVG生成器</a></li><li class="active"><a href="/svg/zh/net/save-svg-document/">保存 SVG 文档</a></li><li class="no-indent"><ul/></li><li><a href="/svg/zh/net/edit-svg-file/">编辑 SVG 文件</a></li><li><a href="/svg/zh/net/environment-configuration/">环境配置</a></li><li><a href="/svg/zh/net/navigation-inspection/">导航和检测 SVG</a></li><li class="closeli"><a href="/svg/zh/net/convert-svg/">如何转换 SVG 文件</a></li><li><a href="/svg/zh/net/how-to-change-svg-color/">如何更改 SVG 颜色</a></li><li><a href="/svg/zh/net/change-svg-background-color/">更改 SVG 背景颜色</a></li><li><a href="/svg/zh/net/convert-color-codes/">转换颜色代码</a></li><li><a href="/svg/zh/net/how-to-merge-svg-files/">如何合并 SVG 文件</a></li><li><a href="/svg/zh/net/how-to-optimize-svg/">如何优化 SVG 文档</a></li><li class="closeli"><a href="/svg/zh/net/vectorization/">矢量化 – 基本概述</a></li><li class="closeli"><a href="/svg/zh/net/svg-filters/">SVG 滤镜</a></li><li><a href="/svg/zh/net/svg-gradients/">SVG 渐变</a></li><li class="closeli"><a href="/svg/zh/net/svg-transformations/">SVG 转换</a></li><li><a href="/svg/zh/net/how-to-create-nft/">如何创建NFT?</a></li></ul></li><li class="closeli"><a href="/svg/zh/net/migration-between-versions/">版本之间的迁移</a></li><li><a href="/svg/zh/net/how-to-run-the-tests/">如何运行示例</a></li><li><a href="/svg/zh/net/faq/">常问问题</a></li></ul></li></ul></nav></div><div class="docs_information"><div class="breadcrumb_block"><ul><li><a href="/" aria-label="Go to home page"><i class="fa fa-house"/></a></li><li><a href="/svg/zh/">Aspose.SVG</a></li><li><a href="/svg/zh/net/">.NET</a></li><li><a href="/svg/zh/net/how-to-work-with-aspose-svg-api/">如何使用 Aspose.SVG API</a></li><li><a href="/svg/zh/net/save-svg-document/">保存 SVG 文档</a></li></ul></div><div class="submenu-container"><div class="content-container"><div class="menu-row"><div class="col-md-2 title"><span class="spanclass"/></div><div class="links-col col-md-5"><div class="submenu-links"><ul class="menu-links"><li><a class="zap-btn-apps" href="https://products.aspose.app/svg/applications">Live Demos</a></li><li><a class="zap-btn-landings" href="https://products.aspose.com/svg/net/">SVG .NET Solution</a></li><li><a class="zap-btn-code" href="https://www.nuget.org/packages/Aspose.svg">NuGet</a></li><li><a class="zap-btn-api" href="https://reference.aspose.com/svg/net/">API Reference</a></li></ul></div><div class="dropdown-links-col"><div class="dropdown-wrapper"><div class="dropdown-wrapper"><div class="dropdown-menu-button" tabindex="0">Helpful resources ▼</div></div><ul class="dropdown-menu-links"><li><a class="zap-btn-apps" href="https://products.aspose.app/svg/applications">Live Demos</a></li><li><a class="zap-btn-landings" href="https://products.aspose.com/svg/net/">SVG .NET Solution</a></li><li><a class="zap-btn-code" href="https://www.nuget.org/packages/Aspose.svg">NuGet</a></li><li><a class="zap-btn-api" href="https://reference.aspose.com/svg/net/">API Reference</a></li></ul></div></div></div><div class="actions-col col-md-5 col-sm-12"><div class="action-buttons"><a class="btn btn-primary zap-btn-download" href="https://releases.aspose.com/svg/net/"><em class="fa fa-download"> </em> Download</a> Pricing</a> Buy</a></div></div></div></div></div><h1>保存 SVG 文档 - C#</h1><div data-nosnippet="" id="toc-right-side-bar" class="anchors_block"><div class="anchors_block_top"><div>Contents</div>[ ]</div><div class="section_nav_list" id="collapseToC"><nav id="TableOfContents"><ul><li><a href="/svg/zh/net/save-svg-document/#保存-svg-文档">保存 SVG 文档</a><ul><li><a href="/svg/zh/net/save-svg-document/#将-svg-保存到文件">将 SVG 保存到文件</a></li><li><a href="/svg/zh/net/save-svg-document/#将-svg-保存到-url">将 SVG 保存到 URL</a></li><li><a href="/svg/zh/net/save-svg-document/#将-svg-保存到本地文件系统存储">将 SVG 保存到本地文件系统存储</a></li><li><a href="/svg/zh/net/save-svg-document/#将-svg-保存到-zip-存档">将 SVG 保存到 Zip 存档</a></li><li><a href="/svg/zh/net/save-svg-document/#将-svg-保存到内存流">将 SVG 保存到内存流</a></li></ul></li></ul></nav></div></div><h2 id="保存-svg-文档">保存 SVG 文档</h2><p>您需要执行的大多数任务都需要保存文档。加载现有文件或从头开始创建 SVG 文档后,您可以使用 <a href="https://reference.aspose.com/svg/net/aspose.svg/svgdocument/save/" target="_blank" rel="nofollow">SVGDocument.Save()</a> 方法之一保存更改。有一些重载方法允许将 SVG 保存到文件、流、Zip 存档或 URL。</p><div class="alert_block_primary"><p>在本文中,我们将回顾保存为相同格式的 SVG 文档。您将了解如何使用 <a href="https://reference.aspose.com/svg/net/aspose.svg/svgdocument/" target="_blank" rel="nofollow">SVGDocument</a> 类的 Save() 方法保存 SVG 文件。此外,Aspose.SVG for .NET 提供了 <a href="https://reference.aspose.com/svg/net/aspose.svg.saving.resourcehandlers/resourcehandler/" target="_blank" rel="nofollow">ResourceHandler</a> 类,允许将带有资源的 SVG 文档保存到流中并进行管理。</p><p>将 SVG 转换和渲染为其他格式的场景可在 <a href="/svg/zh/net/convert-svg/"><strong>如何转换 SVG 文件</strong></a> 部分中查看。</p></div><h3 id="将-svg-保存到文件">将 SVG 保存到文件</h3><p>以下代码片段演示了如何使用 <a href="https://reference.aspose.com/svg/net/aspose.svg/svgdocument/save/" target="_blank" rel="nofollow">SVGDocument.Save()</a> 方法将 SVG 文档保存到文件中:</p><div class="code_snipet_position"><button class="copy_code">Copy</button><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 1</span><span>using System<span style="color:#666">.</span><span style="color:#b44">IO</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 2</span><span>using Aspose<span style="color:#666">.</span><span style="color:#b44">Svg</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 3</span><span><span style="color:#666">...</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 5</span><span> <span style="color:#080;font-style:italic">// Prepare a path for an SVG document saving </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 6</span><span><span style="color:#080;font-style:italic"/> string documentPath <span style="color:#666">=</span> Path<span style="color:#666">.</span><span style="color:#b44">Combine</span><span style="color:#666">(</span>OutputDir<span style="color:#666">,</span> <span style="color:#b44">"lineto_out.svg"</span><span style="color:#666">);</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 8</span><span> <span style="color:#080;font-style:italic">// Load the SVG document from a file </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 9</span><span><span style="color:#080;font-style:italic"/> using <span style="color:#666">(</span>var document <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">new</span> SVGDocument<span style="color:#666">(</span>Path<span style="color:#666">.</span><span style="color:#b44">Combine</span><span style="color:#666">(</span>DataDir<span style="color:#666">,</span> <span style="color:#b44">"lineto.svg"</span><span style="color:#666">)))</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">10</span><span> <span style="color:#666">{</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">11</span><span> <span style="color:#080;font-style:italic">// Work with the document </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">13</span><span> <span style="color:#080;font-style:italic">// Save SVG to the file </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">14</span><span><span style="color:#080;font-style:italic"/> document<span style="color:#666">.</span><span style="color:#b44">Save</span><span style="color:#666">(</span>documentPath<span style="color:#666">);</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">15</span><span> <span style="color:#666">}</span></span></span></code></pre></div></div><h3 id="将-svg-保存到-url">将 SVG 保存到 URL</h3><p>需要为文档 <a href="/svg/files/lineto.svg">lineto.svg</a> 保存指定完整的 Url 路径,并将 <code>url</code> 对象传递给 <strong>Save()</strong> 方法,该方法将文档保存到 Url 指定的文件中。以下代码示例演示如何将文档保存到 Url:</p><div class="code_snipet_position"><button class="copy_code">Copy</button><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 1</span><span>using System<span style="color:#666">.</span><span style="color:#b44">IO</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 2</span><span>using Aspose<span style="color:#666">.</span><span style="color:#b44">Svg</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 3</span><span><span style="color:#666">...</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 5</span><span> <span style="color:#080;font-style:italic">// Set a full path for an SVG document saving </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 6</span><span><span style="color:#080;font-style:italic"/> var url <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">new</span> Url<span style="color:#666">(</span>Path<span style="color:#666">.</span><span style="color:#b44">Combine</span><span style="color:#666">(</span>OutputDir<span style="color:#666">,</span> <span style="color:#b44">"lineto_out.svg"</span><span style="color:#666">),</span> Directory<span style="color:#666">.</span><span style="color:#b44">GetCurrentDirectory</span><span style="color:#666">());</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 8</span><span> <span style="color:#080;font-style:italic">// Load the SVG document from a file </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 9</span><span><span style="color:#080;font-style:italic"/> using <span style="color:#666">(</span>var document <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">new</span> SVGDocument<span style="color:#666">(</span>Path<span style="color:#666">.</span><span style="color:#b44">Combine</span><span style="color:#666">(</span>DataDir<span style="color:#666">,</span> <span style="color:#b44">"lineto.svg"</span><span style="color:#666">)))</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">10</span><span> <span style="color:#666">{</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">11</span><span> <span style="color:#080;font-style:italic">// Work with the document </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">13</span><span> <span style="color:#080;font-style:italic">// Save SVG to Url </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">14</span><span><span style="color:#080;font-style:italic"/> document<span style="color:#666">.</span><span style="color:#b44">Save</span><span style="color:#666">(</span>url<span style="color:#666">);</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">15</span><span> <span style="color:#666">}</span></span></span></code></pre></div></div><h3 id="将-svg-保存到本地文件系统存储">将 SVG 保存到本地文件系统存储</h3><p>SVG 文档可以包含不同的资源,例如 CSS、外部图像和文件。 Aspose.SVG 提供了一种将 SVG 与所有链接文件一起保存的方法 - <a href="https://reference.aspose.com/svg/net/aspose.svg.saving.resourcehandlers/resourcehandler/" target="_blank" rel="nofollow">ResourceHandler</a> 类是为了将 SVG 内容和资源保存到流而开发的。此类负责处理资源并提供允许您控制对每个资源执行的操作的方法。</p><p>让我们考虑一个将 SVG 资源保存到用户指定的本地文件存储的示例。源 <a href="/svg/files/with-resources.svg">with-resources.svg</a> 文档及其链接图像文件位于同一目录中。 <a href="https://reference.aspose.com/svg/net/aspose.svg.saving.resourcehandlers/filesystemresourcehandler/filesystemresourcehandler/" target="_blank" rel="nofollow">FileSystemResourceHandler(<code>customOutDir</code>)</a> 构造函数采用指示保存资源文档的路径,并创建一个 <code>FileSystemResourceHandler</code> 对象。 <a href="https://reference.aspose.com/svg/net/aspose.svg/svgdocument/save/#save_3" target="_blank" rel="nofollow">Save(<code>resourceHandler</code>)</a> 方法获取此对象并将 SVG 保存到输出存储。</p><div class="code_snipet_position"><button class="copy_code">Copy</button><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 1</span><span>using System<span style="color:#666">.</span><span style="color:#b44">IO</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 2</span><span>using Aspose<span style="color:#666">.</span><span style="color:#b44">Svg</span><span style="color:#666">.</span><span style="color:#b44">IO</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 3</span><span><span style="color:#666">...</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 5</span><span> <span style="color:#080;font-style:italic">// Prepare a path to a source SVG file </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 6</span><span><span style="color:#080;font-style:italic"/> string inputPath <span style="color:#666">=</span> Path<span style="color:#666">.</span><span style="color:#b44">Combine</span><span style="color:#666">(</span>DataDir<span style="color:#666">,</span> <span style="color:#b44">"with-resources.svg"</span><span style="color:#666">);</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 8</span><span> <span style="color:#080;font-style:italic">// Prepare a full path to an output directory </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 9</span><span><span style="color:#080;font-style:italic"/> string customOutDir <span style="color:#666">=</span> Path<span style="color:#666">.</span><span style="color:#b44">Combine</span><span style="color:#666">(</span>Directory<span style="color:#666">.</span><span style="color:#b44">GetCurrentDirectory</span><span style="color:#666">(),</span> <span style="color:#b44">"./../../../../tests-out/save/"</span><span style="color:#666">);</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">11</span><span> <span style="color:#080;font-style:italic">// Load the SVG document from a file </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">12</span><span><span style="color:#080;font-style:italic"/> using <span style="color:#666">(</span>var doc <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">new</span> SVGDocument<span style="color:#666">(</span>inputPath<span style="color:#666">))</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">13</span><span> <span style="color:#666">{</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">14</span><span> <span style="color:#080;font-style:italic">// Save SVG with resources </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">15</span><span><span style="color:#080;font-style:italic"/> doc<span style="color:#666">.</span><span style="color:#b44">Save</span><span style="color:#666">(</span><span style="color:#a2f;font-weight:700">new</span> FileSystemResourceHandler<span style="color:#666">(</span>customOutDir<span style="color:#666">));</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">16</span><span> <span style="color:#666">}</span></span></span></code></pre></div></div><h3 id="将-svg-保存到-zip-存档">将 SVG 保存到 Zip 存档</h3><p>您可以通过创建 <strong>ZipResourceHandler</strong> 类来实现 <a href="https://reference.aspose.com/svg/net/aspose.svg.saving.resourcehandlers/resourcehandler/" target="_blank" rel="nofollow">ResourceHandler</a>。 <code>ZipResourceHandler</code> 类中的 <a href="https://reference.aspose.com/svg/net/aspose.svg.saving.resourcehandlers/resourcehandler/handleresource/" target="_blank" rel="nofollow">HandleResource()</a> 方法用于自定义如何处理单个资源并将其存储在 Zip 存档中的行为。它允许您创建包含 SVG 文档和相关资源的结构化压缩存档,使其适合存档和存储优化等场景。</p><p>在以下示例中,<code>ZipResourceHandler</code>类用于将 <a href="/svg/files/with-resources.svg">with-resources.svg</a> 文档及其链接资源保存到 Zip 存档:</p><div class="code_snipet_position"><button class="copy_code">Copy</button><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 1</span><span>using System<span style="color:#666">.</span><span style="color:#b44">IO</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 2</span><span>using Aspose<span style="color:#666">.</span><span style="color:#b44">Svg</span><span style="color:#666">.</span><span style="color:#b44">IO</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 3</span><span>using System<span style="color:#666">.</span><span style="color:#b44">IO</span><span style="color:#666">.</span><span style="color:#b44">Compression</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 4</span><span><span style="color:#666">...</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 6</span><span> <span style="color:#080;font-style:italic">// Prepare a path to a source SVG file </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 7</span><span><span style="color:#080;font-style:italic"/> string inputPath <span style="color:#666">=</span> Path<span style="color:#666">.</span><span style="color:#b44">Combine</span><span style="color:#666">(</span>DataDir<span style="color:#666">,</span> <span style="color:#b44">"with-resources.svg"</span><span style="color:#666">);</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 9</span><span> var dir <span style="color:#666">=</span> Directory<span style="color:#666">.</span><span style="color:#b44">GetCurrentDirectory</span><span style="color:#666">();</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">11</span><span> <span style="color:#080;font-style:italic">// Prepare a full path to an output Zip storage </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">12</span><span><span style="color:#080;font-style:italic"/> string customArchivePath <span style="color:#666">=</span> Path<span style="color:#666">.</span><span style="color:#b44">Combine</span><span style="color:#666">(</span>dir<span style="color:#666">,</span> <span style="color:#b44">"./../../../../tests-out/save/archive.zip"</span><span style="color:#666">);</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">14</span><span> <span style="color:#080;font-style:italic">// Load an SVG document </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">15</span><span><span style="color:#080;font-style:italic"/> using <span style="color:#666">(</span>var doc <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">new</span> SVGDocument<span style="color:#666">(</span>inputPath<span style="color:#666">))</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">16</span><span> <span style="color:#666">{</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">17</span><span> <span style="color:#080;font-style:italic">// Initialize an instance of the ZipResourceHandler class </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">18</span><span><span style="color:#080;font-style:italic"/> using <span style="color:#666">(</span>var resourceHandler <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">new</span> ZipResourceHandler<span style="color:#666">(</span>customArchivePath<span style="color:#666">))</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">19</span><span> <span style="color:#666">{</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">20</span><span> <span style="color:#080;font-style:italic">// Save SVG with resources to a Zip archive </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">21</span><span><span style="color:#080;font-style:italic"/> doc<span style="color:#666">.</span><span style="color:#b44">Save</span><span style="color:#666">(</span>resourceHandler<span style="color:#666">);</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">22</span><span> <span style="color:#666">}</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">23</span><span> <span style="color:#666">}</span></span></span></code></pre></div></div><p><code>ResourceHandler</code> 类旨在供客户实现。 <code>ZipResourceHandler</code> 类扩展了 <code>ResourceHandler</code> 基类,并提供了一种便捷的方法来管理在 Aspose.SVG for .NET 库的上下文中处理和存储与 SVG 文档链接的资源到 Zip 存档的整个过程:</p><div class="code_snipet_position"><button class="copy_code">Copy</button><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 1</span><span> internal <span style="color:#a2f;font-weight:700">class</span> <span style="color:#00f">ZipResourceHandler</span> <span style="color:#666">:</span> ResourceHandler<span style="color:#666">,</span> IDisposable </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 3</span><span> <span style="color:#a2f;font-weight:700">private</span> FileStream zipStream<span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 4</span><span> <span style="color:#a2f;font-weight:700">private</span> ZipArchive archive<span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 5</span><span> <span style="color:#a2f;font-weight:700">private</span> <span style="color:#0b0;font-weight:700">int</span> streamsCounter<span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 6</span><span> <span style="color:#a2f;font-weight:700">private</span> bool initialized<span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 8</span><span> <span style="color:#a2f;font-weight:700">public</span> <span style="color:#00a000">ZipResourceHandler</span><span style="color:#666">(</span>string name<span style="color:#666">)</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">10</span><span> DisposeArchive<span style="color:#666">();</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">11</span><span> zipStream <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">new</span> FileStream<span style="color:#666">(</span>name<span style="color:#666">,</span> FileMode<span style="color:#666">.</span><span style="color:#b44">Create</span><span style="color:#666">);</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">12</span><span> archive <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">new</span> ZipArchive<span style="color:#666">(</span>zipStream<span style="color:#666">,</span> ZipArchiveMode<span style="color:#666">.</span><span style="color:#b44">Update</span><span style="color:#666">);</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">13</span><span> initialized <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">false</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">14</span><span> <span style="color:#666">}</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">16</span><span> <span style="color:#a2f;font-weight:700">public</span> override <span style="color:#0b0;font-weight:700">void</span> <span style="color:#00a000">HandleResource</span><span style="color:#666">(</span>Resource resource<span style="color:#666">,</span> ResourceHandlingContext context<span style="color:#666">)</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">17</span><span> <span style="color:#666">{</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">18</span><span> var zipUri <span style="color:#666">=</span> <span style="color:#666">(</span>streamsCounter<span style="color:#666">++</span> <span style="color:#666">==</span> <span style="color:#666">0</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">19</span><span> <span style="color:#666">?</span> Path<span style="color:#666">.</span><span style="color:#b44">GetFileName</span><span style="color:#666">(</span>resource<span style="color:#666">.</span><span style="color:#b44">OriginalUrl</span><span style="color:#666">.</span><span style="color:#b44">Href</span><span style="color:#666">)</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">20</span><span> <span style="color:#666">:</span> Path<span style="color:#666">.</span><span style="color:#b44">Combine</span><span style="color:#666">(</span>Path<span style="color:#666">.</span><span style="color:#b44">GetFileName</span><span style="color:#666">(</span>Path<span style="color:#666">.</span><span style="color:#b44">GetDirectoryName</span><span style="color:#666">(</span>resource<span style="color:#666">.</span><span style="color:#b44">OriginalUrl</span><span style="color:#666">.</span><span style="color:#b44">Href</span><span style="color:#666">)),</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">21</span><span> Path<span style="color:#666">.</span><span style="color:#b44">GetFileName</span><span style="color:#666">(</span>resource<span style="color:#666">.</span><span style="color:#b44">OriginalUrl</span><span style="color:#666">.</span><span style="color:#b44">Href</span><span style="color:#666">)));</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">22</span><span> var samplePrefix <span style="color:#666">=</span> String<span style="color:#666">.</span><span style="color:#b44">Empty</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">23</span><span> <span style="color:#a2f;font-weight:700">if</span> <span style="color:#666">(</span>initialized<span style="color:#666">)</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">24</span><span> samplePrefix <span style="color:#666">=</span> <span style="color:#b44">"my_"</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">25</span><span> <span style="color:#a2f;font-weight:700">else</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">26</span><span> initialized <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">true</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">28</span><span> using <span style="color:#666">(</span>var newStream <span style="color:#666">=</span> archive<span style="color:#666">.</span><span style="color:#b44">CreateEntry</span><span style="color:#666">(</span>samplePrefix <span style="color:#666">+</span> zipUri<span style="color:#666">).</span><span style="color:#b44">Open</span><span style="color:#666">())</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">29</span><span> <span style="color:#666">{</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">30</span><span> resource<span style="color:#666">.</span><span style="color:#b44">WithOutputUrl</span><span style="color:#666">(</span><span style="color:#a2f;font-weight:700">new</span> Url<span style="color:#666">(</span><span style="color:#b44">"file:///"</span> <span style="color:#666">+</span> samplePrefix <span style="color:#666">+</span> zipUri<span style="color:#666">)).</span><span style="color:#b44">Save</span><span style="color:#666">(</span>newStream<span style="color:#666">,</span> context<span style="color:#666">);</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">31</span><span> <span style="color:#666">}</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">32</span><span> <span style="color:#666">}</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">34</span><span> <span style="color:#a2f;font-weight:700">private</span> <span style="color:#0b0;font-weight:700">void</span> <span style="color:#00a000">DisposeArchive</span><span style="color:#666">()</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">35</span><span> <span style="color:#666">{</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">36</span><span> <span style="color:#a2f;font-weight:700">if</span> <span style="color:#666">(</span>archive <span style="color:#666">!=</span> <span style="color:#a2f;font-weight:700">null</span><span style="color:#666">)</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">37</span><span> <span style="color:#666">{</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">38</span><span> archive<span style="color:#666">.</span><span style="color:#b44">Dispose</span><span style="color:#666">();</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">39</span><span> archive <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">null</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">40</span><span> <span style="color:#666">}</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">42</span><span> <span style="color:#a2f;font-weight:700">if</span> <span style="color:#666">(</span>zipStream <span style="color:#666">!=</span> <span style="color:#a2f;font-weight:700">null</span><span style="color:#666">)</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">43</span><span> <span style="color:#666">{</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">44</span><span> zipStream<span style="color:#666">.</span><span style="color:#b44">Dispose</span><span style="color:#666">();</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">45</span><span> zipStream <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">null</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">46</span><span> <span style="color:#666">}</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">48</span><span> streamsCounter <span style="color:#666">=</span> <span style="color:#666">0</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">49</span><span> <span style="color:#666">}</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">51</span><span> <span style="color:#a2f;font-weight:700">public</span> <span style="color:#0b0;font-weight:700">void</span> <span style="color:#00a000">Dispose</span><span style="color:#666">()</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">52</span><span> <span style="color:#666">{</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">53</span><span> DisposeArchive<span style="color:#666">();</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">54</span><span> <span style="color:#666">}</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">55</span><span> <span style="color:#666">}</span></span></span></code></pre></div></div><h3 id="将-svg-保存到内存流">将 SVG 保存到内存流</h3><p><strong>MemoryResourceHandler</strong> 类中的 <a href="https://reference.aspose.com/svg/net/aspose.svg.saving.resourcehandlers/resourcehandler/" target="_blank" rel="nofollow">ResourceHandler</a> 类实现允许将 SVG 保存到内存流。以下代码演示了如何使用<code>MemoryResourceHandler</code>类在内存中存储 SVG 文档,收集和打印有关已处理资源的信息。</p><ol><li>使用指定的 SVG 文件路径初始化 SVG 文档。</li><li>创建<code>MemoryResourceHandler</code>类的实例。此类旨在在资源处理过程中捕获和存储内存流中的资源。</li><li>调用 SVG 文档的<code>Save()</code>方法并将<code>MemoryResourceHandler</code>实例作为参数传递给它。这会将 <code>MemoryResourceHandler</code> 的资源处理逻辑与 SVG 文档保存过程相关联。</li><li>使用 <code>MemoryResourceHandler</code> 的 <code>PrintInfo()</code> 方法打印有关已处理资源的信息。</li></ol><div class="code_snipet_position"><button class="copy_code">Copy</button><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 1</span><span>using System<span style="color:#666">.</span><span style="color:#b44">IO</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 2</span><span>using Aspose<span style="color:#666">.</span><span style="color:#b44">Svg</span><span style="color:#666">.</span><span style="color:#b44">IO</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 3</span><span>using System<span style="color:#666">.</span><span style="color:#b44">Collections</span><span style="color:#666">.</span><span style="color:#b44">Generic</span><span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 4</span><span><span style="color:#666">...</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 6</span><span> <span style="color:#080;font-style:italic">// Prepare a path to a source SVG file </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 7</span><span><span style="color:#080;font-style:italic"/> string inputPath <span style="color:#666">=</span> Path<span style="color:#666">.</span><span style="color:#b44">Combine</span><span style="color:#666">(</span>DataDir<span style="color:#666">,</span> <span style="color:#b44">"with-resources.svg"</span><span style="color:#666">);</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 9</span><span> <span style="color:#080;font-style:italic">// Initialize an SVG document </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">10</span><span><span style="color:#080;font-style:italic"/> using <span style="color:#666">(</span>var doc <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">new</span> SVGDocument<span style="color:#666">(</span>inputPath<span style="color:#666">))</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">11</span><span> <span style="color:#666">{</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">12</span><span> <span style="color:#080;font-style:italic">// Create an instance of the MemoryResourceHandler class and save SVG to memory </span></span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">13</span><span><span style="color:#080;font-style:italic"/> var resourceHandler <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">new</span> MemoryResourceHandler<span style="color:#666">();</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">14</span><span> doc<span style="color:#666">.</span><span style="color:#b44">Save</span><span style="color:#666">(</span>resourceHandler<span style="color:#666">);</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">15</span><span> resourceHandler<span style="color:#666">.</span><span style="color:#b44">PrintInfo</span><span style="color:#666">();</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">16</span><span> <span style="color:#666">}</span></span></span></code></pre></div></div><p>示例运行后,将打印有关内存存储的消息:</p><p><code>uri:memory:///with-resources.svg, length:556</code><br/><code>uri:memory:///photo.png, length:57438</code></p><p><a href="https://reference.aspose.com/svg/net/aspose.svg.saving.resourcehandlers/resourcehandler/" target="_blank" rel="nofollow">ResourceHandler</a> 是支持输出流的创建和管理的基类。 <code>MemoryResourceHandler</code> 类允许您捕获并将资源存储在内存流中,提供动态且灵活的方式来处理资源,而无需将资源物理保存到文件系统。以下代码片段展示了 <strong>MemoryResourceHandler</strong> 类中 <code>ResourceHandler</code> 的实现:</p><div class="code_snipet_position"><button class="copy_code">Copy</button><div class="highlight"><pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 1</span><span> internal <span style="color:#a2f;font-weight:700">class</span> <span style="color:#00f">MemoryResourceHandler</span> <span style="color:#666">:</span> ResourceHandler </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 3</span><span> <span style="color:#a2f;font-weight:700">public</span> List<span style="color:#666"><</span>Tuple<span style="color:#666"><</span>Stream<span style="color:#666">,</span> Resource<span style="color:#666">>></span> Streams<span style="color:#666">;</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 5</span><span> <span style="color:#a2f;font-weight:700">public</span> <span style="color:#00a000">MemoryResourceHandler</span><span style="color:#666">()</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f"> 7</span><span> Streams <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">new</span> List<span style="color:#666"><</span>Tuple<span style="color:#666"><</span>Stream<span style="color:#666">,</span> Resource<span style="color:#666">>>();</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">10</span><span> <span style="color:#a2f;font-weight:700">public</span> override <span style="color:#0b0;font-weight:700">void</span> <span style="color:#00a000">HandleResource</span><span style="color:#666">(</span>Resource resource<span style="color:#666">,</span> ResourceHandlingContext context<span style="color:#666">)</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">11</span><span> <span style="color:#666">{</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">12</span><span> var outputStream <span style="color:#666">=</span> <span style="color:#a2f;font-weight:700">new</span> MemoryStream<span style="color:#666">();</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">13</span><span> Streams<span style="color:#666">.</span><span style="color:#b44">Add</span><span style="color:#666">(</span>Tuple<span style="color:#666">.</span><span style="color:#b44">Create</span><span style="color:#666"><</span>Stream<span style="color:#666">,</span> Resource<span style="color:#666">>(</span>outputStream<span style="color:#666">,</span> resource<span style="color:#666">));</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">14</span><span> resource </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">15</span><span> <span style="color:#666">.</span><span style="color:#b44">WithOutputUrl</span><span style="color:#666">(</span><span style="color:#a2f;font-weight:700">new</span> Url<span style="color:#666">(</span>Path<span style="color:#666">.</span><span style="color:#b44">GetFileName</span><span style="color:#666">(</span>resource<span style="color:#666">.</span><span style="color:#b44">OriginalUrl</span><span style="color:#666">.</span><span style="color:#b44">Pathname</span><span style="color:#666">),</span> <span style="color:#b44">"memory:///"</span><span style="color:#666">))</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">16</span><span> <span style="color:#666">.</span><span style="color:#b44">Save</span><span style="color:#666">(</span>outputStream<span style="color:#666">,</span> context<span style="color:#666">);</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">17</span><span> <span style="color:#666">}</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">19</span><span> <span style="color:#a2f;font-weight:700">public</span> <span style="color:#0b0;font-weight:700">void</span> <span style="color:#00a000">PrintInfo</span><span style="color:#666">()</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">20</span><span> <span style="color:#666">{</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">21</span><span> foreach <span style="color:#666">(</span>var stream in Streams<span style="color:#666">)</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">22</span><span> Console<span style="color:#666">.</span><span style="color:#b44">WriteLine</span><span style="color:#666">(</span>$<span style="color:#b44">"uri:{stream.Item2.OutputUrl}, length:{stream.Item1.Length}"</span><span style="color:#666">);</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">23</span><span> <span style="color:#666">}</span> </span></span><span style="display:flex"><span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:.4em;padding:0 .4em;color:#7f7f7f">24</span><span> <span style="color:#666">}</span></span></span></code></pre></div></div><div class="alert_block_primary"><p>您可以从 <a href="https://github.com/aspose-svg/Aspose.SVG-Documentation" target="_blank" rel="nofollow"><strong>GitHub</strong></a> 下载完整的示例和数据文件。关于从 GitHub 下载并运行示例,您可以从 <a href="/svg/zh/net/how-to-run-the-tests/"><strong>如何运行示例</strong></a> 部分找到。</p><p>您可以尝试使用我们的 <a href="https://products.aspose.app/svg/zh/conversion" target="_blank" rel="nofollow"><strong>免费在线 SVG 转换器</strong></a> 将 SVG 文档转换为各种其他格式。</p></div><div class="prev_next_links"><a class="link_in_text prev_link" href="/svg/zh/net/svg-builder/"><i class="fa fa-chevron-left"/> <span>SVG生成器</span></a>
推荐文章
非常酷的豆腐
·
可可幂精选精彩视频资源:超肥美无毛,一见倾心! - 表妹资源网
2 月前
苦恼的羊肉串
·
改进面板:增加透明化、改变背景色以及继承于 CAppDialog/CWndClient - MQL5文章
10 月前
爱笑的回锅肉
·
typeScript 比较两个字符串_mob649e815e9bc9的技术博客_51CTO博客
11 月前
非常酷的双杠
·
指针*pbuffer和getchar 读取字符串 - ostartech - 博客园
1 年前
率性的橙子
·
从精神病院走出的强者 叶冰 - 抖音
1 年前