Aspose.CAD for Java 17.4 - Release Notes
Key | Summary | Category |
---|---|---|
CADJAVA-124 | Support DWF Format | Feature |
CADJAVA-128 | Support MLeader Entity for DWG format | Feature |
CADJAVA-123 | Converting DWG to PDF format is producing error | Enhancement |
CADJAVA-125 | Add support for DXF and DWG file formats in FileFormat enumeration. | Enhancement |
CADJAVA-126 | Converting DWG layers to PDF is producing incomplete text in the resultant PDF | Enhancement |
CADJAVA-127 | Converting DWG to PNG is producing incomplete image | Enhancement |
Added APIs:
Class com.aspose.cad.FileFormats.Dwf.DwfImage
Class com.aspose.cad.FileFormats.Dwf.DwfLoader
Class com.aspose.cad.FileFormats.Dwf.DwfZip
Class com.aspose.cad.FileFormats.Dwf.EPlotInterface.DwfEPlotPage
Class com.aspose.cad.FileFormats.Dwf.Whip.DwfResult
Class com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser
Class com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipPNGGroup4ImageFormat
Class com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser
Class com.aspose.cad.FileFormats.Dwf.Whip.MaterializeStage
Class com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfDrawingInfo
Class com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfFileHeuristics
Class com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfRendition
Class com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipColorMap
Class com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalBox
Class com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint
Class com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipTransform
Class com.aspose.cad.ImageOptions.DwfRasterizationOptions
Class com.aspose.cad.ImageOptions.DwfRasterizationOptions.CadRenderHandler
Field/Enum com.aspose.cad.FileFormat.DXFCadR010
Field/Enum com.aspose.cad.FileFormat.DXFCadR012
Field/Enum com.aspose.cad.FileFormat.DXFCadR014
Field/Enum com.aspose.cad.FileFormat.DXFCadR015
Field/Enum com.aspose.cad.FileFormat.DXFCadR021
Field/Enum com.aspose.cad.FileFormat.DXFCadR0221
Field/Enum com.aspose.cad.FileFormat.DXFCadR0222
Field/Enum com.aspose.cad.FileFormat.DXFCadR025
Field/Enum com.aspose.cad.FileFormat.DXFCadR026
Field/Enum com.aspose.cad.FileFormat.DXFCadR10
Field/Enum com.aspose.cad.FileFormat.DXFCadR11
Field/Enum com.aspose.cad.FileFormat.DXFCadR13
Field/Enum com.aspose.cad.FileFormat.DXFCadR14
Field/Enum com.aspose.cad.FileFormat.DXFCadR2000
Field/Enum com.aspose.cad.FileFormat.DXFCadR2004
Field/Enum com.aspose.cad.FileFormat.DXFCadR2007
Field/Enum com.aspose.cad.FileFormat.DXFCadR2010
Field/Enum com.aspose.cad.FileFormat.DXFCadR2013
Field/Enum com.aspose.cad.FileFormat.DXFCadR9
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.CorruptFileError
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.DecompressionTerminated
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.DWFPackageFormat
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.DWFVersionHigherThanToolkit
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.EndOfDWFOpcodeFound
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.EndOfFileError
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.FileAlreadyOpenError
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.FileCloseError
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.FileInconsistencyWarning
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.FileOpenError
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.FileWriteError
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.InternalError
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.MinorVersionWarning
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.NoFileOpenError
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.NotADWFFileError
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.OpcodeNotValidForThisObject
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.OutOfMemoryError
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.Success
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.ToolkitUsageError
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.Undefined
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.UnknownFileReadError
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.UnsupportedDWFExtensionError
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.UnsupportedDWFOpcode
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.UserRequestedAbort
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfResult.WaitingForData
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipPNGGroup4ImageFormat.Group4
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipPNGGroup4ImageFormat.Group4XMapped
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipPNGGroup4ImageFormat.PNG
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.MaterializeStage.EatingEndWhitespace
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.MaterializeStage.EatingInitialWhitespace
Field/Enum com.aspose.cad.FileFormats.Dwf.Whip.MaterializeStage.GatheringString
Field/Enum com.aspose.cad.ImageOptions.DwfRasterizationOptions.RenderResult
Method com.aspose.cad.FileFormats.Dwf.DwfImage.#ctor(com.aspose.cad.FileFormats.Dwf.EPlotInterface.DwfEPlotPage[])
Method com.aspose.cad.FileFormats.Dwf.DwfImage.CacheData
Method com.aspose.cad.FileFormats.Dwf.DwfImage.Resize(System.Int32,System.Int32,com.aspose.cad.ImageResizeSettings)
Method com.aspose.cad.FileFormats.Dwf.DwfImage.Resize(System.Int32,System.Int32,com.aspose.cad.ResizeType)
Method com.aspose.cad.FileFormats.Dwf.DwfImage.RotateFlip(com.aspose.cad.RotateFlipType)
Method com.aspose.cad.FileFormats.Dwf.DwfImage.SaveData(System.IO.Stream)
Method com.aspose.cad.FileFormats.Dwf.DwfImage.SetPalette(com.aspose.cad.IColorPalette,System.Boolean)
Method com.aspose.cad.FileFormats.Dwf.DwfLoader.#ctor
Method com.aspose.cad.FileFormats.Dwf.DwfLoader.CanLoad(com.aspose.cad.StreamContainer,com.aspose.cad.LoadOptions)
Method com.aspose.cad.FileFormats.Dwf.DwfLoader.Load(com.aspose.cad.StreamContainer,com.aspose.cad.LoadOptions)
Method com.aspose.cad.FileFormats.Dwf.DwfZip.#ctor(System.IO.Stream,System.String)
Method com.aspose.cad.FileFormats.Dwf.DwfZip.#ctor(System.String,System.String)
Method com.aspose.cad.FileFormats.Dwf.DwfZip.Extract
Method com.aspose.cad.FileFormats.Dwf.EPlotInterface.DwfEPlotPage.#ctor(System.String)
Method com.aspose.cad.FileFormats.Dwf.EPlotInterface.DwfEPlotPage.LoadDrawableResources(System.String)
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.#ctor(System.IO.Stream)
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.#ctor(System.String)
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.DecrementParenCount
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.DeUpdateCurrentPoint(com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint)
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.EatWhiteSpace
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.IncrementParenCount
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.NextIncarnation
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.Read(System.Int32)
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.ReadAsciiInt32
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.ReadColor
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.ReadCount
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.ReadDouble
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.ReadLogicalBox
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.ReadLogicalPoint
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.ReadLogicalPoints(System.Int32,System.Int32)
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.ReadString(System.Int32,System.Boolean)
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.Seek(System.Int64)
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.SkipPastMatchingParen(System.Int32)
Method com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.UpdateCurrentPoint(com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint)
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.DecrementParenCount
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.DeUpdateCurrentPoint(com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint)
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.EatWhiteSpace
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.IncrementParenCount
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.NextIncarnation
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.Read(System.Int32)
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.ReadAsciiInt32
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.ReadColor
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.ReadCount
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.ReadDouble
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.ReadLogicalBox
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.ReadLogicalPoint
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.ReadLogicalPoints(System.Int32,System.Int32)
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.ReadString(System.Int32,System.Boolean)
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.Seek(System.Int64)
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.SkipPastMatchingParen(System.Int32)
Method com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.UpdateCurrentPoint(com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint)
Method com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfDrawingInfo.#ctor
Method com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfFileHeuristics.#ctor
Method com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfRendition.#ctor(System.Int32)
Method com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipColorMap.#ctor(System.Int32)
Method com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipColorMap.GetDefaultPallete
Method com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalBox.#ctor
Method com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalBox.#ctor(com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint,com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint)
Method com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint.#ctor
Method com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint.#ctor(System.Int32,System.Int32)
Method com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipTransform.#ctor
Method com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipTransform.#ctor(com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint,System.Double,System.Double,System.Int64)
Method com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipTransform.setRotation(System.Int64)
Method com.aspose.cad.ImageOptions.DwfRasterizationOptions.#ctor
Property com.aspose.cad.FileFormats.Dwf.DwfImage.BitsPerPixel
Property com.aspose.cad.FileFormats.Dwf.DwfImage.Height
Property com.aspose.cad.FileFormats.Dwf.DwfImage.IsCached
Property com.aspose.cad.FileFormats.Dwf.DwfImage.Pages
Property com.aspose.cad.FileFormats.Dwf.DwfImage.Width
Property com.aspose.cad.FileFormats.Dwf.EPlotInterface.DwfEPlotPage.MaxPoint
Property com.aspose.cad.FileFormats.Dwf.EPlotInterface.DwfEPlotPage.MinPoint
Property com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.HaveReadFirstOpcode
Property com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.Heuristics
Property com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.ParenCount
Property com.aspose.cad.FileFormats.Dwf.Whip.DwfWhipParser.Rendition
Property com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.HaveReadFirstOpcode
Property com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.Heuristics
Property com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.ParenCount
Property com.aspose.cad.FileFormats.Dwf.Whip.IDwfWhipParser.Rendition
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfDrawingInfo.ColorMap
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfDrawingInfo.DecimalRevision
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfDrawingInfo.MajorRevision
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfDrawingInfo.MinorRevision
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfFileHeuristics.ShouldApplyTransform
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfFileHeuristics.Transform
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfFileHeuristics.W2dChannel
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfRendition.ColorMap
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfRendition.DrawingInfo
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipColorMap.Colors
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalBox.Max
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalBox.Min
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint.X
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipLogicalPoint.Y
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipTransform.Rotation
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipTransform.Translate
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipTransform.XScale
Property com.aspose.cad.FileFormats.Dwf.Whip.Objects.DwfWhipTransform.YScale
Property com.aspose.cad.ImageOptions.DwfRasterizationOptions.AutomaticLayoutsScaling
Property com.aspose.cad.ImageOptions.DwfRasterizationOptions.ContentAsBitmap
Property com.aspose.cad.ImageOptions.DwfRasterizationOptions.DrawType
Property com.aspose.cad.ImageOptions.DwfRasterizationOptions.GraphicsOptions
Property com.aspose.cad.ImageOptions.DwfRasterizationOptions.Layouts
Property com.aspose.cad.ImageOptions.DwfRasterizationOptions.NoScaling
Property com.aspose.cad.ImageOptions.DwfRasterizationOptions.TypeOfEntities
Usage examples
CADJAVA-124 Support DWF Format Export to BMP
String fileName = getFileFromDesktop("APFH Floor Plan.dwf");
com.aspose.cad.Image image = com.aspose.cad.Image.load(fileName);
{
BmpOptions bmpOptions = new BmpOptions();
DwfRasterizationOptions cadRasterizationOptions = new DwfRasterizationOptions();
bmpOptions.setVectorRasterizationOptions(cadRasterizationOptions);
cadRasterizationOptions.setCenterDrawing(true);
cadRasterizationOptions.setPageHeight(500);
cadRasterizationOptions.setPageWidth(500);
cadRasterizationOptions.setLayouts(new String[] { "Model" });
// export
String outPath = fileName + ".bmp";
image.save(outPath, bmpOptions);
}
CADJAVA-124 Support DWF Format Export to PDF
String fileName = getFileFromDesktop("APFH Floor Plan.dwf");
com.aspose.cad.Image image = com.aspose.cad.Image.load(fileName);
{
PdfOptions pdfOptions = new PdfOptions();
DwfRasterizationOptions cadRasterizationOptions = new DwfRasterizationOptions();
pdfOptions.setVectorRasterizationOptions(cadRasterizationOptions);
cadRasterizationOptions.setCenterDrawing(true);
cadRasterizationOptions.setPageHeight(500);
cadRasterizationOptions.setPageWidth(500);
cadRasterizationOptions.setLayouts(new String[] { "Model" });
// export
String outPath = fileName + ".pdf";
image.save(outPath, pdfOptions);
}
CADJAVA-125 Add support for DXF and DWG file formats in FileFormat enumeration. Difference of return value of Image.GetFileFormat method for DWG and DXF (DXF goes with DXF prefix)
String dxf = getDxfFile("AllEntities5.dxf");
String dwg = getDwgFile("APFH Floor Plan (DWG).dwg");
long dxfFormat = Image.getFileFormat(dxf); // com.aspose.cad.FileFormat.DXFCadR2010
long dwgFormat = Image.getFileFormat(dwg); // com.aspose.cad.FileFormat.CadR2004
CADJAVA-128 Support MLeader Entity for dwg format MLeader entity
String file = "file path";
Image image = Image.load(file);
{
// Test
CadImage cadImage = (CadImage)image;
Assert.areNotEqual(cadImage.getEntities().length, 0);
CadMLeader cadMLeader = (CadMLeader)cadImage.getEntities()[0];
Assert.areEqual(cadMLeader.getStyleDescription(), "Standard");
Assert.areEqual(cadMLeader.getLeaderStyleId(), "12E");
Assert.areEqual(cadMLeader.getArrowHeadId1(), "639");
Assert.areEqual(cadMLeader.getLeaderLineTypeID(), "14");
CadMLeaderContextData context = cadMLeader.getContextData();
Assert.areEqual(context.getArrowHeadSize(), 30.0, 0.1);
Assert.areEqual(context.getBasePoint().getX(), 481, 1);
Assert.areEqual(context.getContentScale(), 1.0, 0.01);
Assert.areEqual(context.getDefaultText().getValue(), "This is multileader with huge text\\P{\\H1.5x;6666666666666666666666666666\\P}bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
Assert.areEqual(context.hasMText(), true);
CadMLeaderNode mleaderNode = context.getLeaderNode();
Assert.areEqual(mleaderNode.getLastLeaderLinePoint().getX(), 473, 1);
CadMLeaderLine leaderLine = mleaderNode.getLeaderLine();
Assert.areEqual(leaderLine.getBreakEndPoint(), null);
Assert.areEqual(leaderLine.getBreakPointIndex().getValue(), 0);
Assert.areEqual(leaderLine.getBreakStartPoint(), null);
Assert.areEqual(leaderLine.getLeaderLineIndex().getValue(), 0);
Assert.areEqual(leaderLine.getLeaderPoints().size(), 4);
Assert.areEqual(mleaderNode.getBranchIndex(), 0);
Assert.areEqual(mleaderNode.getDogLegLength(), 8.0, 0.1);
Assert.areEqual(context.hasMText(), true);
Assert.areEqual(context.getTextAttachmentType().getValue(), 1);
Assert.areEqual(context.getTextBackgroundColor().getValue(), 18);
Assert.areEqual(context.getTextHeight(), 20.0, 0.1);
Assert.areEqual(context.getTextStyleID().getValue(), "11");
Assert.areEqual(context.getTextRotation().getValue(), 0.0, 0.01);
Assert.areEqual(cadMLeader.getArrowHeadId1(), "639");
Assert.areEqual(cadMLeader.getLeaderType(), 1);
Assert.areEqual(cadMLeader.getBlockContentColor(), 0);
Assert.areEqual(cadMLeader.getLeaderLineColor(), 0);
Assert.areEqual(cadMLeader.getTextHeight(), 1.0, 0.01);
}