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 的下載地址:請點這裡