I am trying to draw an image onto the PDF page.
This works very well, except for the following problem:
My PNG has a transparent background.
When I draw it onto the PDF the background is black.
This is the code I have (C#):
- Code: Select all
Bitmap bitmap = new Bitmap(image, size, size);
PdfBitmap pdfBitmap = new PdfBitmap(bitmap);
pdfBitmap.Draw(pdfTextField.Page, pdfTextField.Location);
So, what do I have to do, to keep the background transparent?
I have found a few examples on how to make the whole image transparent, which is not what I want.
I just want the PNG to be displayed correctly with the transparent background.