Add a bitmap image of Resources to a pdf with the iTextSharp.text class

0

Is there any way to convert a bitmap image that is in my resource file to an iTextSharp.text.Image image so I can add it in a pdf?

I have the following code:

document.Add(iTextSharp.text.Image.GetInstance(Properties.Resources.electrans_logo));

I get the following error:

  

Argument 1: Unable to convert from 'System.Drawing.Bitmap' to 'iTextSharp.text.Image'

I have tried several things and I know that there is a solution putting a given route but I do not want to depend on a route, I have my bitmap in the resources file and I want it to take the image from there and add it in a pdf. Thanks in advance.

    
asked by Xim123 31.05.2018 в 09:12
source

0 answers