Word wrap changes in cells after convet to pdf

Hi!
We use Aspose.Cells 21.12.3 For .Net 4.0.
We have problems with word wrapping after conversion to pdf.
Some words don’t stay in their original places.
Example in the archive/
Can you help us?
Files: testdocs.zip (285.1 KB)
testdoc.XLSM - before
testdoc.PDF - after
differences.PNG - highlighted differences

@SmirnovRA,

Please notice, I am able to reproduce the issue as you mentioned (via your screenshot) by converting your template file to PDF. I found word wrap is changed in cells of PivotTable after converting Excel file to PDF file format.
e.g.
Sample code:

Workbook workbook = new Workbook("e:\\test2\\testdoc.xlsm");
workbook.Save("e:\\test2\\out1.pdf", SaveFormat.Pdf);

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

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

@SmirnovRA,

Could you please share Arial Cyr font used in the source file with us. It will help us to evaluate your issue precisely.

Yes, sure!
Arial Cyr.zip (2.0 MB)

@SmirnovRA,

Thanks for providing the font file(s).

I have logged with your existing ticket “CELLSNET-50336” into our database. We will look into it soon.

@SmirnovRA

There is no Arial Cyr font in your shared zip file.

Also, word wrapping may be different in Microsoft Excel generated pdf file(Manually Save as pdf in Excel) comparing the one you see in Excel Normal view. Please highlight the word wrap issue comparing Aspose.Cells generated pdf and Microsoft Excel genrated pdf.

By the way, please share us the Microsoft Excel generated pdf file(Manually Save as pdf in Excel) on your side.

Arial Cyr - This is stadnart windows font Arial, but with Cyrillic. Exactly this in archive Arial Cyr.zip :slight_smile:

Please highlight the word wrap issue comparing Aspose.Cells generated pdf and Microsoft Excel genrated pdf.

-some differences exist
Files: Convert from Excel.zip (674.0 KB)
convert from excel.pdf - Microsoft Excel generated pdf
differences Aspose and Excel.PNG - comparison Aspose and Excel pdf
differences original convert from excel.PNG - comparison Excel pdf and XLSM

@SmirnovRA,

Thanks for providing further details with output PDF (generated by MS Excel) and screenshots to highlight the differences.

We will evaluate your issue thoroughly. Once we have further updates, we will let you know.

@SmirnovRA

For your highlighted issues:
For issue 1, we will try to fix it;
For issue 2, it is not an issue, it seems that you compared the wrong text, see screenshot issues Aspose Vs Excel.png (292.2 KB)

Do you mean that the font Arial Cyr is in Arial font? But in Excel, it shows that the Arial Cyr font is not installed. see screenshot: Arial Cyr font.png (31.9 KB). Could you please share the screenshot on your side?

Do you mean that the font Arial Cyr is in Arial font?

-Yes, Arial Cyr it Arial, but with Cyrillic symbols.

But in Excel, it shows that the Arial Cyr font is not installed. see screenshot: Arial Cyr font.png (31.9 KB). Could you please share the screenshot on your side?

For issue 2, it is not an issue, it seems that you compared the wrong text, see screenshot

  • I`m sorry, selected different cells.

@SmirnovRA,

Thanks for the confirmation and screenshots.

We will evaluate your issue further and get back to you with further updates.

@SmirnovRA

We improved the generated pdf file for the word wrap issue in the release v22.4.
Please try the following code:

LoadOptions options = new LoadOptions();

//set default vertical alignment
options.DefaultStyleSettings.VerticalAlignment = TextAlignmentType.Bottom;

Workbook wb = new Workbook("testdoc.XLSM", options);

wb.Save("out.pdf");

Please compare Aspose.Cells generated pdf file with Microsoft Excel generated pdf file(Manually Save as).
If there are still some issues, please share us Aspose.Cells generated pdf file, Microsoft Excel generated pdf file and screenshots about the issues.

Hi!
if you use this code, then vertical alignment starts working correctly
This code does not affect word wrapping.
Files:Aspose Cells 224 with code.zip (255.6 KB)
comparison Cells 22.4.png - differences Aspose and Excel
Before convert.XLSM - original File
After convert.pdf - converted file.

@SmirnovRA

Please also share us Microsoft Excel generated pdf file(Manually Save as in Excel) and highlight the differences between Aspose.Cells generated pdf file and Microsoft Excel generated pdf file

When converting to Excel, word wrap are preserved.
I didn’t find differences
comparison aspose and excel.zip (625.1 KB)

@SmirnovRA

The word wrap in Aspose generated pdf and Microsoft Excel generated pdf are same.
So the word wrap issue is fixed in Aspose.Cells for .Net v22.4.

We will close the issue.