I’m evaluating your product for use in my project. I was able to successfully convert some sample DWG files to tiff and pdf format in java; However saze.dwg.zip (1.3 MB) fails with the following stacktrace:
foo.bar.test.ApplicationKt.main(Application.kt:26)
at com.aspose.cad.Image.a(Unknown Source)
at com.aspose.cad.fileformats.cad.CadImage.a(Unknown Source)
at com.aspose.cad.Image.save_internalized(Unknown Source)
… 4 more
Caused by: java.lang.NullPointerException
at com.aspose.cad.internal.n.K.a(Unknown Source)
at com.aspose.cad.internal.n.K.a(Unknown Source)
at com.aspose.cad.internal.eY.h.a(Unknown Source)
at com.aspose.cad.internal.eY.h.a(Unknown Source)
at com.aspose.cad.internal.eY.h.a(Unknown Source)
at com.aspose.cad.internal.eR.G.a(Unknown Source)
at com.aspose.cad.internal.eQ.f.a(Unknown Source)
at com.aspose.cad.internal.eR.p.a(Unknown Source)
at com.aspose.cad.internal.eQ.f.a(Unknown Source)
at com.aspose.cad.internal.eQ.f.a(Unknown Source)
at com.aspose.cad.internal.eQ.f.a(Unknown Source)
at com.aspose.cad.internal.eQ.c.a(Unknown Source)
at com.aspose.cad.internal.eQ.i.b(Unknown Source)
at com.aspose.cad.internal.eQ.a.a(Unknown Source)
at com.aspose.cad.internal.eQ.a.export(Unknown Source)
… 7 more
It seems like the error happens in these 5 layers of the dwg: ‘TEXT’, ‘TXT’, ‘zard’, ‘GOOSH’, ‘0’
I’m using the library version ‘19.7’. This is my code in kotlin I can provide java equivalent if necessary:
Image.load("/home/ghasemi/Desktop/saze.dwg").use { image ->
val options = CadRasterizationOptions().apply {
pageWidth = 1600f
pageHeight = 1600f
automaticLayoutsScaling = true
isNoScaling = false
}
image.save("/home/ghasemi/Desktop/output.tiff",
TiffOptions(TiffExpectedFormat.Default).apply { vectorRasterizationOptions = options })
}