title: Adding image to Pdf file using Itext Pdf
body: <p>I am using iText to generate Pdf. But when I'm trying to add images in the pdf,</p>
  
  <p><code>Image schoolLogo = Image.getInstance(new URL(timetableResource.getImageUrl())); 
  document.add(schoolLogo);</code></p>
  
  <p>But I'm getting error as </p>
  
  <blockquote>
    <p>HTTP Status 500 - Server returned HTTP response code: 400 for URL: <a href="http://139.59.72.150:8080/sms/attachments/23/42/school/23/23/Vandana" rel="nofollow noreferrer">http://139.59.72.150:8080/sms/attachments/23/42/school/23/23/Vandana</a> International School Logo.png</p>
    
    <p>type Exception report</p>
    
    <p>message Server returned HTTP response code: 400 for URL:(myUrl)</p>
    
    <p>description The server encountered an internal error that prevented it from fulfilling this request.</p>
    
    <p>exception</p>
    
    <p>java.io.IOException: Server returned HTTP response code: 400 for URL: (myUrl)
        sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876)
        sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
        java.net.URL.openStream(URL.java:1045)
        com.lowagie.text.Image.getInstance(Unknown Source)</p>
  </blockquote>