IGES 图纸
Contents
[
Hide
]导出 IGES 到 PDF
Aspose.CAD for .NET 允许开发者将 IGES 文件渲染为 PDF。以下是演示如何访问 IGES 文件并使用 CadRasterizationOption 和 PdfOptions 将其转换为 PDF 的代码。
示例代码
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The path to the documents directory. | |
string MyDir = RunExamples.GetDataDir_IGESDrawings(); | |
string sourceFilePath = MyDir + "figa2.igs"; | |
using (Image cadImage = Image.Load(sourceFilePath)) | |
{ | |
CadRasterizationOptions options = new CadRasterizationOptions | |
{ | |
PageHeight = 1000, | |
PageWidth = 1000, | |
}; | |
PdfOptions pdfOptions = new PdfOptions(); | |
pdfOptions.VectorRasterizationOptions = options; | |
cadImage.Save(MyDir+ "figa2.pdf", pdfOptions); | |
} |