Format issues while saving to PDF

Hi Nicole,

Thank you for providing your sample spreadsheet.

We are able to observe three problem while converting your provided spreadsheet to PDF format using the latest build of Aspose.Cells for .NET 7.7.1.4. Please find below the details for the tickets logged in reference to the found issues,

  1. CELLSNET-42342: Underline is breaking after the first occurrence of comma (,) in the text.
  2. CELLSNET-42343: Wrapped text isn’t rendering properly in the resultant PDF, seems like the second line is omitted completely.
  3. CELLSNET-42344: Header border (repeating) has different thickness in first page of the resultant PDF as compared to the subsequent pages.

Please spare us little time to properly analyze the problem cause on our end, and to provide a fix at earliest. In the meanwhile, we will keep you posted with updates in this regard.

We are sorry for your inconvenience.

Hi Nicole,

Thanks for using Aspose.Cells.

For your issue CELLSNET-42343 related to wrap text problem, please use the following code. It should fix your issue.

C#


Workbook wb = new Workbook(srcFile);

foreach (Worksheet ws in wb.Worksheets)

{

ws.AutoFitRows();

}

wb.Save(“outFile.pdf”);

The issues you have found earlier (filed as CELLSNET-42342;42344) have been fixed in this update.


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

Hi,


We are seeing some issues while generating pdf from excel using aspose when it has a wrapped text.

Please find the input excel and the output pdf attached.

Let us know if you need any more details.

Thanks.

Hi Nicole,

Thanks for using Aspose.Cells.

We were able to observe this issue. There are formatting issue when the text is wrapped. It does not match exactly with the MS-Excel Print Preview.

We have tested it with the following code and attached the output pdf for a reference. We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-42400.

C#


Workbook wb = new Workbook(“Input.xlsx”);

wb.Save(“outFile2.pdf”);

Hi Nicole,


I think, currently, as a workaround, you may try to auto-fit your columns in the worksheet in merged cells, it will work fine for your requirements.
e.g
Sample code:

Workbook wb = new Workbook(“e:\test2\Input.xlsx”);
AutoFitterOptions options = new AutoFitterOptions();
options.AutoFitMergedCells = true;
wb.Worksheets[0].AutoFitColumns(options);
wb.Save(“e:\test2\outFile3.pdf”);


We will also evaluate (as we have already logged a ticket “CELLSNET-42400” for it into our database) if you could enhance the Excel to PDF conversion further to accommodate the merged cells if possible.

Thank you.

Hi team,

The data in the excel sheet is being trimmed to next page after converting it into pdf using aspose. Where as when we tried to see the data in excel after print preview and converting it to pdf through excel's inbuilt pdf converter it shows in same page.

Feel free to revert for any questions.

Thanks,

ey global:

Hi team,

The data in the excel sheet is being trimmed to next page after converting it into pdf using aspose. Where as when we tried to see the data in excel after print preview and converting it to pdf through excel's inbuilt pdf converter it shows in same page.

Feel free to revert for any questions.

Thanks,

Hi,

Thanks for your posting and using Aspose.Cells.

Please auto fit the first column and then this issue will be resolved. Please see the following code for your reference.

I have attached the output pdf for your reference.

C#
Workbook workbook = new Workbook("input.xlsx");
workbook.Worksheets[0].AutoFitColumn(0);
workbook.Save("output.pdf");

ey global:
Hi,

We are seeing some issues while generating pdf from excel using aspose when it has a wrapped text.

Please find the input excel and the output pdf attached.

Let us know if you need any more details.

Thanks.

Hi,

Thanks for your posting and using Aspose.Cells.

For your issue logged as CELLSNET-42400, please use the following code to get the same results as MS-Excel.

C#
Workbook wb = new Workbook(srcFile);
AutoFitterOptions options = new AutoFitterOptions();
options.OnlyAuto = true;
wb.Worksheets[0].AutoFitColumns(options);
wb.Worksheets[0].AutoFitRows(options);
wb.Save("outFile.pdf");

Hi Team,
The solution works fine when the data can be accommodated in that particular row. But when it exceeds the row width then it trims the extra data and doesn’t display them in the next page. Thanks.



Hi Team,
The solution works fine when the data can be accommodated in that particular row. But when it exceeds the row width then it trims the extra data and doesn’t display them in the next page.

Thanks,

Hi,

Thanks for your posting and using Aspose.Cells.

We were able to observe this issue. The following code generates the pdf but the row data is trimmed and does not go to next page either. We have logged this issue in our database for investigation. We will look into it and fix this issue.

Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-42423.

C#


Workbook wb = new Workbook(“input.xls”);

AutoFitterOptions options = new AutoFitterOptions();

options.OnlyAuto = true;

wb.Worksheets[0].AutoFitColumns(options);

wb.Worksheets[0].AutoFitRows(options);

wb.Save(“outFile.pdf”);

Team,
Can you please let us know as to when this issue will be resolved.

Thanks,
Vikas KM

Hi Vikas,

I am afraid, we currently do not have any updates on the ticket logged earlier as CELLSNET-42423. A note has been recorded for the concerned development team member to provide the ETA at earliest. As soon as some news comes in, we will post here for your kind reference.

Please accept our sincere apologies for the inconvenience caused.

Hi team,

Can you please let us know by when we can expect a response to this issue as this is a high production defect.

Hi Vikas,

Thanks for your posting and using Aspose.Cells.

We are afraid, there is no update for you regarding this issue at this moment. However, we have logged your comments in our database and requested the development team to provide some update or ETA for this issue. Once, there is some fix or news for you, we will let you know asap.

Hi,


We have investigated the issue further. Well, it only happens when there is a column and the column’s width is larger than the page width. It is a bit complex issue and we may not fix it in short time. Could you make the column width less than the page width if it resolves your issue for the time being.

Thank you.

@eyglobal,

Please try our latest version/fix: Aspose.Cells for .NET v19.3.4 (attached)

We have fixed your issue (logged earlier as “CELLSNET-42423”) now.

Let us know your feedback.
Aspose.Cells19.3.4 For .Net2_AuthenticodeSigned.Zip (4.9 MB)
Aspose.Cells19.3.4 For .Net4.0.Zip (4.9 MB)

The issues you have found earlier (filed as CELLSNET-42423) have been fixed in Aspose.Cells for .NET v19.4. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi

3 posts were split to a new topic: Text formatting issue in Word to PDF conversion