Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324087

Summary: [General] Save as Image File not working for PDF
Product: [Modeling] Papyrus Reporter: Markus Lorenz <qsiaxoyn>
Component: CoreAssignee: Project Inbox <mdt-papyrus-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: ajpaverd, cletavernier, dalai, erwan.bousse, lobequadrat, papyrus-bugs, vladimir_schmidt
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Lorenz CLA 2010-08-31 09:40:02 EDT
Build Identifier: 20100617-1415

I tried to export a papyrus diagram as PDF, but it didn't work. The error message says:

"Copy Diagram to Image File could not be completed.

Reason
org.eclipse.gmf.runtime.draw2d.ui.render.internal.image.ImageRenderImage cannot be cast to
org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.SVGImage"

Papyrus version 0.7.0. Also tested on Windows 7 x86 with same Eclipse and Papyrus build.

Reproducible: Always

Steps to Reproduce:
1. Open Eclipse
2. Create Papyrus project (File | New | Papyrus Project)
3. Open model (double click model.di)
4. Create uml class diagram (right click model in model explorer | New Diagram | UML Class Diagram)
5. Create a class and move it into the class diagram (
6. Try to save as PDF (right click diagram | File | Save As Image File | Image Format: PDF)
Comment 1 Erwan Bousse CLA 2012-02-23 08:57:02 EST
I have this issue as well, on Windows 7 and Linux.
Comment 2 Andrew Paverd CLA 2013-04-05 09:20:13 EDT
I also have this issue on linux (Ubuntu 12.04 LTS, x86_64) using eclipse from the Ubuntu software repo and papyrus from the main eclipse update site.

eclipse version information
Version: 3.7.2
Build id: I20110613-1736

Papyrus version information
0.8.2.v201202150
Comment 3 Camille Letavernier CLA 2013-10-16 06:57:25 EDT
Cannot reproduce on the current version (0.10.1/Kepler, Windows 7)
Comment 4 dalai lama CLA 2015-03-19 04:12:43 EDT
Getting the same error:

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


eclipse.buildId=4.4.2.M20150204-1700
java.version=1.7.0_71
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_DE

with Papyrus 1.0.2.v201502181349
org.eclipse.gmf.runtime.draw2d.ui.render is 1.7.0.201408201453
org.eclipse.gmf.runtime.draw2d.ui.render.awt is 1.8.0.201408201453
Comment 5 Toni Siljamäki CLA 2015-03-19 05:21:20 EDT
So this one doesn't work on Luna.
It needs to be tested on Mars as well. (Windows and Linux)
Please reopen if needed.
Comment 6 Ralf Buschermoehle CLA 2015-07-20 04:21:44 EDT
I have the same problem on mars ... strange thing ... svg works ... and pdf produces this cast error.
Comment 7 Vladimir Schmidt CLA 2019-07-10 06:03:40 EDT
Are there any updates on this issue?
Still getting
"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"
on attempt to save image as pdf.