Free Support Forum -

Dimensions Not Showing up in PDF

I’m attempting to use CAD to convert a dxf file to PDF. The trouble is that my dimension lines are not showing up. I’m using NetDxf to generate the dxf file and using the LinearDimension class from that library. When I open the Dxf file that my code generates, the dimension lines show in CAD as Rotated Dimensions, which I see that Aspose CAD supports. After converting to PDF they do not show up however.

I’m wondering what I’m doing wrong. Attached is a screenshot sample Dxf that my code generates and that I’m trying to convert to a PDF with Aspose.
dim.png (78.5 KB)
Thank you


Can you please share the source DXF file along with generated output and used sample cod for further investigation on our end. I also request you to please try using latest Aspose.CAD for .NET 20.12, if you are using any older version.

Sure, please find the Dxf file attached within the .zip archive.

I also tried uploading this Dxf to one of your online converters and noticed that the dimensions did not show in that output PDF either.

Also attached in the .zip, please find a screenshot indicating that we have version 20.9.1 installed and are only able to upgrade to 20.11.0. I’m not sure how to get it to 20.12 as you describe. We are using NuGet package manager. Dxf and Version (40.9 KB)

Finally, here’s the C# code that creates the dimensions that are not showing up once the PDF converts.

public static LinearDimension Measure(Point p1, Point p2, int rotation = 0)
        DimensionStyle style = new DimensionStyle("Default Style");
        style.TextHeight = 2.0;
        style.TextInsideAlign = true;
        style.DimLineLineweight = Lineweight.W15;
        style.TextHorizontalPlacement = DimensionStyleTextHorizontalPlacement.AtExtLines1;
        //AlignedDimension dim = new AlignedDimension(new Vector2(p1.X, p1.Y), new Vector2(p2.X, p2.Y), 2.5, style);
        var dimension = new LinearDimension(new Vector2(p1.X, p1.Y), new Vector2(p2.X, p2.Y), 2.5, rotation, style);
        return dimension;


Can you please share the working example rather only a method for dimension that I may use to add in our issue tracking system for investigation as it seems to be an issue related to API.

Please find a sample application at the link below. It uses the same packages and versions as our production application.

It simply produces a LwPolyline and measures a side of it using a LinearDimension. You’ll see that the original Dxf contains the LwPolyline and LinearDimension, but once converted to PDF using Aspose, the LinearDimension is lost.

You’ll notice that if you upload the generated .Dxf document to an Aspose online converter, the dimension line is omitted as well.

Thank you!


Appreciate your cooperation and I have created a ticket with ID CADNET-1305 in our issue tracking system to further 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.

Excellent. Thank you!


We expect to resolve this issue in Aspose.CAD for .NET 20.2 and we will share notification with you as soon as the issue will be fixed.

Thanks for the update. Do you have any kind of date for when this will be available? My team would like an ETA.


The concerned issue is in progress at the moment and we request for your patience. We will share the updates with you as soon as the issue will be addressed.