We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Getting exception when trying to insert EMF in presentation

/Hi

Does Aspose Slides support EMFs? I am using Aspose Slider v17.9.1 and getting an exception when trying to insert an EMF in my presentation.

When I run my code (which I uploaded here), I get the following.

“C:\Program Files\Java\jdk1.8.0_111\bin\java” -Didea.launcher.port=7533 “-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.3\bin” -Dfile.encoding=UTF-8 -classpath “C:\Program Files\Java\jdk1.8.0_111\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\rt.jar;C:\Users\PatrickLucas\Dropbox\Projects\svgtest\target\classes;C:\Users\PatrickLucas.m2\repository\com\aspose\aspose-slides\17.9.1\aspose-slides-17.9.1-jdk16.jar;C:\Users\PatrickLucas.m2\repository\org\bouncycastle\bcprov-jdk15on\1.54\bcprov-jdk15on-1.54.jar;C:\Users\PatrickLucas.m2\repository\org\aioobe\cloudconvert\client\1.1\client-1.1.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\jersey\core\jersey-client\2.10\jersey-client-2.10.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\jersey\core\jersey-common\2.10\jersey-common-2.10.jar;C:\Users\PatrickLucas.m2\repository\javax\annotation\javax.annotation-api\1.2\javax.annotation-api-1.2.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\jersey\bundles\repackaged\jersey-guava\2.10\jersey-guava-2.10.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\hk2\osgi-resource-locator\1.0.1\osgi-resource-locator-1.0.1.jar;C:\Users\PatrickLucas.m2\repository\javax\ws\rs\javax.ws.rs-api\2.0\javax.ws.rs-api-2.0.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\hk2\hk2-api\2.3.0-b05\hk2-api-2.3.0-b05.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\hk2\hk2-utils\2.3.0-b05\hk2-utils-2.3.0-b05.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\hk2\external\aopalliance-repackaged\2.3.0-b05\aopalliance-repackaged-2.3.0-b05.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\hk2\external\javax.inject\2.3.0-b05\javax.inject-2.3.0-b05.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\hk2\hk2-locator\2.3.0-b05\hk2-locator-2.3.0-b05.jar;C:\Users\PatrickLucas.m2\repository\org\javassist\javassist\3.18.1-GA\javassist-3.18.1-GA.jar;C:\Users\PatrickLucas.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.4.0\jackson-databind-2.4.0.jar;C:\Users\PatrickLucas.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.4.0\jackson-annotations-2.4.0.jar;C:\Users\PatrickLucas.m2\repository\com\fasterxml\jackson\core\jackson-core\2.4.0\jackson-core-2.4.0.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\jersey\media\jersey-media-json-jackson\2.10\jersey-media-json-jackson-2.10.jar;C:\Users\PatrickLucas.m2\repository\com\fasterxml\jackson\jaxrs\jackson-jaxrs-base\2.3.2\jackson-jaxrs-base-2.3.2.jar;C:\Users\PatrickLucas.m2\repository\com\fasterxml\jackson\jaxrs\jackson-jaxrs-json-provider\2.3.2\jackson-jaxrs-json-provider-2.3.2.jar;C:\Users\PatrickLucas.m2\repository\com\fasterxml\jackson\module\jackson-module-jaxb-annotations\2.3.2\jackson-module-jaxb-annotations-2.3.2.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\jersey\media\jersey-media-multipart\2.10\jersey-media-multipart-2.10.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\jersey\core\jersey-server\2.10\jersey-server-2.10.jar;C:\Users\PatrickLucas.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\PatrickLucas.m2\repository\org\jvnet\mimepull\mimepull\1.9.3\mimepull-1.9.3.jar;C:\Users\PatrickLucas.m2\repository\commons-io\commons-io\1.3.2\commons-io-1.3.2.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.3\lib\idea_rt.jar” com.intellij.rt.execution.application.AppMain Main
class com.aspose.slides.exceptions.ArgumentException: Error reading EMF metafile. —> class com.aspose.slides.internal.es.if: Error reading EMF metafile. —> class com.aspose.slides.internal.es.if: Error reading Emf metafile —> java.io.IOException: Error in EMREOF record
— End of inner exception stack trace —
com.aspose.slides.internal.ed.if.do(Unknown Source)
com.aspose.slides.internal.d9.do.if(Unknown Source)
com.aspose.slides.internal.d9.do.(Unknown Source)
com.aspose.slides.internal.d9.for.do(Unknown Source)
com.aspose.slides.internal.de.this.(Unknown Source)
com.aspose.slides.internal.jq.super.do(Unknown Source)
com.aspose.slides.ImageCollection.do(Unknown Source)
com.aspose.slides.ImageCollection.addImage(Unknown Source)
Main.addToSlide(Main.java:23)
Main.exportToEMF(Main.java:38)
Main.main(Main.java:29)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
— End of inner exception stack trace —
com.aspose.slides.internal.d9.for.do(Unknown Source)
com.aspose.slides.internal.de.this.(Unknown Source)
com.aspose.slides.internal.jq.super.do(Unknown Source)
com.aspose.slides.ImageCollection.do(Unknown Source)
com.aspose.slides.ImageCollection.addImage(Unknown Source)
Main.addToSlide(Main.java:23)
Main.exportToEMF(Main.java:38)
Main.main(Main.java:29)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
— End of inner exception stack trace —
com.aspose.slides.internal.de.this.(Unknown Source)
com.aspose.slides.internal.jq.super.do(Unknown Source)
com.aspose.slides.ImageCollection.do(Unknown Source)
com.aspose.slides.ImageCollection.addImage(Unknown Source)
Main.addToSlide(Main.java:23)
Main.exportToEMF(Main.java:38)
Main.main(Main.java:29)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
at com.aspose.slides.internal.de.this.(Unknown Source)
at com.aspose.slides.internal.jq.super.do(Unknown Source)
at com.aspose.slides.ImageCollection.do(Unknown Source)
at com.aspose.slides.ImageCollection.addImage(Unknown Source)
at Main.addToSlide(Main.java:23)
at Main.exportToEMF(Main.java:38)
at Main.main(Main.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: class com.aspose.slides.internal.es.if: Error reading EMF metafile. —> class com.aspose.slides.internal.es.if: Error reading Emf metafile —> java.io.IOException: Error in EMREOF record
— End of inner exception stack trace —
com.aspose.slides.internal.ed.if.do(Unknown Source)
com.aspose.slides.internal.d9.do.if(Unknown Source)
com.aspose.slides.internal.d9.do.(Unknown Source)
com.aspose.slides.internal.d9.for.do(Unknown Source)
com.aspose.slides.internal.de.this.(Unknown Source)
com.aspose.slides.internal.jq.super.do(Unknown Source)
com.aspose.slides.ImageCollection.do(Unknown Source)
com.aspose.slides.ImageCollection.addImage(Unknown Source)
Main.addToSlide(Main.java:23)
Main.exportToEMF(Main.java:38)
Main.main(Main.java:29)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
— End of inner exception stack trace —
com.aspose.slides.internal.d9.for.do(Unknown Source)
com.aspose.slides.internal.de.this.(Unknown Source)
com.aspose.slides.internal.jq.super.do(Unknown Source)
com.aspose.slides.ImageCollection.do(Unknown Source)
com.aspose.slides.ImageCollection.addImage(Unknown Source)
Main.addToSlide(Main.java:23)
Main.exportToEMF(Main.java:38)
Main.main(Main.java:29)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
at com.aspose.slides.internal.d9.for.do(Unknown Source)
… 12 more
Caused by: class com.aspose.slides.internal.es.if: Error reading Emf metafile —> java.io.IOException: Error in EMREOF record
— End of inner exception stack trace —
com.aspose.slides.internal.ed.if.do(Unknown Source)
com.aspose.slides.internal.d9.do.if(Unknown Source)
com.aspose.slides.internal.d9.do.(Unknown Source)
com.aspose.slides.internal.d9.for.do(Unknown Source)
com.aspose.slides.internal.de.this.(Unknown Source)
com.aspose.slides.internal.jq.super.do(Unknown Source)
com.aspose.slides.ImageCollection.do(Unknown Source)
com.aspose.slides.ImageCollection.addImage(Unknown Source)
Main.addToSlide(Main.java:23)
Main.exportToEMF(Main.java:38)
Main.main(Main.java:29)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
at com.aspose.slides.internal.ed.if.do(Unknown Source)
at com.aspose.slides.internal.d9.do.if(Unknown Source)
at com.aspose.slides.internal.d9.do.(Unknown Source)
… 13 more
Caused by: java.io.IOException: Error in EMREOF record
at com.aspose.slides.internal.el.do.do(Unknown Source)
… 16 more

Process finished with exit code 0

“C:\Program Files\Java\jdk1.8.0_111\bin\java” -Didea.launcher.port=7533 “-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.3\bin” -Dfile.encoding=UTF-8 -classpath “C:\Program Files\Java\jdk1.8.0_111\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\rt.jar;C:\Users\PatrickLucas\Dropbox\Projects\svgtest\target\classes;C:\Users\PatrickLucas.m2\repository\com\aspose\aspose-slides\17.9.1\aspose-slides-17.9.1-jdk16.jar;C:\Users\PatrickLucas.m2\repository\org\bouncycastle\bcprov-jdk15on\1.54\bcprov-jdk15on-1.54.jar;C:\Users\PatrickLucas.m2\repository\org\aioobe\cloudconvert\client\1.1\client-1.1.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\jersey\core\jersey-client\2.10\jersey-client-2.10.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\jersey\core\jersey-common\2.10\jersey-common-2.10.jar;C:\Users\PatrickLucas.m2\repository\javax\annotation\javax.annotation-api\1.2\javax.annotation-api-1.2.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\jersey\bundles\repackaged\jersey-guava\2.10\jersey-guava-2.10.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\hk2\osgi-resource-locator\1.0.1\osgi-resource-locator-1.0.1.jar;C:\Users\PatrickLucas.m2\repository\javax\ws\rs\javax.ws.rs-api\2.0\javax.ws.rs-api-2.0.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\hk2\hk2-api\2.3.0-b05\hk2-api-2.3.0-b05.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\hk2\hk2-utils\2.3.0-b05\hk2-utils-2.3.0-b05.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\hk2\external\aopalliance-repackaged\2.3.0-b05\aopalliance-repackaged-2.3.0-b05.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\hk2\external\javax.inject\2.3.0-b05\javax.inject-2.3.0-b05.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\hk2\hk2-locator\2.3.0-b05\hk2-locator-2.3.0-b05.jar;C:\Users\PatrickLucas.m2\repository\org\javassist\javassist\3.18.1-GA\javassist-3.18.1-GA.jar;C:\Users\PatrickLucas.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.4.0\jackson-databind-2.4.0.jar;C:\Users\PatrickLucas.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.4.0\jackson-annotations-2.4.0.jar;C:\Users\PatrickLucas.m2\repository\com\fasterxml\jackson\core\jackson-core\2.4.0\jackson-core-2.4.0.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\jersey\media\jersey-media-json-jackson\2.10\jersey-media-json-jackson-2.10.jar;C:\Users\PatrickLucas.m2\repository\com\fasterxml\jackson\jaxrs\jackson-jaxrs-base\2.3.2\jackson-jaxrs-base-2.3.2.jar;C:\Users\PatrickLucas.m2\repository\com\fasterxml\jackson\jaxrs\jackson-jaxrs-json-provider\2.3.2\jackson-jaxrs-json-provider-2.3.2.jar;C:\Users\PatrickLucas.m2\repository\com\fasterxml\jackson\module\jackson-module-jaxb-annotations\2.3.2\jackson-module-jaxb-annotations-2.3.2.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\jersey\media\jersey-media-multipart\2.10\jersey-media-multipart-2.10.jar;C:\Users\PatrickLucas.m2\repository\org\glassfish\jersey\core\jersey-server\2.10\jersey-server-2.10.jar;C:\Users\PatrickLucas.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\PatrickLucas.m2\repository\org\jvnet\mimepull\mimepull\1.9.3\mimepull-1.9.3.jar;C:\Users\PatrickLucas.m2\repository\commons-io\commons-io\1.3.2\commons-io-1.3.2.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.3\lib\idea_rt.jar” com.intellij.rt.execution.application.AppMain Main
class com.aspose.slides.exceptions.ArgumentException: Error reading EMF metafile. —> class com.aspose.slides.internal.es.if: Error reading EMF metafile. —> class com.aspose.slides.internal.es.if: Error reading Emf metafile —> java.io.IOException: Error in EMREOF record
— End of inner exception stack trace —
com.aspose.slides.internal.ed.if.do(Unknown Source)
com.aspose.slides.internal.d9.do.if(Unknown Source)
com.aspose.slides.internal.d9.do.(Unknown Source)
com.aspose.slides.internal.d9.for.do(Unknown Source)
com.aspose.slides.internal.de.this.(Unknown Source)
com.aspose.slides.internal.jq.super.do(Unknown Source)
com.aspose.slides.ImageCollection.do(Unknown Source)
com.aspose.slides.ImageCollection.addImage(Unknown Source)
Main.addToSlide(Main.java:23)
Main.exportToEMF(Main.java:38)
Main.main(Main.java:29)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
— End of inner exception stack trace —
com.aspose.slides.internal.d9.for.do(Unknown Source)
com.aspose.slides.internal.de.this.(Unknown Source)
com.aspose.slides.internal.jq.super.do(Unknown Source)
com.aspose.slides.ImageCollection.do(Unknown Source)
com.aspose.slides.ImageCollection.addImage(Unknown Source)
Main.addToSlide(Main.java:23)
Main.exportToEMF(Main.java:38)
Main.main(Main.java:29)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
— End of inner exception stack trace —
com.aspose.slides.internal.de.this.(Unknown Source)
com.aspose.slides.internal.jq.super.do(Unknown Source)
com.aspose.slides.ImageCollection.do(Unknown Source)
com.aspose.slides.ImageCollection.addImage(Unknown Source)
Main.addToSlide(Main.java:23)
Main.exportToEMF(Main.java:38)
Main.main(Main.java:29)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
at com.aspose.slides.internal.de.this.(Unknown Source)
at com.aspose.slides.internal.jq.super.do(Unknown Source)
at com.aspose.slides.ImageCollection.do(Unknown Source)
at com.aspose.slides.ImageCollection.addImage(Unknown Source)
at Main.addToSlide(Main.java:23)
at Main.exportToEMF(Main.java:38)
at Main.main(Main.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: class com.aspose.slides.internal.es.if: Error reading EMF metafile. —> class com.aspose.slides.internal.es.if: Error reading Emf metafile —> java.io.IOException: Error in EMREOF record
— End of inner exception stack trace —
com.aspose.slides.internal.ed.if.do(Unknown Source)
com.aspose.slides.internal.d9.do.if(Unknown Source)
com.aspose.slides.internal.d9.do.(Unknown Source)
com.aspose.slides.internal.d9.for.do(Unknown Source)
com.aspose.slides.internal.de.this.(Unknown Source)
com.aspose.slides.internal.jq.super.do(Unknown Source)
com.aspose.slides.ImageCollection.do(Unknown Source)
com.aspose.slides.ImageCollection.addImage(Unknown Source)
Main.addToSlide(Main.java:23)
Main.exportToEMF(Main.java:38)
Main.main(Main.java:29)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
— End of inner exception stack trace —
com.aspose.slides.internal.d9.for.do(Unknown Source)
com.aspose.slides.internal.de.this.(Unknown Source)
com.aspose.slides.internal.jq.super.do(Unknown Source)
com.aspose.slides.ImageCollection.do(Unknown Source)
com.aspose.slides.ImageCollection.addImage(Unknown Source)
Main.addToSlide(Main.java:23)
Main.exportToEMF(Main.java:38)
Main.main(Main.java:29)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
at com.aspose.slides.internal.d9.for.do(Unknown Source)
… 12 more
Caused by: class com.aspose.slides.internal.es.if: Error reading Emf metafile —> java.io.IOException: Error in EMREOF record
— End of inner exception stack trace —
com.aspose.slides.internal.ed.if.do(Unknown Source)
com.aspose.slides.internal.d9.do.if(Unknown Source)
com.aspose.slides.internal.d9.do.(Unknown Source)
com.aspose.slides.internal.d9.for.do(Unknown Source)
com.aspose.slides.internal.de.this.(Unknown Source)
com.aspose.slides.internal.jq.super.do(Unknown Source)
com.aspose.slides.ImageCollection.do(Unknown Source)
com.aspose.slides.ImageCollection.addImage(Unknown Source)
Main.addToSlide(Main.java:23)
Main.exportToEMF(Main.java:38)
Main.main(Main.java:29)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
at com.aspose.slides.internal.ed.if.do(Unknown Source)
at com.aspose.slides.internal.d9.do.if(Unknown Source)
at com.aspose.slides.internal.d9.do.(Unknown Source)
… 13 more
Caused by: java.io.IOException: Error in EMREOF record
at com.aspose.slides.internal.el.do.do(Unknown Source)
… 16 more

Process finished with exit code 0

I know the EMF I am trying to insert is valid as I can insert it manually into a PPT presentation. I also uploaded the file for reference.

All the best

Patrick

@Paddynski,

I have observed your comments. I like to inform that Aspose.Slides support EMF format. Can you please share sample files and source code to reproduce issue.

Please see sample code and image attached.

Upload.zip (98.5 KB)

@Paddynski,

I have worked with source code and file shared by you using Aspose.Slides for Java 17.9 and have been able to observe the issue. A ticket with ID SLIDESJAVA-36648 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with issue so that you may be automatically notified once issue will be fixed.

Thank you. Please let me know how I can track this ticket.

@Paddynski,

I have observed your comments. I like to inform that you will be automatically notified once issue will be fixed. Also you can check issue status on this thread.

Where are we with this?

Can Aspose Slides handle inserting PDFs into presentations?

@Paddynski,

You can add PDF in presentation as OLE object frame. Please visit documentation link, Adding OLE frame inside slide for your convenience.

The issues you have found earlier (filed as SLIDESJAVA-36648) have been fixed in this update.