Hi,
We are using Excel Templates in our java code which we load using Aspose cells (2.4.2.4) and generate PDF using the Workbook.save(outputStream,FileFormatType.PDF);
We are loading multiple language excel templates namely, English and Simplified Chinese Language(PMingLiU.ttf font) in the Workbook object and we generate individual languages PDF respectively.
We are experiencing problem when we run parallel threads to generate Chinese PDF. The problem does not happen when only 1 thread is used to generate PDF.
Note: Please provide solution as soon as possible, have attached the sample program which we used to reproduce the issue, assume the Excel files which we used are
ELN001-X0509_SICHN - Chinese Excel Template (Has Simplified Chinese Text)
ELN001-X0509_ENG - English Excel Template (Has English Text)
Issue 1:
The Chinese PDF which gets generated is not having all the Chinese Text available.
Also in certain cases it shows the font error - < cannot extract the embedded font ‘FAAABE_PMingLiU’. Some characters may not display or print correctly> while open the pdf. Please find attached output pdf.
Issue 2 :
Also in certain cases it throws Out of memory exception. Please find below exception details.
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.aspose.cells.a.a.e.f.a(Unknown Source)
at com.aspose.cells.a.a.e.v.a(Unknown Source)
at com.aspose.cells.a.a.e.w.a(Unknown Source)
at com.aspose.cells.a.a.g.o.a(Unknown Source)
at com.aspose.cells.a.a.g.o.a(Unknown Source)
at com.aspose.cells.a.a.g.n.a(Unknown Source)
at com.aspose.cells.a.a.d.F.a(Unknown Source)
at com.aspose.cells.a.a.d.D.b(Unknown Source)
at com.aspose.cells.a.a.d.p.b(Unknown Source)
at com.aspose.cells.a.a.d.F.b(Unknown Source)
at com.aspose.cells.a.a.d.J.b(Unknown Source)
at com.aspose.cells.a.a.d.J.b(Unknown Source)
at com.aspose.cells.a.a.d.h.b(Unknown Source)
at com.aspose.cells.a.a.d.m.b(Unknown Source)
at com.aspose.cells.a.a.d.n.a(Unknown Source)
at com.aspose.cells.a.a.d.d.a(Unknown Source)
at com.aspose.cells.a.a.i.x.a(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
at com.citi.test.AsposeTest.savePDF(AsposeTest.java:73)
at com.citi.test.AsposeTest.main1(AsposeTest.java:55)
at com.citi.test.AsposeTest.run(AsposeTest.java:23)
at java.lang.Thread.run(Thread.java:619)
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.aspose.cells.a.a.e.f.a(Unknown Source)
at com.aspose.cells.a.a.e.v.a(Unknown Source)
at com.aspose.cells.a.a.e.w.a(Unknown Source)
at com.aspose.cells.a.a.g.o.a(Unknown Source)
at com.aspose.cells.a.a.g.o.a(Unknown Source)
at com.aspose.cells.a.a.g.n.a(Unknown Source)
at com.aspose.cells.a.a.d.F.a(Unknown Source)
at com.aspose.cells.a.a.d.D.b(Unknown Source)
at com.aspose.cells.a.a.d.p.b(Unknown Source)
at com.aspose.cells.a.a.d.F.b(Unknown Source)
at com.aspose.cells.a.a.d.J.b(Unknown Source)
at com.aspose.cells.a.a.d.J.b(Unknown Source)
at com.aspose.cells.a.a.d.h.b(Unknown Source)
at com.aspose.cells.a.a.d.m.b(Unknown Source)
at com.aspose.cells.a.a.d.n.a(Unknown Source)
at com.aspose.cells.a.a.d.d.a(Unknown Source)
at com.aspose.cells.a.a.i.x.a(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
at com.citi.test.AsposeTest.savePDF(AsposeTest.java:73)
at com.citi.test.AsposeTest.main1(AsposeTest.java:55)
at com.citi.test.AsposeTest.run(AsposeTest.java:23)
at java.lang.Thread.run(Thread.java:619)
java.io.IOException: Negative seek offset
at java.io.RandomAccessFile.seek(Native Method)
at com.aspose.cells.a.a.e.s.a(Unknown Source)
at com.aspose.cells.a.a.g.o.a(Unknown Source)
at com.aspose.cells.a.a.g.o.a(Unknown Source)
at com.aspose.cells.a.a.g.n.a(Unknown Source)
at com.aspose.cells.a.a.d.F.a(Unknown Source)
at com.aspose.cells.a.a.d.D.b(Unknown Source)
at com.aspose.cells.a.a.d.p.b(Unknown Source)
at com.aspose.cells.a.a.d.F.b(Unknown Source)
at com.aspose.cells.a.a.d.J.b(Unknown Source)
at com.aspose.cells.a.a.d.J.b(Unknown Source)
at com.aspose.cells.a.a.d.h.b(Unknown Source)
at com.aspose.cells.a.a.d.m.b(Unknown Source)
at com.aspose.cells.a.a.d.n.a(Unknown Source)
at com.aspose.cells.a.a.d.d.a(Unknown Source)
at com.aspose.cells.a.a.i.x.a(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
at com.citi.test.AsposeTest.savePDF(AsposeTest.java:73)
at com.citi.test.AsposeTest.main1(AsposeTest.java:55)
at com.citi.test.AsposeTest.run(AsposeTest.java:23)
at java.lang.Thread.run(Thread.java:619)
Exception in thread "Thread-2" java.lang.OutOfMemoryError
at java.io.RandomAccessFile.readBytes(Native Method)
at java.io.RandomAccessFile.read(RandomAccessFile.java:322)
at com.aspose.cells.a.a.e.s.b(Unknown Source)
at com.aspose.cells.a.a.e.u.f(Unknown Source)
at com.aspose.cells.a.a.e.d.a(Unknown Source)
at com.aspose.cells.a.a.g.o.a(Unknown Source)
at com.aspose.cells.a.a.g.o.a(Unknown Source)
at com.aspose.cells.a.a.g.n.a(Unknown Source)
at com.aspose.cells.a.a.d.F.a(Unknown Source)
at com.aspose.cells.a.a.d.D.b(Unknown Source)
at com.aspose.cells.a.a.d.p.b(Unknown Source)
at com.aspose.cells.a.a.d.F.b(Unknown Source)
at com.aspose.cells.a.a.d.J.b(Unknown Source)
at com.aspose.cells.a.a.d.J.b(Unknown Source)
at com.aspose.cells.a.a.d.h.b(Unknown Source)
at com.aspose.cells.a.a.d.m.b(Unknown Source)
at com.aspose.cells.a.a.d.n.a(Unknown Source)
at com.aspose.cells.a.a.d.d.a(Unknown Source)
at com.aspose.cells.a.a.i.x.a(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
at com.citi.test.AsposeTest.savePDF(AsposeTest.java:73)
at com.citi.test.AsposeTest.main1(AsposeTest.java:55)
at com.citi.test.AsposeTest.run(AsposeTest.java:23)
at java.lang.Thread.run(Thread.java:619)
Exception in thread "Thread-0" java.lang.OutOfMemoryError: Java heap space
at com.aspose.cells.a.a.e.f.a(Unknown Source)
at com.aspose.cells.a.a.e.v.a(Unknown Source)
at com.aspose.cells.a.a.e.w.a(Unknown Source)
at com.aspose.cells.a.a.g.o.a(Unknown Source)
at com.aspose.cells.a.a.g.o.a(Unknown Source)
at com.aspose.cells.a.a.g.n.a(Unknown Source)
at com.aspose.cells.a.a.d.F.a(Unknown Source)
at com.aspose.cells.a.a.d.D.b(Unknown Source)
at com.aspose.cells.a.a.d.p.b(Unknown Source)
at com.aspose.cells.a.a.d.F.b(Unknown Source)
at com.aspose.cells.a.a.d.J.b(Unknown Source)
at com.aspose.cells.a.a.d.J.b(Unknown Source)
at com.aspose.cells.a.a.d.h.b(Unknown Source)
at com.aspose.cells.a.a.d.m.b(Unknown Source)
at com.aspose.cells.a.a.d.n.a(Unknown Source)
at com.aspose.cells.a.a.d.d.a(Unknown Source)
at com.aspose.cells.a.a.i.x.a(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
at com.citi.test.AsposeTest.savePDF(AsposeTest.java:73)
at com.citi.test.AsposeTest.main1(AsposeTest.java:55)
at com.citi.test.AsposeTest.run(AsposeTest.java:23)
at java.lang.Thread.run(Thread.java:619)
java.lang.OutOfMemoryError