Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Problem with SVG(SVG error)
Problem with SVG [message #1837035] Thu, 21 January 2021 09:33 Go to next message
Mariem Makni is currently offline Mariem MakniFriend
Messages: 46
Registered: February 2013
Member
Hi all,

I use batik and canvas class to load and display an svg image .
Here my java code and please find attached the xml code of my svg image
.
mainFrame = new JFrame("Task Graph");
mainFrame.setSize(800,600);

mainFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
mainFrame.setVisible(true);

Container pane = mainFrame.getContentPane();
pane.setLayout(new BorderLayout());
JSVGCanvas canvas = new JSVGCanvas();
canvas.setURI("output.xml");
pane.add(canvas, BorderLayout.CENTER);
pane.setVisible(true);

My problem is when I run the code:, I get this error:

"svg error: content is not allowed in prolog.

Could you help me please!!
Thank you in advance
  • Attachment: output.xml
    (Size: 4.81KB, Downloaded 93 times)
Re: Problem with SVG [message #1837116 is a reply to message #1837035] Fri, 22 January 2021 11:22 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi Mariem,

I'm not a SVG expert, but it seems that your xml file is somehow incorrect. From the error I think it might be the tags 'width="1967pt" height="76pt"
viewBox="0.00 0.00 1967.04 76.00"' within the svg tag, not sure if that is allowed.

Maybe you should reach out in a Batik or SVG specific group, this forum is mainly about Graphiti, we just use it as one export possibility.

Michael
Re: Problem with SVG [message #1837117 is a reply to message #1837116] Fri, 22 January 2021 11:48 Go to previous message
Mariem Makni is currently offline Mariem MakniFriend
Messages: 46
Registered: February 2013
Member
HI Michael,

Thank you for your response.
OK I will try with the other specific groups.

Mariem

[Updated on: Fri, 22 January 2021 11:49]

Report message to a moderator

Previous Topic:Detecting boundaries of the target container
Next Topic:delete
Goto Forum:
  


Current Time: Sat Oct 05 06:52:42 GMT 2024

Powered by FUDForum. Page generated in 0.03972 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top