Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to display an image in pdf file using gios dll in asp.net4.0?
Image will come from database.
C#
MyImg mi2 = new MyImg();
mi2.ImageUrl = "~/images/10BIT001.jpeg";
mi2.ImageUrl = "Handler5.ashx?";

PdfImage LogoImage = mydoc.NewImage(mi2.ToString());

I am using this line of coding, but showing an error while opening the image file.
Posted
v2

1 solution

Of course it does. You set the image url twice, so the first value is lost. If you use the path to a jpeg, AND use Server.MapPath to get a full path, I bet it will work.
 
Share this answer
 
Comments
Sasikumar.mohan 8-Jan-13 6:35am    
i need example code to do this. help me
Christian Graus 8-Jan-13 14:08pm    
We don't know what libraries you're using, to even be able to do your job for you. If you're getting an error, you need to tell us what it says. If you're using an external library, you need to tell us what it is, and probably tag it, so you can attract people who use it, too.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900