title: Adding image to an HTML string iphone
body: <p>How can i add an image present in my Xcode project in to an HTML string to take a printout of that.</p>
  
  <p>I have tried the following code but the image does'nt print instead a blank box appears in the PDF.</p>
  
  <pre><code>-(NSString *)prepareHTMLText {
      NSMutableString *body = [NSMutableString stringWithString:@"&lt;!DOCTYPE html&gt;&lt;html&gt;&lt;body&gt;"];
  
  
          [body appendString:@"&lt;h2&gt;Ingredients&lt;/h2&gt;"];
  
       [body appendFormat:@"&lt;p&gt;%@ %@&lt;/p&gt;", @"text", @"TEStText"];
  
     // [body appendFormat:@"&lt;img src=\"%@\" alt=\"\" height=\"100\" width=\"100\"/&gt;",[[NSBundle mainBundle] pathForResource:@"edit" ofType:@"png"]];
  
      [body appendFormat:@"&lt;img src=\"%@\"/&gt;",[UIImage imageNamed:@"edit.png"]];
  
      [body appendString:@"&lt;/body&gt;&lt;/html&gt;"];
      return body;
  }
  </code></pre>
  
  <p>I am getting the out put as above
  <img src="https://i.stack.imgur.com/x7OL4.png" alt="enter image description here"></p>