« Return to Thread: GetInstance Path

GetInstance Path

by Shawn Davies :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hello All,

 I thought I had this going, but I hit a snag.

 

This line of code works and my image is added to the PDF:

iTextSharp.text.Image pdfImg = iTextSharp.text.Image.GetInstance(@"file:\\tul1ibo1\ibographics\bmp\SL_VODTxoma_IB.bmp");

 

But, this line of code fails:

iTextSharp.text.Image pdfImg = iTextSharp.text.Image.GetInstance("file:\\\\tul1ibo1\\ibographics\\bmp\\SL_VODTxoma_IB.bmp");

 

The above lines are just test code. The real line of code I’m using uses a variable for the filename:

iTextSharp.text.Image pdfImg = iTextSharp.text.Image.GetInstance("file:" + colValue);

 

I have defined the variable so that it reads like the first line that works – but it fails when I pass that variable as a value to GetInstance. Any ideas?

 

Thanks!

 

Shawn Davies

Senior Software Engineer, Macrovision Solutions Corporation

Shawn.Davies@... |  Office: 918-488-4052 |  Fax: 918-488-4245

 

  

CONFIDENTIALITY NOTICE: This email message (including any attachments) is for the sole use of the intended recipient and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Thank you.

 

 


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
itextsharp-questions mailing list
itextsharp-questions@...
https://lists.sourceforge.net/lists/listinfo/itextsharp-questions

 « Return to Thread: GetInstance Path