Text in converted SVG to DXF file is displayed horizontally instead of vertically after Linearization

Hello,

We have an issue related to conversion of linearized SVG to DXF files.

For example, when we upload an SVG file and convert it into DXF using the code below, the linearized text for “TOOL1” does not display vertically as in the SVG file.

Could you please suggest an approach to tackle this issue while also preserving the font?

The related SVG, DXF file and simplex font are available in this attachment: relatedFiles.zip (151.7 KB)

Thank you,
Victor

private static byte[] Linearize(byte[] input)
{
    using (Stream stream = new MemoryStream(input))
    {
        using (CadImage cadImage = (CadImage)Aspose.CAD.Image.Load(stream))
        {
            CadRasterizationOptions cadRasterizationOptions = new CadRasterizationOptions
            {
                DrawType = CadDrawTypeMode.UseObjectColor,
                ShxFonts = new[]
                {
                    Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) + Path.DirectorySeparatorChar + "simplex.shx"
                }
            };

            var dxfOptions = new Aspose.CAD.ImageOptions.DxfOptions
            {
                VectorRasterizationOptions = cadRasterizationOptions,
                TextAsLines = true
            };

            using (MemoryStream outputStream = new MemoryStream())
            {
                cadImage.Save(outputStream, dxfOptions);

                return outputStream.ToArray();
            }
        }
    }
}

@Victor.Ionescu,
Hello.
It seems like this should be fixed on our side, we have created CADNET-9708 to investigate this.

1 Like

Hello,

It appears to be working from our side too by installing the latest version.

Thanks for your support!

@Victor.Ionescu,
happy to hear that problem is resolved :slight_smile: