Dimension label invisible in SVG export

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
slcasner
Junior Member
Posts: 21
Joined: Tue May 07, 2019 10:23 pm

Dimension label invisible in SVG export

Post by slcasner » Thu Aug 08, 2019 7:41 am

I have reduced the DXF file from https://qcad.org/rsforum/viewtopic.php? ... 322#p24286 to provide a simplified example of one problem. In the attached dims.dxf file there are two non-exploded dimensions. If the drawing is exported as SVG with Preserve Geometry not set, as in dims-arial.svg, then the labels are not visible when the SVG is viewed in Firefox. Looking at the SVG file, I see that the text is rendered as a very long <path> of Cubic Bézier Curves. That <path> contains no style parameter to set the stroke or fill color.

If the SVG is exported with Preserve Geometry set, as in dims-preserve.svg, then the text is output as a <text> object instead. In this case the text is rendered in black rather than the blue color specified for the layer containing the dimensions.

I would prefer to have text output as <text> objects because it reduces the complexity of the SVG file. Perhaps that could be controlled by the Application Preferences - Graphics View - Render Text as Text option? Or a similar option as part of the SVG export configuration.

This is with QCAD-Pro 3.23.0 on MacOS 10.14.4.
Attachments
dims-preserve.svg
(2.11 KiB) Downloaded 327 times
dims-arial.svg
(3.44 KiB) Downloaded 309 times
dims.dxf
(105.81 KiB) Downloaded 325 times

User avatar
ryancousins
Premier Member
Posts: 185
Joined: Thu Mar 19, 2020 3:47 am
Location: Michigan, USA

Re: Dimension label invisible in SVG export

Post by ryancousins » Sun Mar 14, 2021 9:35 pm

I'm bumping up this old post because I just realized I had the same issues and I wanted to confirm this is still normal behavior and there didn't appear to be any response to slcasner's post.

If I export an SVG, my dimension text does not export unless I choose to "preserve geometry". From looking through the forum, it sounds like QCAD can not export raw text so in order for that to be output in the SVG it needs to be changed to geometry? Is that accurate? One of the posts https://qcad.org/rsforum/viewtopic.php? ... try#p29618 made it sound like it was a preference and you could export it as text if you wanted?

QCAD 3.26.1
Win10 Pro
Attachments
Test File.svg
(2.59 KiB) Downloaded 88 times
Test File.dxf
(112.27 KiB) Downloaded 93 times

slcasner
Junior Member
Posts: 21
Joined: Tue May 07, 2019 10:23 pm

Re: Dimension label invisible in SVG export

Post by slcasner » Mon Mar 15, 2021 5:38 am

I have not heard anything else on this topic, but I have not pressed the issue.

User avatar
andrew
Site Admin
Posts: 7970
Joined: Fri Mar 30, 2007 6:07 am

Re: Dimension label invisible in SVG export

Post by andrew » Mon Mar 15, 2021 9:00 am

ryancousins: The label is exported as text, but without style. It is present in SVG, but invisible in viewers.

Bug report at:
https://www.qcad.org/bugtracker/index.p ... sk_id=2207

User avatar
ryancousins
Premier Member
Posts: 185
Joined: Thu Mar 19, 2020 3:47 am
Location: Michigan, USA

Re: Dimension label invisible in SVG export

Post by ryancousins » Mon Mar 15, 2021 9:27 am

Thanks Andrew!

Post Reply

Return to “QCAD Troubleshooting and Problems”