Example_graphic.zip (3.2 KB)
Thank you. I’ve attached a zip file containing the SVG file in question. (This editing window doesn’t accept .svg file uploads directly.)
The image shows a date range and country name at the bottom. This text needs to be dynamic and set programmatically. The rest of this image is a static template that was created in Adobe Illustrator. Notice that in the internal XML, Illustrator represented the static text as vector shapes.
I added text elements with id attributes to serve as placeholders for the dynamic text. I’m using Aspose.svg to find each of the three text elements and insert the desired text.
VB example for setting a passed-in country name:
Dim countryNameElement As SVGTextElement = DirectCast(document.GetElementById("countryName"), SVGTextElement)
countryNameElement.TextContent = countryName
Finally I use document.Save(filename) to save the final image file.
(1) This file LOOKS good and is what I want to present to the user.
(2) But, internally the dynamic text is readable in the XML text tags. I would like this text to be converted to vector shapes like the rest of the static text. This prevents casual users from opening and editing this file in a text editor (e.g. Notepad). A determined user would need to use Adobe Illustrator or similar tool.
(3) If the dynamic text could be converted to vector shapes on the server, we would not be limited to common fonts that all users can be expected to have. In this example I’m using Arial, but would like freedom to use other fonts that adhere to our brand guidelines.
Thoughts? Is there a different way I should be doing this?