Exception: ImageLoadException on converting DWF to JPG

Hi,

I am trying to convert DWF to JPG using the latest (Java 19.9), however I am getting the below exception.

class com.aspose.cad.cadexceptions.ImageLoadException: Unable to read Dwf content: Unknown operation code type.

Kindly help.

Regards,
Gangadhar

@kutti184,

I have observed your requirements and request you to please share the source file reproducing the issue along with source code. We will be able to investigate the issue on our end on provision of requested information.

Hi,

0032-X001-020-02.dwf.zip (68.0 KB)

Below is the source code and attached is the source file.

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import com.aspose.cad.imageoptions.CadRasterizationOptions;
import com.aspose.cad.imageoptions.JpegOptions;

public class PdfUtil {

            public static void main(String[] args) {
                            // TODO Auto-generated method stub
                            System.out.println("Converting DWG to JPEG...");
                            convertDwgToPdf();
            }

            private static void convertDwgToPdf() {
                            try {
                                                            com.aspose.cad.Image image = com.aspose.cad.Image.load("C://Users//gmrb//0032-X001-020-02.dwf");
                                                            CadRasterizationOptions rasterOptions = new CadRasterizationOptions();
                                                            rasterOptions.setPageWidth(1600);
                                                            rasterOptions.setPageWidth(1600);
                                                           
                                                            List<String> stringList = new ArrayList<>(Arrays.asList("LayerA"));
                                                            rasterOptions.setLayers(stringList);
                                                           
                                                            JpegOptions jpegOptions = new JpegOptions();
                                                            jpegOptions.setVectorRasterizationOptions(rasterOptions);
                                                           
                                                            image.save("C://Users//gmrb//0032-X001-020-02.jpg", jpegOptions);
                                                            System.out.println("Convertion Success***");
                            }catch(Exception e) {
                                            e.printStackTrace();
                                            System.out.println("Convertion failed");
                            }
            }

}

@kutti184,

I have observed your requirements and have been able to reproduce the issue. An issue with ID CADJAVA-572 has been created in our issue tracking system to investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Hi,

Is there any resolution for this issue?

Regards,
Gangadhar

@kutti184,

I have verified from our issue tracking system and like to share that the issue is pending in queue for investigation at the moment and we will be scheduling this for investigation and resolution on its due turn. We request for your patience and will share the good news with you as soon as the issue will be fixed.

The issues you have found earlier (filed as CADJAVA-572) have been fixed in this update.