BR200267-45(1).dwg.zip (107.2 KB)
附件中的图纸 转换成pdf后 丢失了部分线条 麻烦看一下
示例代码如下
License license = new License();
license.setLicense(new File(ConvertConstant.CONVERT_LICENSE_PATH));
Image img = null;
try {
img = Image.load(new FileInputStream(srcFile));
} catch (Exception e) {
e.printStackTrace();
}
CadRasterizationOptions pdfCadOpts = new CadRasterizationOptions();
pdfCadOpts.getQuality().setTextThicknessNormalization(true);
PdfOptions pdfOpts = new PdfOptions();
pdfOpts.setVectorRasterizationOptions(pdfCadOpts);
try {
img.save(path, pdfOpts);
} catch (Exception e) {
}
使用的版本是 Aspose.CAD for Java 20.3
环境 JDK1.7 tomcat7
9c4cbd5e0206436b5218da1c9f005ec.png (21.3 KB)
2c0e7860a4f73d20e6aede52255a4d4.png (35.0 KB)
上方两张图片分别是 转换后的pdf 与 源图