Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Save as image PDF Error
Save as image PDF Error [message #742475] Thu, 20 October 2011 14:25 Go to next message
Kevin Missing name is currently offline Kevin Missing name
Messages: 10
Registered: October 2009
Junior Member
Hi, i stumpled across a problem with the Save as image funtion in a
generated GMF Diagram. I know that there was a similar problem in
papyrus, a year ago, have someone suffert the same problem and is having
a solution for me?

When i try to save my diagram as a pdf, he throws me the following
exception:

java.lang.ClassCastException:
org.eclipse.gmf.runtime.draw2d.ui.render.internal.image.ImageRenderedImage
cannot be cast to
org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.SVGImage
at
org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.saveToOutputStream(CopyToImageUtil.java:529)
at
org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.saveToFile(CopyToImageUtil.java:513)
at
org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.copyToImage(CopyToImageUtil.java:378)
at
org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.copyToImage(CopyToImageUtil.java:305)
at
org.eclipse.gmf.runtime.diagram.ui.render.actions.CopyToImageAction$1.run(CopyToImageAction.java:260)
at
Re: Save as image PDF Error [message #742523 is a reply to message #742475] Thu, 20 October 2011 15:15 Go to previous messageGo to next message
Iban Ayestaran is currently offline Iban Ayestaran
Messages: 58
Registered: September 2011
Member
I also get the same error, so what I do is to save it as *.svg, open the svg whith a image editing software (in my case, Inkscape), and in Inkscape select File->SaveAs->pdf.
Re: Save as image PDF Error [message #742540 is a reply to message #742523] Thu, 20 October 2011 15:31 Go to previous messageGo to next message
Kevin Missing name is currently offline Kevin Missing name
Messages: 10
Registered: October 2009
Junior Member
Am 20.10.2011 17:15, schrieb Iban:
> I also get the same error, so what I do is to save it as *.svg, open the
> svg whith a image editing software (in my case, Inkscape), and in
> Inkscape select File->SaveAs->pdf.

Well, i can do that for myself...but i guess, when i tell that to a
customer, i won't buy our tool again ;).
Re: Save as image PDF Error [message #747691 is a reply to message #742475] Mon, 24 October 2011 08:17 Go to previous message
Mickael Istria is currently offline Mickael Istria
Messages: 765
Registered: July 2009
Location: Grenoble, France
Senior Member
Hi,

Please report this bug to https://bugs.eclipse.org/bugs/ . In the
category Modeling > GMP > GMF Runtime.

Thanks in advance.

On 20/10/2011 16:25, Kevin Barwich wrote:
> Hi, i stumpled across a problem with the Save as image funtion in a
> generated GMF Diagram. I know that there was a similar problem in
> papyrus, a year ago, have someone suffert the same problem and is having
> a solution for me?
>
> When i try to save my diagram as a pdf, he throws me the following
> exception:
>
> java.lang.ClassCastException:
> org.eclipse.gmf.runtime.draw2d.ui.render.internal.image.ImageRenderedImage
> cannot be cast to
> org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.SVGImage
> at
> org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.saveToOutputStream(CopyToImageUtil.java:529)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.saveToFile(CopyToImageUtil.java:513)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.copyToImage(CopyToImageUtil.java:378)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.render.util.CopyToImageUtil.copyToImage(CopyToImageUtil.java:305)
>
> at
> org.eclipse.gmf.runtime.diagram.ui.render.actions.CopyToImageAction$1.run(CopyToImageAction.java:260)
>
> at
>


--
http://mickaelistria.wordpress.com
http://twitter.com/#!/mickaelistria
http://www.petalslink.com
Previous Topic:Automating Creation of Eclipse product (package)
Next Topic:Call org.eclipse.gmf.xpand.ant/examples/gmfgen-run.xml
Goto Forum:
  


Current Time: Thu Oct 23 00:10:37 GMT 2014

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

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