歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> 利用Aspose.Imaging for .NET轉換AutoCAD DXF到PDF

利用Aspose.Imaging for .NET轉換AutoCAD DXF到PDF

日期:2017/3/1 9:49:14   编辑:Linux編程

Aspose.Imaging for .NET 2.0.0現在已經發布,帶來了新的AutoCAD DXF 2010文件格式讀取功能,並能輸出到PDF格式。

using Aspose.Imaging.FileFormats.Cad;
using Aspose.Imaging.ImageOptions;


namespace DxfExamples
{
/// <summary>
/// Represents test examples for DXF -> PDF export
/// </summary>
public class DxfExamples
{
/// <summary>
/// Default export.
/// </summary>
public void DefaultExport()
{
// Name of the file
string filename = "Drawing1.dxf";


// Load an image
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(filename))
{
// Create options
PdfOptions pdfOptions = new PdfOptions();


// Set output file size
pdfOptions.PageWidth = 800;
pdfOptions.PageHeight = 600;


// Export
image.Save(filename + ".pdf", pdfOptions);
}
}
}
}

Aspose.Imaging 的詳細介紹:請點這裡
Aspose.Imaging 的下載地址:請點這裡

Copyright © Linux教程網 All Rights Reserved