Aspose.cad for java 21.8. DWG2SVG OOM

        Image cadImage = Image.load(inputStream);
        CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();
        rasterizationOptions.setPageWidth(400);
        rasterizationOptions.setPageHeight(300);
        rasterizationOptions.setAutomaticLayoutsScaling(true);
        rasterizationOptions.setNoScaling(false);
        rasterizationOptions.setContentAsBitmap(true);
        rasterizationOptions.setLayouts(new String[]{"Model"});
        rasterizationOptions.setDrawType(1);
        rasterizationOptions.setBackgroundColor(Color.getBlack());
        SvgOptions svgOptions = new SvgOptions();
        svgOptions.setVectorRasterizationOptions(rasterizationOptions);


        // Set Graphics options
        rasterizationOptions.getGraphicsOptions().setSmoothingMode(SmoothingMode.HighQuality);
        rasterizationOptions.getGraphicsOptions().setTextRenderingHint(TextRenderingHint.AntiAliasGridFit);
        rasterizationOptions.getGraphicsOptions().setInterpolationMode(InterpolationMode.HighQualityBicubic);
        cadImage.save(targetPath, svgOptions);

image.jpg (179.7 KB)

@sunshine2021
Please provide us with an input source file so we will be able to reproduce it on our side.