I converted dwg file to pdf file through Aspose.CAD for java on Android Device like this:
com.aspose.cad.Image objImage = com.aspose.cad.Image.load("/storage/emulated/0/cad/sample.dwg");
CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();
rasterizationOptions.setBackgroundColor(Color.getWhite());
rasterizationOptions.setPageWidth(1600);
rasterizationOptions.setPageHeight(1600);
PdfOptions pdfOptions = new PdfOptions();
pdfOptions.setVectorRasterizationOptions(rasterizationOptions);
objImage.save(dir + "/storage/emulated/0/cad/sample.pdf", pdfOptions);
but I got this Exception:
class com.aspose.cad.cadexceptions.ImageLoadException: Image loading failed: Cannot process loading further due to incorrect file format structure, may be file is corrupted. ---> class com.aspose.cad.internal.Exceptions.Exception: Cannot process loading further due to incorrect file format structure, may be file is corrupted.
com.aspose.cad.internal.fL.g.a(Unknown Source:323)
com.aspose.cad.internal.fL.bl.a(Unknown Source:77)
com.aspose.cad.internal.fL.bk.a(Unknown Source:46)
com.aspose.cad.Image.a(Unknown Source:51)
com.aspose.cad.Image.load(Unknown Source:6)
does this mean Aspose.CAD does not support running on Android Device? If not, Is there any way to convert DWG to PDF on Android devices?