We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDF Layout Line thickness

I have a dwg i am converting to PDF and for some reason the lines of the layouts are coming out thicker than the lines of the model space output. Demo solution at link below. Just run it and see the difference between page 1 and 2 of the PDF.

Test Code

Hello. The widths of the same lines are scaled to the different sizes of sheets. It looks that the real reason is that layout.PlotPaperSize values are zero. Probably, for such cases you may set up the size for layout pages to be the same as Model sheet.

Hi @Oleksii.Gorokhovatskyi
i set the plotpaper size of the layouts to be the same as the model space but the outcome was not as expected :slightly_smiling_face: The layouts came out as below:
image.png (19.9 KB)
Any other ideas?

Hi. Well, I measured the width of this line in PDF both for Model sheet and Layouts. It is 0.25 mm that corresponds to the default value, and these lines are set up to use default value.

You may try something like this:

For Each layer As CadTables.CadLayerTable In cadFile.Layers
       Console.WriteLine(layer.Name + " " + layer.LineWeight.ToString)
       layer.LineWeight = 0

This fragment iterates all layers and prints line width for each. If the value is -3 it means the default value 0.25 mm. Next line sets the lineweight to be the smallest possible value.

That gets a better result, thanks @Oleksii.Gorokhovatskyi

1 Like