code:
LoadOptions loadOptions = new LoadOptions(); loadOptions.setSpecifiedEncoding(CodePages.SimpChinese); image = Image.load(sourceInputStream, loadOptions); IConvertFile pngFile = sourceFile.newConvertFile("png"); CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions(); rasterizationOptions.setDrawType(CadDrawTypeMode.UseObjectColor); rasterizationOptions.setBackgroundColor(Color.getBlack()); rasterizationOptions.setPageWidth(width); rasterizationOptions.setPageHeight(height); ImageOptionsBase options = new PngOptions(); options.setVectorRasterizationOptions(rasterizationOptions); image.save(pngFile.getOutputStream(), options);
123.dxf.zip (461.3 KB)