Convert dxf to pdf
Here is the conversion code:
private void import_Click(object sender, EventArgs e)
{
string dpath = @"D:\pic.dxf";
string ppath = @"D:\pic.pdf";
createPdf(dpath, ppath);
}
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 = GleamTech.DocumentUltimate.DocumentConverter.Convert(documentConverter, outputDocument, outputFormat);
}
Before using it, you need to add "DocumentUltimate" from "NuGet". The specific operation is as follows: Right click the Reference and select "Manage NuGet Packages...", then type "DocumentUltimate" in the search bar and install it:


把圈子变小,把语言变干净,把成绩往上提,把故事往心里收,现在想要的以后你都会有。

浙公网安备 33010602011771号