用了19.7版本和17.4版本 都有问题
InputStream in = new FileInputStream(dwg);
CadImage cadImage = (CadImage) Image.load(in);
for(Object style : cadImage.getStyles())
{
// Set the font name SimHei
((com.aspose.cad.fileformats.cad.cadtables.CadStyleTableObject)style).setPrimaryFontName(“SimHei”);
}
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();
rasterizationOptions.setCenterDrawing(true);
rasterizationOptions.setDrawType(1);
rasterizationOptions.setPageSize(new SizeF(1200,1200));//
rasterizationOptions.setLayouts(new String[] {“Model”});
// Create an instance of PdfOptions
PdfOptions pdfOptions = new PdfOptions();
// Set the VectorRasterizationOptions property
pdfOptions.setVectorRasterizationOptions(rasterizationOptions);
cadImage.save();
期望是可以用彩版画笔test.zip (380.1 KB)