I looked at the html source of b.html and you're using "
http://www.tandlcontracting.com\images\payillustrationheaderTLC.jpg";
as the image resource path.

The use of "\" instead of "/" may having something to do with not being able
to locate the image resource (error 404).
By parsing this URL as a string in java will also result in an error since
the backslash "\" is used for string special characters.

So try the following URL "
http://www.tandlcontracting.com/images/payillustrationheaderTLC.jpg"; it
might work.

Yannis

2011/2/17 Thangapandiyan Manoharan <[email protected]>

> Hi,
>
>
>
> Thanks for your response. I have explained my doubt below. Please suggest.
>
>
>
>
>
> I can’t create a pdf file with the attached a.html file. The pdf file will
> be empty.
>
>
>
> Also , Input string was not in a correct format. Error happened for the
> attached b.html file.
>
>
>
> Also,
>
>
>
> The following error message happened if I have using the following image
> tag. but  Src of image tag is correct. Its work If I have changed to src as
> a physical path.
>
>
>
> <img height="150px" src="
> http://www.excelliumbusinesssystem.com/portal/images/ExcelliumDocLogo.JPG";
> />
>
>
>
>
>
> Error Message
>
> The remote server returned an error: (404) Not Found.
>
> Error Source
>
> System
>
> Error Stack Trace
>
> at System.Net.HttpWebRequest.GetResponse() at
> iTextSharp.text.Image.GetInstance(Uri url) at
> iTextSharp.text.html.simpleparser.HTMLWorker.StartElement(String tag,
> Hashtable h) at
> iTextSharp.text.xml.simpleparser.SimpleXMLParser.Go(TextReader reader) at
> iTextSharp.text.xml.simpleparser.SimpleXMLParser.Parse(ISimpleXMLDocHandler
> doc, ISimpleXMLDocHandlerComment comment, TextReader r, Boolean html) at
> iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader,
> StyleSheet style, Hashtable interfaceProps) at
> iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader,
> StyleSheet style)
>
> Error Base
>
> System.Net.WebException: The remote server returned an error: (404) Not
> Found. at System.Net.HttpWebRequest.GetResponse() at
> iTextSharp.text.Image.GetInstance(Uri url) at
> iTextSharp.text.html.simpleparser.HTMLWorker.StartElement(String tag,
> Hashtable h) at
> iTextSharp.text.xml.simpleparser.SimpleXMLParser.Go(TextReader reader) at
> iTextSharp.text.xml.simpleparser.SimpleXMLParser.Parse(ISimpleXMLDocHandler
> doc, ISimpleXMLDocHandlerComment comment, TextReader r, Boolean html) at
> iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader,
> StyleSheet style, Hashtable interfaceProps) at
> iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader,
> StyleSheet style)
>
> Error Exception
>
> System.Net.WebException: The remote server returned an error: (404) Not
> Found. at System.Net.HttpWebRequest.GetResponse() at
> iTextSharp.text.Image.GetInstance(Uri url) at
> iTextSharp.text.html.simpleparser.HTMLWorker.StartElement(String tag,
> Hashtable h) at
> iTextSharp.text.xml.simpleparser.SimpleXMLParser.Go(TextReader reader) at
> iTextSharp.text.xml.simpleparser.SimpleXMLParser.Parse(ISimpleXMLDocHandler
> doc, ISimpleXMLDocHandlerComment comment, TextReader r, Boolean html) at
> iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader,
> StyleSheet style, Hashtable interfaceProps) at
> iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader,
> StyleSheet style)
>
>
>
> Thanks,
>
> Thangapandiyan.M
>
>
>
> *From:* Glen Hamel [mailto:[email protected]]
> *Sent:* 17 February 2011 06:48 PM
> *To:* 'Post all your questions about iText here'
> *Subject:* Re: [iText-questions] Input string was not in a correct format
>
>
>
> That’s not an iText problem..
>
>
>
> Check to ensure that the string version of you date time value is correct
> and can be correctly converted which it obviously isn’t correct or you would
> be getting that error.
>
>
>
> *Glen Hamel*
> *Auric Networks Canada, Inc.*
> 570 Orwell Street, Unit 1
> Mississauga, Ontario
> L5A 3V7
>
> Phone : 905.361.7621 x 2000
> Fax : 905.274.3912
> Email : [email protected] <[email protected]>
>
> http://www.auricnet.ca
>
>
>
> *From:* Thangapandiyan Manoharan [mailto:[email protected]]
> *Sent:* Thursday, February 17, 2011 7:06 AM
> *To:* [email protected]
> *Subject:* [iText-questions] Input string was not in a correct format
>
>
>
> Hi ,
>
>
>
> I am getting the following error. Can you please help me.
>
>
>
> System.FormatException was unhandled by user code
>
>   Message="Input string was not in a correct format."
>
>   Source="mscorlib"
>
>   StackTrace:
>
>        at System.Number.StringToNumber(String str, NumberStyles options,
> NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
>
>        at System.Number.ParseSingle(String value, NumberStyles options,
> NumberFormatInfo numfmt)
>
>        at System.Single.Parse(String s, NumberStyles style,
> NumberFormatInfo info)
>
>        at System.Single.Parse(String s, IFormatProvider provider)
>
>        at iTextSharp.text.html.simpleparser.IncTable.BuildTable()
>
>        at iTextSharp.text.html.simpleparser.HTMLWorker.EndElement(String
> tag)
>
>        at
> iTextSharp.text.xml.simpleparser.SimpleXMLParser.ProcessTag(Boolean start)
>
>        at iTextSharp.text.xml.simpleparser.SimpleXMLParser.Go(TextReader
> reader)
>
>        at
> iTextSharp.text.xml.simpleparser.SimpleXMLParser.Parse(ISimpleXMLDocHandler
> doc, ISimpleXMLDocHandlerComment comment, TextReader r, Boolean html)
>
>        at iTextSharp.text.html.simpleparser.HTMLWorker.Parse(TextReader
> reader)
>
>        at
> iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader,
> StyleSheet style, Hashtable interfaceProps)
>
>        at
> iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader,
> StyleSheet style)
>
>        at MailMergeComposer.Convert2PDF(String prmstrVariable, String
> prmstrMailMergeFolder, String prmstrFileName, String prmstrFolderName,
> Boolean prmblnSendAsHTML) in C:\Office\Accentra
> Projects\CMS-DEV\App_Code\MailMergeComposer.vb:line 801
>
>        at MailMergeComposer.ComposeDocument(Boolean prmblnSendAsHTML) in
> C:\Office\Accentra Projects\CMS-DEV\App_Code\MailMergeComposer.vb:line 730
>
>        at MailMergeComposer.PrepareMailMergeRecords(Int32
> prmintRecipientID, String prmstrRecipientType, String
> prmstrDocumentNameCollection, String prmstrMailMergeValueList, String
> prmstrRecipientEmailID, Boolean prmblnSendAsHTML) in C:\Office\Accentra
> Projects\CMS-DEV\App_Code\MailMergeComposer.vb:line 231
>
>        at MailMerge_MailMerge.GenerateDocuments(Boolean
> prmblnSave2DiskOnly) in C:\Office\Accentra
> Projects\CMS-DEV\CMSFiles\MailMerge\MailMerge.aspx.vb:line 959
>
>        at MailMerge_MailMerge.btnSendByMail_Click(Object sender,
> ImageClickEventArgs e) in C:\Office\Accentra
> Projects\CMS-DEV\CMSFiles\MailMerge\MailMerge.aspx.vb:line 874
>
>        at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs
> e)
>
>        at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String
> eventArgument)
>
>        at
> System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
> eventArgument)
>
>        at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
> sourceControl, String eventArgument)
>
>        at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
> postData)
>
>        at System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
>
>
>
> Thanks,
>
> Thangapandiyan.M
>
>
> ------------------------------------------------------------------------------
> The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
> Pinpoint memory and threading errors before they happen.
> Find and fix more than 250 security defects in the development cycle.
> Locate bottlenecks in serial and parallel code that limit performance.
> http://p.sf.net/sfu/intel-dev2devfeb
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Many questions posted to this list can (and will) be answered with a
> reference to the iText book: http://www.itextpdf.com/book/
> Please check the keywords list before you ask for examples:
> http://itextpdf.com/themes/keywords.php
>
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to