GetInstance Path

View: New views
3 Messages — Rating Filter:   Alert me  

GetInstance Path

by Shawn Davies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: GetInstance Path

by Fabrizio Accatino :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

How do you defined and filled colValue ?    Please copy and paste the piece of code.

IMHO ... I think your problem is related to a wrong "escape sequence" ( \\ ). If it's so, you are a bit off-topic on this mailing list....  Please review carefully your code and check if you pass exactly the same string to  GetInstance.

  Regards


fabrizio



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

Re: GetInstance Path

by Shawn Davies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Sorry - this was a string parsing mistake on my part. It’s working now.

 

 

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

 

From: Fabrizio Accatino [mailto:fhtino@...]
Sent: Thursday, June 11, 2009 3:14 AM
To: Post all your questions about iTextSharp here
Subject: Re: [itextsharp-questions] GetInstance Path

 

How do you defined and filled colValue ?    Please copy and paste the piece of code.

 

IMHO ... I think your problem is related to a wrong "escape sequence" ( \\ ). If it's so, you are a bit off-topic on this mailing list....  Please review carefully your code and check if you pass exactly the same string to  GetInstance.

 

  Regards

 

 

fabrizio

 

 


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