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 与 源图
@gimete,
您能否在最后尝试使用最新的Java版Aspose.CAD 20.6。 如果仍然存在问题,请共享生成的PDF文件,突出显示该问题。
gimete
3
@mudassir.fayyaz
使用Aspose.CAD 20.6 转换后还是存在缺失线条的问题
BR200267-45.pdf (1.6 MB)
2c0e7860a4f73d20e6aede52255a4d4.png (35.0 KB)
上面两个附件 是 转换后的pdf 与 源图的效果
@gimete,
我可以在导出的PDF中看到缺少的行。 您能否将源DWG文件与使用的示例代码共享,我们可能会尽力为您提供进一步的帮助。
gimete
5
@mudassir.fayyaz在帖子的顶楼 已经共享了 dwg源文件 和 转换代码 ,我再发一下
代码如下:
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) {
}
源文件如下
BR200267-45.dwg.zip (107.2 KB)
@gimete,
我可以观察到缺失的线与其他线一起在PDF中形成3D形状。 我们的问题跟踪系统中已创建了ID为 CADNET-1160 的故障单,以进一步调查和解决问题。 该线程已与问题关联,因此一旦问题解决,您可能会收到通知。
The issues you have found earlier (filed as CADNET-1160) have been fixed in this update.
请问这个问题 在java上解决了嘛 我看到c#已经可以实现该功能了 (虽然有一些小bug)
Is this problem solved in Java? I see that c# can implement this function
@cuipz_coalinfo_net_cn
该问题已在即将推出的 Aspose.CAD for .NET 21.9 中标记为已解决。 一旦它被修复为 .NET,它也将被移植到相关的 Java 版本。