dwg转pdf

使用aspose-cad的方式,转出的pdf很模糊,效果很差

使用Any DWG to PDF Converter Pro 官网 https://anydwg.com/dwg2pdf/

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class DWGToPDF {
    public static void main(String[] args)  throws IOException {

        String str = "E:\\Any DWG DXF Converter Pro\\dp.exe";
        String source = "E:\\data\\aa.dwg";//源文件
        String out = "E:\\data\\aa.pdf";//目标文件
        Process pro = Runtime.getRuntime().exec(str+" /InFile "+source+"  /OutFile "+out);
        BufferedReader br = new BufferedReader(new InputStreamReader(pro.getInputStream()));
        String msg = null;
        while ((msg = br.readLine()) != null) {
            System.out.println(msg);
        }

    }
}

有使用次数限制,去掉限制次数的

链接:https://pan.baidu.com/s/13XSwOUSP9qxGqbXOgZUvIw 
提取码:6vf1

 

posted @ 2020-05-20 14:34  慕尘  阅读(1109)  评论(1编辑  收藏  举报