# SVG Importing Error

**URL:** <https://forum.inductiveautomation.com/t/svg-importing-error/75700>\
**Category:** Ignition\
**Created:** [June 29, 2023, 12:44pm UTC](https://forum.inductiveautomation.com/t/svg-importing-error/75700 "2023-06-29T12:44:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_Heintzleman](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Ryan\_Heintzleman](https://forum.inductiveautomation.com/u/Ryan_Heintzleman)\
**Post date:** [June 29, 2023, 12:44pm UTC](https://forum.inductiveautomation.com/t/svg-importing-error/75700/1 "2023-06-29T12:44:43Z")

</div>

I keep trying to drag and drop SVG Files into my Window, and I keep getting an 'Error Parsing SVG File' error message, with the details:

org.apache.batik.bridge.BridgeException: null:-1  
The URI "(Removed extremely long URI due to size, I can paste it back in if it's needed)"  
on element can't be opened because:  
URL data in unsupported format or corrupt  
at org.apache.batik.bridge.UserAgentAdapter.getBrokenLinkDocument(UserAgentAdapter.java:448)  
at org.apache.batik.bridge.SVGImageElementBridge.createRasterImageNode(SVGImageElementBridge.java:642)  
at org.apache.batik.bridge.SVGImageElementBridge.createImageGraphicsNode(SVGImageElementBridge.java:339)  
at org.apache.batik.bridge.SVGImageElementBridge.buildImageGraphicsNode(SVGImageElementBridge.java:179)  
at org.apache.batik.bridge.SVGImageElementBridge.createGraphicsNode(SVGImageElementBridge.java:121)  
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:213)  
at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)  
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219)  
at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)  
at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:82)  
at com.inductiveautomation.factorypmi.designer.workspace.DropHandler$SvgImporter.parseSvg(DropHandler.java:321)  
at com.inductiveautomation.factorypmi.designer.workspace.DropHandler$SvgImporter.run(DropHandler.java:336)  
at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)  
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)  
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)  
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)  
at java.base/java.security.AccessController.doPrivileged(Native Method)  
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)  
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)  
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

Ignition v8.1.27 (b2023042509)  
Java: Azul Systems, Inc. 11.0.18

I tried following 2 other threads I found about SVG Import errors (below), using Inkscape, simplifying the path, and saving as plain SVG... already tried that. I also went and downloaded the latest java package as recommended from the other thread.

> [@SVG Import Error](https://forum.inductiveautomation.com/t/svg-import-error/15791/5):
>
> I notice that your snippet has no colour??? It should have green and gray in some font…maybe the svg is messed up…

> [@Error importing SVG](https://forum.inductiveautomation.com/t/error-importing-svg/4214/4):
>
> Any more information regarding this? I have 7.4 I tried dragging and dropping also. I am starting to think that my issue is memory related or at least gpu related. My svg is about 7 megs. I tried to drag and drop and nothing has happened yet other than an hourglass that has not stoppped Any manual links for reading that are relavant to this topic? I would really like to make client apps that can zoom in on these graphics… I posted a while back and the response was that clients cannot zoom? I…

Any help would be appreciated!

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 29, 2023, 5:12pm UTC](https://forum.inductiveautomation.com/t/svg-importing-error/75700/2 "2023-06-29T17:12:26Z")

</div>

> [@Ryan\_Heintzleman](#):
>
> URL data in unsupported format or corrupt  
> at org.apache.batik.bridge.UserAgentAdapter.getBrokenLinkDocument(UserAgentAdapter.java:448)  
> at org.apache.batik.bridge.SVGImageElementBridge.createRasterImageNode(SVGImageElementBridge.java:642)

That's a code path that doesn't bode well for your SVG(s).

Background: SVG (Scalable _Vector_ Graphics) have the capability to embed arbitrary _raster_ images inside of them. Raster images do _none_ of the things that make SVGs powerful - because they're just regular old images. So whatever your source of these SVGs is, they're (unfortunately) probably not going to be very good at doing the SVG things you want them do anyways. It might be easier to export into a raster format and just drop those raster images into image management. Or see if you can export into a more useful SVG form from whatever the source tool is.

Are you able to share the SVG/SVGs that are causing the issue?

---

<div class="post-metadata">

**Author:** ![Ryan\_Heintzleman](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Ryan\_Heintzleman](https://forum.inductiveautomation.com/u/Ryan_Heintzleman)\
**Post date:** [June 29, 2023, 5:44pm UTC](https://forum.inductiveautomation.com/t/svg-importing-error/75700/3 "2023-06-29T17:44:24Z")

</div>

Thank you for your input! I have an SVG Test file I was using that I made random blocks in, and I happened to throw an exported image in it (Test)... With what you said in mind, I deleted that image block, and sure enough it worked (Test3) right away.

For my project I don't know if I'll need to include image files as part of the SVG, it was more of a happenstance thing. If I do need something similar in the future, would you recommend making them as raster images, or something else? The goal is to turn on layers progressively to show assembly progress as part of a work instruction.

![SVGTest](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/1/e1bdeadc4c1766620509a76e8c5dafb92d836c99.svg)  
 ![SVGTest3](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/4/24b996d0367bf854904f3a73bd6e5b9e28c7ba3b.svg)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 29, 2023, 5:47pm UTC](https://forum.inductiveautomation.com/t/svg-importing-error/75700/4 "2023-06-29T17:47:45Z")

</div>

> [@Ryan\_Heintzleman](#):
>
> or something else?

Reference a separate image by URL. If you need to host lots of images, or dynamically update them, you might like my [Blob Server module](https://forum.inductiveautomation.com/t/automation-professionals-blob-server-module/57970).

---

<div class="post-metadata">

**Author:** ![Ryan\_Heintzleman](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Ryan\_Heintzleman](https://forum.inductiveautomation.com/u/Ryan_Heintzleman)\
**Post date:** [June 29, 2023, 7:36pm UTC](https://forum.inductiveautomation.com/t/svg-importing-error/75700/5 "2023-06-29T19:36:57Z")

</div>

Hi Phil, thank you for the suggestion of a new resource. I read through your post and it seems like a good tool. We'll see if I have use for it, as I'm only testing and don't know if I'll need that application. I'll definitely keep it in mind!

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 30, 2023, 12:32am UTC](https://forum.inductiveautomation.com/t/svg-importing-error/75700/6 "2023-06-30T00:32:39Z")

</div>

Regarding using raster images inside of SVGs, I would _strongly_ refrain, since you then defeat the S (Scalable) and the V (Vector) in SVG and you're simply left with the G 😕 . I would only ever use vector shapes within an SVG

---

<div class="post-metadata">

**Author:** ![Ryan\_Heintzleman](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Ryan\_Heintzleman](https://forum.inductiveautomation.com/u/Ryan_Heintzleman)\
**Post date:** [June 30, 2023, 12:08pm UTC](https://forum.inductiveautomation.com/t/svg-importing-error/75700/7 "2023-06-30T12:08:35Z")

</div>

That makes sense. The main reason I'm looking at SVGs is because you can have layers in them to turn on / off, highlight, etc. One of the ideas I'm looking at is exporting Creo CAD files into SVG or another format that has that capability. As mentioned in an earlier post, I want to use the turning on and off layers as part of work instructions to show the assembly progressing. If using regular images as an SVG isn't an option / ideal, is there another file type that you'd recommend that accomplishes the same goal?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [June 30, 2023, 12:49pm UTC](https://forum.inductiveautomation.com/t/svg-importing-error/75700/8 "2023-06-30T12:49:49Z")

</div>

this works for me, just gotta import the images seperatly  
or am i missing something?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/9/e98d3dea483ab205c8a79cc049f1a08ecca24020.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 30, 2023, 1:18pm UTC](https://forum.inductiveautomation.com/t/svg-importing-error/75700/9 "2023-06-30T13:18:44Z")

</div>

OP is in Vision, not Perspective, I'm pretty confident.

---

<div class="post-metadata">

**Author:** ![Ryan\_Heintzleman](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@Ryan\_Heintzleman](https://forum.inductiveautomation.com/u/Ryan_Heintzleman)\
**Post date:** [June 30, 2023, 1:21pm UTC](https://forum.inductiveautomation.com/t/svg-importing-error/75700/10 "2023-06-30T13:21:45Z")

</div>

Correct. I'm going through Inductive University, and was just finishing up the Vision section. I'm just about to start the Perspective section.
