Dear Aspose team,
We have an Excel file that contains different indentation characters in the text in the form of spaces and tabs.
The Aspose.Cells library for .NET is used to print a document file to PDF.
In version 21.6.0, which we are currently using, the document prints both tabs and spaces.
When switching to version 23.3.0, indentations that contain tabs are no longer printed.
- Could you please tell me how to keep the previous print behavior in the new version?
- Is the current behavior with ignoring tabs expected when printing?
Below is an example code that is used to print a document:
/// <summary> /// Convert excel file to pdf using Aspose.Cells /// </summary> /// <param name="srcFileName">input excel file name for conversion</param> /// <param name="dstPdfFileName">result pdf file name</param> static void ConvertExcelFileToPDF(string srcExcelFileName, string dstPdfFileName) { var inputStream = File.OpenRead(srcExcelFileName); var outputStream = File.Create(dstPdfFileName); Workbook workbook = null; var options = new LoadOptions(); workbook = new Workbook(inputStream, options); workbook.Settings.ReCalculateOnOpen = false; var tmpStream = new MemoryStream(); var saveOptions = new PdfSaveOptions(); workbook.Save(tmpStream, saveOptions); tmpStream.Seek(0, SeekOrigin.Begin); tmpStream.CopyTo(outputStream); inputStream.Dispose(); outputStream.Dispose(); }
I attached zip archive that contains the input example Excel file ‘Excel_To_Pdf-Tabs_Delimiter_Problem.xlsx’ with a text in a cell A2 and 2 PDF files after conversion with different library versions:
- 21.6.0 version - ‘Excel_To_Pdf-Tabs_Delimiter_Problem-Aspose_21.6.pdf’
- 23.3.0 version - ‘Excel_To_Pdf-Tabs_Delimiter_Problem-Aspose_23.3.pdf’
Tabs_Delimiter_Problems_Examples.zip (94.4 KB)
Best regards,
Vitaly Kvashin.