Convert rtf to sag to be used as IMG in html - svg

I have been provided with some rtf files that are to be used for inline svgs. I want to reference the sag externally but when I use any rtf to svg converters it converts it into an sag image with the code.
See screenshot showing the svg after I have tried convert it from an rtf file.
Does anyone know how to convert an rtf file to an svgs that i can reference as an img src in my html?

You can simply copy the text from the rtf file and put it into code editor/notepad, and save with the .svg extension. If this is too much hassle (because you have many files) look for a tool that converts rtf to txt, and then change the extension to svg.

Related

how to convert kml file to pdf

I have downloaded a kml file from https://www.genesys-pgr.org/explore/map but I don't have a tool to support it. How can I convert the xml file to pdf or word file?
Converting a KML file to a PDF is not straightforward and the solution really depends on what you want to do with the PDF file. KML or Keyhole Markup Language is simply a collection of geospatial annotations on a map that can be opened in an application that supports that data format. KML itself is a shareable file format that can be emailed from one user to another to share places on the map.
If you just want to view the KML file recommend you download and install Google Earth Pro, which is freely provided by Google. There are other viewers for KML available.
One way to convert KML to PDF is the following steps:
Open the KML file with Google Earth Pro
Change the view on the map to view you want to save in the PDF file. For example, tilt the map and/or zoom on the map.
Next take a screenshot of the Google Earth map or select save image option in the menu to save the map view as a JPEG image.
Insert that JPEG image into a Word document and/or then save it as a PDF file.

Text-editing a draw.io file exported as SVG with embedded drawing

I customarily export draw.io drawings as SVG with the option to "include a copy of my diagram" selected. This enables me to display them in a SVG-capable browser, and then open and modify them further in draw.io.
I'd like to do some scripted editing of the SVG file, such as modifying the href of a link I've added to a shape, but generally anything. In my limited testing I've found that I can open one of these SVG files in a text editor, change the href, save, and still reopen the file both in a browser and in draw.io.
What worries me is the chunk of base-64 text inside the SVG file, which I assume is the embedded "copy of my diagram". Am I risking throwing the SVG out of synch with the embedded diagram, or is it safe to do this?
You are throwing the SVG out of synch with the embedded diagram. The base64 encoded text is just a GZIP compressed representation of the XML data. This example demonstrates how to uncompress/compress the XML: https://github.com/jgraph/drawio-tools/blob/master/tools/convert.html (the SVG output is that of the first page, ie the first diagram tag in the mxfile). You can see it in action at https://jgraph.github.io/drawio-tools/tools/convert.html
Finally, to link the SVG output to the XML data, there is a plugin that embeds the cell ID (and metadata) in the SVG output (see https://github.com/jgraph/drawio/blob/master/war/plugins/svgdata.js or https://www.draw.io?p=svgdata).

PDF images unscaled to PDF document using pdfrw/ReportLab

This question is very similar to PDF image in PDF document using ReportLab (Python), but I seem unable to adapt it to my needs:
I want to add vectorized images (available in SVG oder PDF format) to an A4 PDF output. The images must not get scaled! They should simply be placed from top to bottom with some vertical spacing and automatic page breaks.
No text or other content is required. Basically, I'm looking for a pdfnup solution. In the past, I have used pdflatex with a simple input file for the task, but this is no option for the target system.

What's an SVG image rendered as PNG?

There's an svg image of Alabama's state flag # http://en.wikipedia.org/wiki/File:Flag_of_Alabama.svg
The caption says "This image rendered as PNG in other sizes." I downloaded the 1,000-pixel size #
http://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Flag_of_Alabama.svg/1000px-Flag_of_Alabama.svg.png but it won't display on my web page. I opened it in Photoshop, copied it into a new window and saved it with a new file name, but it still doesn't display.
So I guess I was wrong when I thought "rendered as a PNG" means an image is a png. It's actually a SVG...with a .png extension?
Anyway, I just wondered what's going on here and what I need to do to download such images as pngs. Or is the only solution to take a screenshot?
The PNG file you linked to (the ".png" link) is not an SVG. It is definitely a PNG.
I don't know why it isn't displaying for you, but it has nothing to do with SVG.
To get the image as .svg just copy the source of the page (of the image) to an editor. Now save it as an .svg image

ImageMagick convert SVG with text and external fonts to SVG with shapes (outlines) with no external fonts

I'm looking to to use ImageMagick to convert an SVG file with text and external fonts to another svg without text, instead have them be shapes or outlines.
Basically, can ImageMagick do the equivalent of Illustrator's "Create Outlines" functions?
I can currently convert the svg to png and all the text and fonts render correctly, but I'm just looking to remove need for the person opening the svg to have the correct fonts installed on their computer.
I believe that your installation of ImageMagick needs to be configured with the the "--with-autotrace" switch and Autotrace needs to be installed. Then a simple conversion command should work:
convert text.png vector.svg
I doubt ImageMagick will do it. What you need to do is load the SVG into an editor like Inkscape. Select the text and then convert it using Path->Object to Path.
Then you can save it and you can distribute it without worrying about the user not having the fonts.

Resources