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

Free Support Forum - aspose.com

PDF rendition turns transparent image background into black

Hi guys,

we face XLSX to PDF rendition problem when transparent image background turns into black in resulting PDF.
Please, check attached document.

Any idea?

Thank you in advance!
Ondrej

Hi Ondrej,


Thank you for sharing the sample.

I have evaluated the presented scenario while using the latest revision of Aspose.Cells for .NET 8.7.2.5, and I am not able to observe the said issue. Please check the attached resultant PDF and give the latest version a try on your side as well.

C#

var book = new Workbook(dir + “image_transparency_problem.xlsx”);
book.Save(dir + “output.pdf”);

Hi Babar,

thank you for fast response! :slight_smile:

I’ve checked the related code and it seems the result is a side-effect from PDF/A conversion. :frowning:
The code itself looks similar to this:

var book = new Workbook(dir + “image_transparency_problem.xlsx”);
using (Stream lStream = new MemoryStream())
{
book.Save(lStream, Aspose.Cells.SaveFormat.Pdf);
Aspose.Pdf.Document lPdfA = new Aspose.Pdf.Document(lStream);
using (MemoryStream lLogStream = new MemoryStream())
{
bool lSucceed = lPdfA.Convert(lLogStream, Aspose.Pdf.PdfFormat.PDF_A_1B, Aspose.Pdf.ConvertErrorAction.Delete);
}

lPdfA.Save(dir + “output.pdf”);
}

Any hint/idea?

Best regards,
Ondrej

Hi Babar,

i think i’ve found explanation:
Transparency is NOT allowed in PDF/A-1:

https://en.wikipedia.org/wiki/PDF/A

When i changed conversion to PDF/A-2, resulting PDF contains transparent image,

Thank you for your help!

Best regards,
Ondrej

Hi,


Good to know that you have sorted your issue now. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.