Aspose.CAD for Java 20.1 - Release Notes

KeySummaryCategory
CADJAVA-600Support for conversion of DWG to DWFFeature
CADJAVA-598Support for OBJ formatFeature
CADJAVA-537Read hyperlinks and OLE object links sectionFeature
CADJAVA-596DWG drawings take a long time to convert to PDFEnhancement
CADJAVA-595Last Author metadata information failed to get extractedEnhancement
CADJAVA-587Text Color problem in exported PDFEnhancement
CADJAVA-503Create PDF from DWG fileEnhancement
CADJAVA-534Issue in API docs linksBug
CADJAVA-602Exception on extracting text from DGN and DWFBug
CADJAVA-599ArgumentNullException is thrown when saving DWG drawing as an image streamBug
CADJAVA-597Exception on converting DXF file to PNGBug
CADJAVA-593Hidden layers are ignored when rendering drawingBug
CADJAVA-592Hidden layers have same Flags values as a visible oneBug
CADJAVA-591Default font setting stopped workingBug
CADJAVA-590Empty folder called TempFonts created in a temp directoryBug
CADJAVA-589Blank output when saving STL fileBug
CADJAVA-586Export of STL to WMF failedBug
CADJAVA-585DWT file format detection issueBug
CADJAVA-565DXF file not properly converted to PNGBug
CADJAVA-538Exception in a multi-threaded environmentBug
CADJAVA-536NullPointerException when converting DWG to image in javaBug
CADJAVA-535DWF not properly converted to PNGBug
CADJAVA-532Exception on converting DWG to PDFBug
CADJAVA-531Blank page PNG generated from DXFBug
CADJAVA-527DWG not converted to PDFBug
CADJAVA-501DWG not properly converted to PDFBug
CADJAVA-497Exception on loading DWGBug
CADJAVA-166CadException: The DGN version is not valid when loading a DGN fileBug

Added APIs:

Class         com.aspose.cad.fileFormats.dwf.whip.objects.drawable.dwfWhipGouraudPointSet
Class         com.aspose.cad.fileFormats.dwf.whip.objects.drawable.dwfWhipGouraudPolyline
Class         com.aspose.cad.fileFormats.dwf.whip.objects.drawable.dwfWhipGouraudPolytriangle
Class         com.aspose.cad.fileFormats.dwf.whip.objects.drawable.dwfWhipPolymarker
Class         com.aspose.cad.imageOptions.dwfOptions
Field/Enum    com.aspose.cad.fileFormat.oBJ
Field/Enum    com.aspose.cad.fileFormats.cad.cadConsts.cadCommon.customProperty
Field/Enum    com.aspose.cad.fileFormats.cad.cadConsts.cadCommon.customPropertyTag
Method        com.aspose.cad.fileFormats.cad.dwg.lZ77StreamWriter.foundLiteral
Method        com.aspose.cad.fileFormats.dwf.dwfPage.#ctor(System.string)
Method        com.aspose.cad.fileFormats.dwf.whip.objects.drawable.dwfWhipGouraudPointSet.#ctor
Method        com.aspose.cad.fileFormats.dwf.whip.objects.drawable.dwfWhipGouraudPolyline.#ctor
Method        com.aspose.cad.fileFormats.dwf.whip.objects.drawable.dwfWhipGouraudPolytriangle.#ctor
Method        com.aspose.cad.fileFormats.dwf.whip.objects.drawable.dwfWhipPolymarker.#ctor
Method        com.aspose.cad.iImageLoader.canLoad(com.aspose.cad.streamContainer,com.aspose.cad.loadOptions)
Method        com.aspose.cad.imageOptions.dwfOptions.#ctor
Method        com.aspose.cad.imageOptions.renderResult.#ctor(System.string,com.aspose.cad.imageOptions.renderErrorCode)
Method        com.aspose.cad.point.op_Explicit(com.aspose.cad.point)
Method        com.aspose.cad.pointF.op_Explicit(com.aspose.cad.pointF)
Method        com.aspose.cad.xmp.xmpPackage.setValue(System.string,   )
Property      com.aspose.cad.fileFormats.cad.dwg.lZ77StreamWriter.dictionaryBytes
Property      com.aspose.cad.fileFormats.dwf.dwfPage.entities
Property      com.aspose.cad.fileFormats.dwf.dwfPage.maxPoint
Property      com.aspose.cad.fileFormats.dwf.dwfPage.minPoint
Property      com.aspose.cad.fileFormats.dwf.whip.objects.drawable.dwfWhipGouraudPointSet.colors
Property      com.aspose.cad.imageOptions.dwfOptions.targetDwfInterface
Property      com.aspose.cad.imageOptions.vectorRasterizationOptions.relativePosition
Property      com.aspose.cad.imageOptions.vectorRasterizationOptions.relativeScale

Removed APIs:

Method        com.aspose.cad.fileFormats.cad.dwg.lZ77StreamWriter.foundLiteral(System.int32,System.int32)
Method        com.aspose.cad.imageOptions.renderResult.#ctor
Method        com.aspose.cad.point.op_Explicit(com.aspose.cad.point)
Method        com.aspose.cad.pointF.op_Explicit(com.aspose.cad.pointF)
Method        com.aspose.cad.xmp.xmpPackage.setValue(System.string,   )
Property      com.aspose.cad.fileFormats.dwf.dwfPage.color
Property      com.aspose.cad.fileFormats.dwf.dwfPage.plotOrder
Method        com.aspose.cad.fileFormats.cad.dwg.lZ77StreamWriter.foundLiteral(System.int32,System.int32)
Method        com.aspose.cad.imageOptions.renderResult.#ctor
Method        com.aspose.cad.point.op_Explicit(com.aspose.cad.point)
Method        com.aspose.cad.pointF.op_Explicit(com.aspose.cad.pointF)
Method        com.aspose.cad.xmp.xmpPackage.setValue(System.string,   )
Property      com.aspose.cad.fileFormats.dwf.dwfPage.color
Property      com.aspose.cad.fileFormats.dwf.dwfPage.plotOrder

Usage examples:

CADJAVA-595 - Last Author metadata information failed to get extracted

 String fileName1 = "example.dwg";

CadImage image = (CadImage) Image.load(fileName1);

CadSummaryInfo summary = image.getHeader().getSummaryInfo();

System.out.println(summary.getAuthor());

CADJAVA-598 - Support for OBJ format

 Image cadDoc = Image.load("example-580-W.obj");

CadRasterizationOptions rasterizationOptions = new CadRasterizationOptions();

rasterizationOptions.setPageWidth(cadDoc.getSize().getWidth());

rasterizationOptions.setPageHeight(cadDoc.getSize().getHeight());

PdfOptions CADf = new PdfOptions();

CADf.setVectorRasterizationOptions(rasterizationOptions);

cadDoc.save("example-580-W_custom.pdf", CADf);

CADJAVA-537 Read hyperlinks and OLE object links section

 CadImage cadImage = (CadImage)Image.load("Autocad sample.dwg");

for (CadBaseEntity entity : cadImage.getEntities())

{

    if (entity instanceof CadInsertObject)

    {

        CadBlockEntity block = cadImage.getBlockEntities().get_Item(((CadInsertObject)entity).getName());

        String value = block.getXRefPathName().getValue();

        if (value != null && !value.contentEquals(""))

        {

            block.getXRefPathName().setValue("new file reference.dwg");

        }

    }

    if (entity.getHyperlink() == "https://products.aspose.com")

    {

        entity.setHyperlink("https://www.aspose.com");

    }

}