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

Free Support Forum - aspose.com

Unable to generate Chinese PDF from Excel using Aspose Cell in Multi-Threaded environment(Weblogic 10.3)

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);<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

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

Hi,

Thanks for your posting and using the Aspose.Cells for Java.

Please download and test your issue with the latest version: Aspose.Cells for Java 7.1.0

If the problem persists, then please provide us the test code replicating the problem and sample source xls/xlsx files.

We will look into it and help you asap.

Hi,

In aspose 7.1.0 we are getting text format, alignment issues and shapes are not rendered properly.

i have attached the generated pdf and sample excel file. please check

Hi,

Thanks for the sample files.

I can notice the text formatting / alignment issue as you have mentioned by converting your template file to PDF. I have logged a ticket with an id: CELLSJAVA-40115. We will soon look into it.

Thank you.

Hi, the previous issue heap size error was solved in aspose 7.1.0 version.
so, is there any previous version where the formatting, alignment issue and the heap size issue is solved. if not please tell us the approximate date when this will be fixed
We are in very critical state.
we need to fix it soon ..

Hi,


We will try to fix the issue (regarding formatting/alignment) in the next week. Our concerned developers from China is on leave for the Spring festival, they will be back in the next week.

Once we solve the issue, we will let you know here.

Thank you.

Hi,

Please try the new fix: Aspose.Cells for Java

v7.1.0.3

We have fixed some issues of the text formatting and alignment.

Hi,

Thanks a lot.
Text formatting issue is resolved but shapes are not rendered properly.
Suppose if i have a line shape in excel template, the width of the line is reduced in pdf.

Hi,


Please attach the sample input Excel file and output PDF file (generated by the latest fixed version v7.1.0.3), also give us screen shot to highlight (encircle with red color) the problematic area on the shape to make us better understand the problem, we will look into it soon.

Thank you.

Please find the attached template and generated pdf

Hi,


Yes, you are right. I tested with your file and found the issue in the PDF file, i.e. the bottom border line of the image shape (above) in the second and third worksheets is not rendered fine. I have reopened the issue and we will soon look into it.

Thank you.

Hi,

We have fixed this issue. Please download: Aspose.Cells for Java v7.1.0.4

Hi,

Currently we are using aspose-cells-2.4.2.4.jar file. For all the above stated issues we can use the latest version you gave us going forward. But currently we need the issues to be fixed in aspose-cells-2.4.2.4.jar file. Can you provide us ? i mean in the same jar file can you update all the changes and give us the same version jar file ?

Hi,

We do not fix issues based on older versions. It is our policy to fix the issues based on latest version.

Hi,

Is there any API link for aspose-cells-7.1.0.4.jar
am not able to do the below opertaion.

Blob excelBlob = (Blob)exlXmlBlob[1];

this.excelWb= new Workbook(excelBlob.getBinaryStream());

Worksheet sheet = excelWb.getWorksheets().get(iSheetNumber);

it says runtime error, constructor not available for Workbook

and method not found error for excelWb.getWorksheets().

Hi,

Please first download the Major Release from this link:

Aspose.Cells for Java 7.1.0



Once, you have downloaded it, then replace aspose.cells jar with this Minor Release:
Aspose.Cells
for Java v7.1.0.4

The issues you have found earlier (filed as CELLSJAVA-40115;CELLSJAVA-40115) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi,

Formatting issues are not resolved yet.
Text is getting cut at some places. Also getting overlapped.
Please check the attached template and generated pdf.

I have also attached the screenshot and marked where the alignment is missing and text getting cut at the right end.


Note: Am using aspose 7.1.1

Hi,


Thanks for providing us the template file with screen shot.

I have reopened your issue “CELLSJAVA-40115”. We will soon look into it.

Once we have any update, we will let you know here.

Thank you.

Hi,

any updates on the above.??