We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Mistake in Excel

Hello,

I attach source xlsx and resulting pdf. Here you can see that this have a strange Background

Hi,

Thanks for your posting and using Aspose.Cells.

We were able to observe this issue after converting your excel file into pdf using the latest version: Aspose.Cells
for .NET v8.4.1.2
with the following code. Strange background is appearing inside the shapes as shown by your screenshot.

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-43617 - Strange background appearing in the shape image

I have attached the output pdf for a reference.

C#

string filePath = @“F:\Shak-Data-RW\Downloads\Kopie+von+PosteingangIndikationspruefung.xlsx”;


Workbook workbook = new Workbook(filePath);


workbook.Save(“output.pdf”);

Hi,

Thanks for using Aspose.Cells.

We have looked into this issue further and found that this issue is occurring because of transparency of the shape. To support transparency, you will have to convert your images into png format.

Please see the following sample code and the output pdf generated by it for your reference.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\Kopie+von+PosteingangIndikationspruefung.xlsx”;


Workbook workbook = new Workbook(filePath);


PdfSaveOptions opts = new PdfSaveOptions();

opts.ImageType = ImageFormat.Png;


workbook.Save(“output2.pdf”, opts);

I have it retested and it has worked fine. Thanks for your help

Hi Christian,


Thank you for the confirmation. Please feel free to contact us back in case you need our further assistance with Aspose APIs.

Sorry that I must sign up again, but a colleague said, that is a smartArt in Excel. there are no possibilities to Change them to png.

Any ideas?

Thanks for advance

Hi again,


You may also set the image format to TIFF while converting the spreadsheet to PDF format. Please check the following piece of code and its resultant PDF as attached.

C#

var book = new Workbook(inFile);
book.Save(outFile, new PdfSaveOptions() { ImageType = ImageFormat.Tiff});

Thank you for your reply,



I will try it

Hi Christian,


Please note, the PDF attached with my previous response was generated using the the latest version of Aspose.Cells for .NET 8.4.1.5. I suggest you to use the same version to test the scenario on your side.

Hello there,



sorry that took so Long. Thanks for the advice but they are not very helpful.



I included your code in my Testprogram. I used Aspose.Cells for .NET 8.4.1.5.

I attached two PDFs. In the first one I didn’t use the Code and in the second I used him.

There are other Problems, when I Change it to .Tiff.



In the second one is the memory size much bigger than the first one. Thats not good.

I have customers, who upload Excel Sheets with so many Pictures in there. The Memory size will be too big.



In this case I can’t Change the Imagetype to tiff.



By the way I see that some text are go over from the arrows.

The “Indikationsprüfung” Looks quite different from the original.

I add a screenshot, so you know what I mean



I hope you can help me



Thanks in advance

Hi Christian,


First of all, the Aspose.Cells APIs have been upgraded to 8.6.2 since your last message so please test the case with 8.6.2 release on your side. I have checked that the latest version does not produce the problem as shown in your snapshot. Secondly, we had a detailed discussion with the concerned member of the product team regarding the issue logged earlier as CELLSNET-43617, and we had concluded that the only option for this scenario is to set the ImageFormat as Png because Aspose.Cells APis can’t support to export the images with transparent colors to PDF file directly.