Save to PDF it truncating cell values

Contents of cells are being truncated in the resulting pdf when I call
document.Save(outFile, FileFormatType.Pdf);

One example can be seen if you look at the file “Research Order Forms for PT00000101.xls”.
Specifically at Screening Day -28!H32 you will notice a cell containing multiple lines of data…

BUN / Creatine - pre-contrast enhanced scan - If
there is no disease recurrance, these should be
repeated every 23 weeks until the disease
recurrence.

In the resulting pdf (Research Order Forms for PT00000101.pdf) all contents after the first line in that specific cell are missing. Only BUN / Creatine - pre-contrast enhanced scan - If appears in the table

This is an issue because I would expect that the resulting document would contain ALL the information visible in the source document.

Hi Steven,

We are unable to reproduce the issue mentioned by you. Please use the updated version Aspose.Cells5.1.4.5.zip attached. Following is the code snippet used while testing the issue. The generated PDF file is also attached for your consideration.

Code snippet:
Workbook workbook = new Workbook(sFilePath, new LoadOptions(LoadFormat.Excel97To2003));
PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.SaveFormat = SaveFormat.Pdf;
workbook.SaveOptions.SaveFormat = SaveFormat.Pdf;
workbook.Save(sSavePath, pdfSaveOptions);

If there is any issue, please feel free to contact us.

Thanks,

I have compiled my code against the latest Aspose.Cells.dll version 5.2.0.0.
The issue still exists.

I have narrowed the issue down to this:
The conversion is not honoring the standard excel behavior of expanding the field marked for ‘wrap text’ cells as necessary.

Opening and saving the file in excel, then converting that newly saved document works fine. This is because excel is auto expanding the rows with cells marked as ‘wrap text’ where necessary.

Aspose.Cells does not appear to run this step when merging text in a ‘wrap text’ cell where the contents of that cell is long enough to trigger the auto expand functionality in excel.

Calling Worksheet.autoExpandRows on each sheet is not a viable workaround because this auto unhides the hidden rows and there is no option to leave the hidden rows hidden. Passing in the AutoFitterOptions with OnlyAuto = true does not keep all hidden rows hidden.

The file I originally uploaded does not appear to have the issue. I have attached the correct document in this message. (Broken.xls)

There needs to be an option that does nothing other than auto expand rows that need to be expanded based on the contents of word wrapped cells.

I just created a new style in my book, set the ‘word wrap’ to true on my style, and saved the document.
I then via code reproduced the problem in it’s simplest form.

(See book1.xlsx)


Style myStyle = workbook.Styles[“myStyle”];
cell.SetStyle(myStyle);


At this point if I open the resulting document in excel all looks good. (see book2.xlsx)


workbook.Save(outFilePath, FileFormat.Pdf);

At this point the wordwrap is gone in the pdf (see book2.pdf)

Hi Steven,

We are able to reproduce the issue in the way mentioned by you. The issue has been logged with ID CELLSNET-21972. We are working on it. We will update you soon.

Thanks,

Sounds good. Any time estimates on a fix?


Hi Steven,

We are working on this issue. After 3 days, we will be in a position to provide you a temporary fix for the issue. This will help you to carry on your work.

Thanks,

Sounds good, I look forward to the temporary fix.
Thank you
Steven

Hi,

Please try the attached version. Please use “IgnoreHidden” property for your case.

e.g

AutoFitterOptions options = new AutoFitterOptions();
options.IgnoreHidden = true;
Workbook workbook = new Workbook(“e:\test\Book2.xlsx”);
workbook.Worksheets[0].AutoFitRows(options);
workbook.Save(“e:\test\output.pdf”);


Thank you.

any chance of getting a .net 1.1 version of this assembly?

Hi,

Sure, we can provide the .NET 1.x compiled version for your need. Hopefully, we will provide you your desired version on coming Monday.

Keep in touch.

Thank you.

Hi,

Please find attached your desired version.

Thank you.

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


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