簡體   English   中英

如何使用以及我可以在 Adobe Illustrator api C# 中找到導出參數的位置

[英]how to use and where i can find export params in Adobe Illustrator api C#

我在我的應用程序中使用插畫家 api

    Illustrator.Application app = new Illustrator.Application();
    app.Open("D:\\1\\2\\1.svg");
    app.ActiveDocument.Activate();
    app.ActiveDocument.Export("D:\\1\\2\\1_1.svg", Illustrator.AiExportType.aiSVG);
    app.ActiveDocument.Close(Illustrator.AiSaveOptions.aiDoNotSaveChanges);

我想使用 Illustrator 格式將我的 svg 轉換為 1.2 微小格式。 Function app.ActiveDocument.Export 可以做到。 它有 3 個參數:文件名、格式和參數。 需要的參數:小數位=1 和圖像位置=鏈接,因為它最適合我的解析器。

鏈接那個

當然,我無法搜索如何在此 function 中包含這些選項的任何信息。 請不要向我推薦任何其他庫或inkscape。 謝謝

您可以在枚舉中找到您的微型 svg 1.2 版本

Illustrator.AiSVGDTDVersion.aiSVGTiny1_2

也許您認為您可以創建選項 class 的 object:

Illustrator.ExportOptionsSVGClass

但是當您嘗試創建這些 object 時,您會收到錯誤消息。 您的解決方案是:

var options = new ExportOptionsSVG();
            options.SVGTextOnPath = true;
            options.IncludeUnusedStyles = false;
            options.IncludeFileInfo = false;
            options.EmbedRasterImages = true;
            options.DTD = AiSVGDTDVersion.aiSVGTiny1_2;
            app.ActiveDocument.Export("path", AiExportType.aiSVG, options);
        

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM