Aspose cell: ToImage function Issue

Hello,

This post is slightly related to an other Aspose.Cells issue.

In the last post of that thread (see link above) I was asked to provide "source file which is not giving correct output by SheetRender API".

Since I was in a rush at that time, I didn't provide the requested info immediately. Now that I have time, I can provide the requested info.

Here is a recapitulation of the issue:
Using latest Aspose.Cells which is 7.4.3, the text alignment is not rendered correctly when using Aspose.Cells.SheetRender's ToImage method.

This situation append when the original worksheet contains text using "angled" text orientation *AND* alignment of it is set to Middle Align (vertical) and Center (horizontal).

The resulting image does not respect the alignment.

Here is the code (also provided in the attachment) used to reproduce the problem:

Aspose.Cells.License cellsLicense = new Aspose.Cells.License();
cellsLicense.SetLicense("Aspose.Cells.lic");
Aspose.Cells.Workbook workbook = new Workbook("test.xls");
Worksheet worksheet = workbook.Worksheets[0];

// Set image resolution
ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Tiff;
imgOptions.HorizontalResolution = 200;
imgOptions.VerticalResolution = 200;

SheetRender _sheetRender = new SheetRender(worksheet, imgOptions);
if (_sheetRender.PageCount > 0)
_sheetRender.ToImage(0, "test.tiff");


Thanks

Michel

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We were able to replicate this issue using your code with the latest version. We have logged this issue in our database. We will look into it and resolve this issue. Once the issue is resolved or we have some other update for you, we will let you know asap.

We have attached the output image for a reference.

This issue has been logged as CELLSNET-41704.

Hi Shakeel,


Thank you for your answer.

Even if we use Aspose for a long time now, I’m still new to the process of reporting defects/bugs/issue to Aspose.

I was wondering how I can get a more precise Estimated Time of Resolution (ETR) for CELLSNET-41704 ?
Is there any way for me to track the status of it ?
What are the several state of an issue after it was logged into Aspose database ?

Michel

Hi,

Thanks for your posting and using Aspose.Cells.

Well, this issue id is for our own internal communication with developers. You can request us the status of these issue ids. Once, there is some update for you relating to it, we will let you know asap. When the issue is fixed, we will provide you a fix. Please spare us some time to look into and fix this issue.

Hi Shakeel,


Thank you for your answer.

First, I would like to ask you the status of this ids. Is it on a working state or only reported ?

The product I’m working on is based on Aspose.Cells and is released to our customer (including the CELLSNET-41704 issue).

I’m still trying to figure out the time frame to resolve this issue and I have no idea if it will takes months or years to be resolved. What are my options to know it?

I need to be totally transparent with my customers and if the resolution of this issue is not a priority for your team I’ll start to work on severals workaround to minimized the impact of the problem.

That is, I need to know if the problem will be fixed in a short time frame or not before spending energy on workaround.

Thanks again

Michel

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We are afraid, there is no update for you at this moment. However, I have logged your comment against this issue and requested the development team to provide ETA.

Once, we will have some update for you, we will let you know asap.

Hi,


How can I raise the priority of this issue?
It look to me like this issue is really not a big priority for your development team and I can undestand that, is it?

Can you provide me an ETA? Are we talking about weeks, months or years?
An estimation will help us to plan how we will solve this issue on our side.

It is a major issue that prevent us to use the latest release.
Can we count on you?

Michel

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Your issue is logged as a Normal User. If you want to log this issue as a Priority or Enterprise User, you will have to purchase Priority or Enterprise support.

Please read about the support options from this link.

http://www.aspose.com/corporate/services/support-options.aspx

We have also logged your comments in our database and requested the development team to provide ETA for this issue.

Once, we will have some update for you, we will let you know asap.

Hi,


Just wonder if development team had time to look at this issue. Do they plan to work on it ?

Thanks

Michel

Hi Michel,

Thanks for your posting and using Aspose.Cells for .NET.

We are afraid, your issue is not resolved yet. However, we have logged your comment and requested the development team to provide the ETA. Once, we will have some fix or update for you, we will let you know asap.

Hi Shakeel,


This is a 6 month old issue now.

Well, I don’t know what to think about the way Aspose’s development team manage bugs.

On my side, I really need to have this issue solved, but even purchasing Priority or Enterprise support as you suggested does not garanty that Aspose’s development team will fix this issue in the time we need it as this statement (" No guarantee can be made to the delivery date of the fix") from the priority support section of the Aspose web site says.

So, knowing that, what can we do to get any comitment from the Aspose’s development team?

If we buy priority support, will the Aspose’s development team fix the issue?

Regards

Michel

Hi Michel,

Thanks for your posting and using Aspose.Cells.

We are afraid, your issue is not resolved as yet and we also do not have any update for you. However, we have again logged your comments for consideration and requested the development team to provide some update or ETA for this issue.

Priority or Enterprise support does not guarantee a fix, however, your issue is logged with higher priority and development team tries to resolve higher priority issues first than normal priority issues.

Once, we will have some update or fix for you, we will let you know asap.

Hi,


Please try the latest version/fix: Aspose.Cells for .NET v7.6.1.4 (Aspose.Cells7.6.1.4.zip(attached)).
We have fixed your issue now.

Also, if the Excel cell has multilines, the generated image might have some small (minor) differences
with MS Excel’s print preview.

Let us know your feedback.

Thank you.

Hi Amjad,


I’ve tried with version v7.6.1.4 and it is working very well.

Thank you very much for the fix.

Michel

Hi,

Thanks for your feedback and using Aspose.Cells.

It is good to know that your issue is now resolved. If you face any other issue, please feel free post on our forum, we will be glad to help you further.

Hi Amjad,


I’ve just realised what you mean in the last line of your comment when you say: "…if the Excel cell has multilines, the generated image might have some small (minor) differences with MS Excel’s print preview."

In fact, I would say that the difference are not minor because when you have several cells (let say a list of data) with multilines cells configured in word wrap, you may lose several lines of data when the cell is the last cell of the page.

If I try to say this in a different way, multilines cells are truncated when transformed to images.

I am now very afraid of having to wait another six months to have this issue fixed definitively. I sincerely hope that this behavior is coded near the fix you previously did and that your task is not already closed.

Thanks,
Michel

Hi,


Could you provide us a sample template file and output image files/PDFs by the new fix/version, also provide some screen shots to highlight the truncation issue encircling in red color, we will check your issue soon. We may reopen the the issue or log another one for it (if required).

Thank you.

Sure,


Here are two files produced by our application:
The Excel file contain a list of data
Using this code snippet, we use Sheet and insert every produced image into a Powerpoint file (the second file):

private Presentation GetPresentation()
{
Presentation presentation;
string presentationFileName = workbook.FileName.Replace(".xls", “.ppt”);
presentation = new Presentation(presentationFileName);

Worksheet _worksheet = workbook.Worksheets[1]; // TODO: assuming a two worksheet workbook where the second one is to be used as report to print

// Set image resolution
ImageOrPrintOptions _imgOptions = new ImageOrPrintOptions();
_imgOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Tiff;

_imgOptions.HorizontalResolution = 200;
_imgOptions.VerticalResolution = 250;
_imgOptions.OnlyArea = true;

// Convert the Worksheet to ab image
SheetRender _sheetRender = new SheetRender(_worksheet, _imgOptions);
Slide currentSlide;

for (int pageNumber = 0; pageNumber < _sheetRender.PageCount; pageNumber++)
{
Bitmap _image = _sheetRender.ToImage(pageNumber);
if (pageNumber == 0)
{
currentSlide = presentation.Slides[1];
}
else
{
currentSlide = presentation.AddEmptySlide();
}
AddPictureToPresentation(presentation, _image, currentSlide);
}
return presentation;
}


Hi,


Thanks for providing us template files and sharing the sample code segment.

After an initial test, I observed the issue as you mentioned by using your template file to convert the sheet to images. Some multilines cells (on some pages) are truncated when transformed to images as you pointed out by your provided presentation which highlights the issues. I used the following sample code with your template file.

Sample code:
Workbook workbook = new Workbook(“e:\test2\vip_verbatim±+Copy.xls");
Worksheet sheet = workbook.Worksheets[“Presentation”];

ImageOrPrintOptions imgOptions = new ImageOrPrintOptions();
imgOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Tiff;

imgOptions.HorizontalResolution = 200;
imgOptions.VerticalResolution = 250;
imgOptions.OnlyArea = true;


SheetRender sr = new SheetRender(sheet, imgOptions);

for (int j = 0; j < sr.PageCount; j++)
{
sr.ToImage(j, "e:\test2\outsheetimgpresentation” + j.ToString() + “.tiff”);

}

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

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

Thank you.

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


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