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,
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,
var book = new Workbook(inFile);
book.Save(outFile, new PdfSaveOptions() { ImageType = ImageFormat.Tiff});
Thank you for your reply,
I will try it
Hi Christian,
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,