2

A young person I know has made numerous images on an iOS app called Mandalas and the app allows her to save these as svg files. We then open these on my Mac and print them, only, some of these files (now nearly twenty) fail to import and when opened in finder the icon changes to a text document with these words: "This page contains the following errors:error on line 1 at column 1: Document is empty. Below is a rendering of the page up to the first error." There is nothing more on the page. We're extremely eager to fix these images as they exist in no other form. Has anyone else encountered this weirdness?

Here's a side-by-side comparison of a typical failing file and working one. It's enlargeable so you can see the code with a couple clicks: Code Comparison Here's what a failing and working icon looks like Icon Comparison

2
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – curious
    Jul 29 at 2:35
  • 1
    The failing one is clearly a json object describing an SVG, rather than an SVG file. So either they were exported improperly (might be a setting or something) or it's a bug in the program used to export. Either way, the exporter is probably not at fault, but there is very little you can do except re-exporting and/or contacting support for the original app.
    – PieBie
    Jul 29 at 7:23

2 Answers 2

4

An SVG is in essence just a text file, containing code which describes paths and their properties (fill, border, etc.)

So try opening the broken files in a simple text editor like Notepad. What do you see? Is there any code in there? The file should ideally start with <svg ....> and end with </svg> (where .... are optional attributes like width, height and viewbox).

The error "Document is empty" seems to suggest there is no code in the SVG. In which case there is no solution except te re-export the files from the app.


An alternative would be to use an online service like SVG Viewer. Just upload the file and see what's in there. You can edit the SVG inline and see the result instantly.

1
  • Thanks PieBie. SVG Viewer responds "Invalid SVG" and when I view the code in TextEditor I see it is indeed very different from the good ones, which came from the same app. Only difference at all in how the good and failing have been treated is in titling the file. Too many characters to paste the code here so what do you suggest. On another SE forum I went with enlargeable screenshots but they asked for text.
    – Pam
    Jul 28 at 19:17
0

My 2 cents.

First, see if you still can open the original files in the original application.

Second. If the icon changed on your mac, it seems you do not have a specific application to open SVG files. Many programs can read them, including almost any browser, but not all open them correctly. So, one option is to install Inkscape, which is, IMHO one of the programs that read and save them most reliably.

Then see if you can export it to another format before printing. You could export it to a High-resolution PNG. I do not know if the original program can.

1
  • Thanks, @Rafael. I can't open or import the failing files in the original application nor in any application at all and I've tried Inkscape, Photoshop, and Figma. The latter is the only app that displays the good files. They appear as black windows in all other apps including Inkscape and Photoshop. Have read this is not unusual but forget the reason. Rasterization, maybe?
    – Pam
    Jul 28 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.