Free Support Forum -

CADImage load a large CAD file will cost long long time,and even can't continue the process

Image load = CadImage.load(new FileInputStream(file.getAbsoluteFile()));
The large dwg file is here. (5.7 MB)


I have opened a ticket with ID CADJAVA-903 in our issue tracking system after observing the issue. This thread has been linked with the issue so that you may be notified once issue will be fixed.


I suggest you to please increase the Java Heap Size. You may consider using -Xmx5g argument with following code. On our end, it takes about 30 seconds.

        String srcFile = path + "A01¬г-¦-L¦д=-PRO-E-0027-03.dwg";

        Image image = CadImage.load(new FileInputStream(srcFile));

        CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();

        // Export to PNG format
        PngOptions pngOptions = new PngOptions();
        pngOptions.setVectorRasterizationOptions(rasterizationOptions); + "export.png", pngOptions);

The generated output is attached for your kind reference.
export.png (25.4 KB)