We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Cad文件转换成pdf,生成了空白的pdf

代码如下:
PdfOptions pdfOptions = new PdfOptions();
CadRasterizationOptions cadRasterizationOptions = new CadRasterizationOptions();
pdfOptions.setVectorRasterizationOptions(cadRasterizationOptions);
cadRasterizationOptions.setPageWidth(1800);
cadRasterizationOptions.setPageHeight(1600);
cadRasterizationOptions.setBackgroundColor(Color.getWhite());
cadRasterizationOptions.setAutomaticLayoutsScaling(true);
cadRasterizationOptions.setCenterDrawing(true);
cadRasterizationOptions.setDrawType(CadDrawTypeMode.UseObjectColor);
cadRasterizationOptions.setTypeOfEntities(TypeOfEntities.Entities2D);
Image image = Image.load(“test.dxf”);
OutputStream stream = new FileOutputStream(“dwg.pdf”);
image.save(stream, pdfOptions);
cad文件及生成pdf文件如下:
cad2pdf.zip (32.3 KB)

@it_gokuai_cn,

我已經使用Aspose.CAD for Java 17.4共享的源代碼和源文件,並且已經能夠觀察到這個問題。在我們的問題跟踪系統中創建了一張ID為CADJAVA-161的機票,以進一步調查和解決問題。此線程已與問題相關聯,因此一旦問題被修復,您可能會自動收到通知。

對於您的不便,我們深表歉意