Click here to Skip to main content
13,139,034 members (53,964 online)
Rate this:
Please Sign up or sign in to vote.
See more:
How to display an image in pdf file using gios dll in asp.net4.0?
Image will come from database.
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 7-Jan-13 19:17pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170915.1 | Last Updated 8 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100