PrintArea doesn't manage correctly transformed images

Hello,



When we try to save in JPG an image contained in an Excel file, using the function PrintArea, the result is not the expected one.



It seems that transformed images (rotation by example) are not correctly managed by the function.



Is it a known issue?

It’s really problematic for us? Is there any way to fix it?



Input : ERROR.xlsm

Output : Result.jpg

Language : vb.net

Aspose :v17.1.0





Our code :





Dim m_o_sheet As Worksheet

Dim l_s_filePath as String

‘….

‘ init Worksheet

‘….

l_s_filePath= « Last Version.jpg »





Dim options As ImageOrPrintOptions = New ImageOrPrintOptions()

options.OnePagePerSheet = True

options.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg

m_o_sheet.PageSetup.PrintArea = “B7:AN44”

Dim sr As SheetRender = New SheetRender(m_o_sheet, options)

sr.ToImage(0, l_s_filePath)



Thanks in advance for your support.



Laurent

Hi,


Thanks for the template file, sample code and screenshot.

After an initial test, I observed the issue as you mentioned (via the screenshot: https://forum.aspose.com/t/20346) by using the following sample code with your template file. I found that PrintArea doesn’t transform images correctly in Sheet-to-Image conversion. I noticed that the subscript text is wrongly placed for the connector shapes:
e.g
Sample code:

Workbook workbook = new Workbook(“e:\test2\ERROR.xlsm”);
Worksheet m_o_sheet = null;
string l_s_filePath = null;

m_o_sheet = workbook.Worksheets[0];

l_s_filePath= “e:\test2\out1.jpg”;

ImageOrPrintOptions options = new ImageOrPrintOptions();
options.OnePagePerSheet = true;
options.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg;
m_o_sheet.PageSetup.PrintArea = “B7:AN44”;
SheetRender sr = new SheetRender(m_o_sheet, options);
sr.ToImage(0, l_s_filePath);

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

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

Thank you.
Hi,

Please try our latest version/fix: Aspose.Cells for .NET v17.2.1.0
(Note: please choose any of the fixes for your underlying .NET framework version)

Your should be fixed in it as I tested.

Let us know your feedback.

Thank you.

Hello,



Thanks for the update and the reactivity!



We still have a problem with a transformed image, on another file.



Our implementation:



Dim wb As Aspose.Cells.Workbook = New Aspose.Cells.Workbook(“C:\Data\ERROR.xlsm”)

wb.Save(“C:\Data\ERROR.pdf”, Aspose.Cells.SaveFormat.Pdf)

Hi,


Thanks for the template file and output PDF file.

I have tested your scenario/ case using your sample code with your template file and found only one issue:
1) The “Oval 27” shape is skewed/tilted a bit with its text “1” position changed too.

Could you confirm this issue or you find some other issues. It would be best if you could give us a screenshot to highlight the problematic areas while comparing the original shapes (in MS Excel) Vs output display (e.g PDF) via Aspose.Cells APIs, so we should not miss anything. After your confirmation, we can log a separate ticket for it.

Thank you.

Hi,

Yes, I confirm. It’s the only issue we found yet.

Ok, if we found another issue we will highlight it.

Thanks for the support

Hi,


Thanks for your confirmation.

As I observed the issue you mentioned by converting your template file to PDF. I found that the “Oval 27” shape is skewed/tilted a bit with its text “1” position changed too in Excel to PDF rendering.
e.g
Sample code:

Workbook wb = new Workbook(“C:\Data\ERROR.xlsm”);
wb.Save(“C:\Data\ERROR.pdf”, Aspose.Cells.SaveFormat.Pdf);

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

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

Thank you.

Hi,


Please try our latest fix/version: Aspose.Cells for .NET v17.2.8:

Aspose.Cells for .NET v17.02.8 (.NET 2.0) compiled in .NET Framework 2.0.
Aspose.Cells for .NET v17.02.8 (.NET 4.0) compiled in .NET Framework 4.0.

Your issue “CELLSNET-45168” should be fixed in it.

Let us know your feedback.

Thank you.

Hello,

It works!

Perfect!

Thanks for the support and the reactivity! :slight_smile:

Hi,


Thanks for your feedback.

Good to know that your issue is sorted out by the new fix/version. Feel free to contact us anytime if your need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.

The issues you have found earlier (filed as CELLSNET-45168;CELLSNET-45138) have been fixed in Aspose.Cells for .NET 17.3.0.


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