Environment:
aspose slides 7.7.0
java version "1.7.0_51"
Java™ SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot™ 64-Bit Server VM (build 24.51-b03, mixed mode)
Problem description:
I tried to convert document from the attachment to pdf with the following code:
protected ByteArrayOutputStream getConvertedContent(InputStream sourceContent) throws Exception {
Presentation doc = new Presentation(sourceContent);
ByteArrayOutputStream pdfStream = new ByteArrayOutputStream();
doc.save(pdfStream, SaveFormat.Pdf);
return pdfStream;
}
I’ve got:
java.lang.VerifyError: Bad return type
Exception Details:
Location:
com/aspose/slides/pf4dd765c/pf4dd765c/pbdb106a0/pa2137a2a/a.char(Lcom/aspose/slides/pf4dd765c/pbdb106a0/cd;)Ljavax/imageio/ImageWriter; @37: areturn
Reason:
Type ‘com/aspose/ms/imagecodecs/png/i’ (current frame, stack[0]) is not assignable to ‘javax/imageio/ImageWriter’ (from method signature)
Current Frame:
bci: @37
flags: { }
locals: { ‘com/aspose/slides/pf4dd765c/pbdb106a0/cd’ }
stack: { ‘com/aspose/ms/imagecodecs/png/i’ }
Bytecode:
0000000: b200 912a b600 c799 000c bb00 4759 01b7
0000010: 00b5 b0b2 008a 2ab6 00c7 9900 0cbb 004f
0000020: 5901 b700 bdb0 b200 9a2a b600 c799 000c
0000030: bb00 4d59 01b7 00bb b0b2 0098 2ab6 00c7
0000040: 9900 0cbb 0049 5901 b700 b7b0 b200 a92a
0000050: b600 c799 000c bb00 5159 01b7 00bf b0b2
0000060: 008b 2ab6 00c7 9900 0cbb 004b 5901 b700
0000070: b9b0 01b0
Stackmap Table:
same_frame(@19)
same_frame(@38)
same_frame(@57)
same_frame(@76)
same_frame(@95)
chop_frame(@114,1)
at com.aspose.slides.pf4dd765c.pbdb106a0.pa2137a2a.pa2137a2a.ae.if(Unknown Source)
at com.aspose.slides.pbdb106a0.pa5e0ff62.s.(Unknown Source)
at com.aspose.slides.pbdb106a0.p883e881b.a.if(Unknown Source)
at com.aspose.slides.pbdb106a0.p883e881b.a.do(Unknown Source)
at com.aspose.slides.pbdb106a0.p883e881b.a.do(Unknown Source)
Question:
How to fix this issue?
Thank you in advance for the answer,
regards
Martin