.NET C# 后台将DXF文件导出成PDF文件

在VS添加GleamTech.DocumentUltimate的引用

//导出PDF
//createPdf("666.dxf","888.pdf");

/// <summary>
/// 创建PDF
/// </summary>
/// <param name="dxfPath">DXF完整地址加文件带后缀</param>
/// <param name="pdfPath">PDF完整地址加文件带后缀</param>
private static void createPdf(string dxfPath, string pdfPath)
{
BackSlashPath documentConverter = new BackSlashPath(dxfPath);
BackSlashPath outputDocument = new BackSlashPath(pdfPath);
var outputFormat = (DocumentFormat)Enum.Parse(typeof(DocumentFormat), "Pdf");
var result = DocumentConverter.Convert(documentConverter, outputDocument, outputFormat);

}

 

posted @ 2019-07-30 10:44  Vanling  阅读(862)  评论(0编辑  收藏  举报