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

Free Support Forum - aspose.com

Text getting truncated while converting spreadsheet to PDF format

I found this problem has Solved in .net version, but it still has problem in java( latest version).

see:

Hi,


Please try our latest version/fix: Aspose.Cells for Java v16.11.7 (attached).

If you still find the issue with v16.11.7, kindly provide us your template Excel file and output PDF file, we will check it soon.

Thank you.

I try it, and still have problem.

code:

String from = “中国烟草总公司天津市公司(本级)201601快报.xlsx”;
String to = “D:\中国烟草总公司天津市公司(本级)201601快报.pdf”;
InputStream srcInputStream = AsposeExcelConvertPdfTest.class.getResourceAsStream(from);
Workbook workbook = new Workbook(srcInputStream);
workbook.getWorksheets().get(0).autoFitColumns();
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
workbook.save(to, pdfSaveOptions);

see line no 256
" 其中:为职工卫生保健、生活等发放或支付的福利 "only can see
"其中:为职工卫生保健、生活等发放或支付的福"

because of chinese?

Hi,


Thanks for providing us template file and sample code with details.

After an initial test, I observed the issue as you mentioned by using your sample code with your template file. I found that some text is getting truncated while converting spreadsheet to PDF file format. We even use AutoFit columns operation via Aspose.Cells APIs but it does not resolve it.
e.g
Sample code:

String from = “中国烟草总公司天津市公司(本级)201601快报.xlsx”;
String to = “D:\中国烟草总公司天津市公司(本级)201601快报.pdf”;
InputStream srcInputStream = AsposeExcelConvertPdfTest.class.getResourceAsStream(from);
Workbook workbook = new Workbook(srcInputStream);
workbook.getWorksheets().get(0).autoFitColumns();
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
workbook.save(to, pdfSaveOptions);

I have logged a ticket with an id “CELLSJAVA-42104” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

Thank you.

Hi,


We are pleased to inform you that your issue “CELLSJAVA-42104” is resolved now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

Once the fix is available for public use, we will share it with you here.

Thank you
Hi,

Please try our latest version/fix: Aspose.Cells for Java v16.11.10 (attached)

Your issue should be fixed in it.

Let us know your feedback.

Thank you

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Problem still exist


Hi,


Do you use different Excel file? Please provide your new Excel file here. I have tested your scenario/ case using your original template file (as you attached in the post(Text getting truncated while converting spreadsheet to PDF format)), it works fine and the output PDF file is fine. See the sample code which I used for your reference:
e.g
Sample code:
Workbook workbook = new Workbook(strFilePath);
workbook.getWorksheets().get(0).autoFitColumns();
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
workbook.save(“out1.pdf”, pdfSaveOptions);

I have also attached the output PDF file for your reference.

Thank you.