title: not generating pdf from http website url
body: <p>I want to generate pdf from url using servelt 
  I am using Flying Saucer for generating pdf from website url
  and my code is  </p>
  
  <pre><code>/*
   * To change this template, choose Tools | Templates
   * and open the template in the editor.
   */
  package abc;
  
  import com.lowagie.text.DocumentException;
  import java.io.File;
  import java.io.FileNotFoundException;
  import java.io.FileOutputStream;
  import java.io.OutputStream;
  import java.net.MalformedURLException;
  import java.net.URL;
  import java.util.logging.Level;
  import java.util.logging.Logger;
  import org.xhtmlrenderer.pdf.ITextRenderer;
  
  public class TestPdf {
      public static void main(String args[]) throws MalformedURLException
      {
        String File_To_Convert = "test.htm";
          //String url = new File(File_To_Convert).toURI().toURL().toString();
          URL testurl=new URL("http://www.ipillion.com/");
          String url=testurl.toString();
          System.out.println(""+url);
          String HTML_TO_PDF = "d:\\ConvertedFile.pdf";
          OutputStream os;       
          try {
              os = new FileOutputStream(HTML_TO_PDF);
  
  
          ITextRenderer renderer = new ITextRenderer();
          renderer.setDocument(url);      
          renderer.layout();
  
          renderer.createPDF(os);
  
          os.close();
  
  }catch(Exception e)
  {
      e.printStackTrace();
  }
      }}
  </code></pre>
  
  <p>I have tried using different website but every time it throws exception
  for eg</p>
  
  <pre><code>run:
  http://www.ipillion.com/
  ERROR:  'The element type "SCRIPT" must be terminated by the matching end-tag "&lt;/SCRIPT&gt;".'
  org.xhtmlrenderer.util.XRRuntimeException: Can't load the XML resource (using TRaX transformer). org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 71; The element type "SCRIPT" must be terminated by the matching end-tag "&lt;/SCRIPT&gt;".
      at org.xhtmlrenderer.resource.XMLResource$XMLResourceBuilder.createXMLResource(XMLResource.java:191)
      at org.xhtmlrenderer.resource.XMLResource.load(XMLResource.java:71)
      at org.xhtmlrenderer.swing.NaiveUserAgent.getXMLResource(NaiveUserAgent.java:211)
      at org.xhtmlrenderer.pdf.ITextRenderer.loadDocument(ITextRenderer.java:134)
      at org.xhtmlrenderer.pdf.ITextRenderer.setDocument(ITextRenderer.java:138)
      at abc.TestPdf.main(TestPdf.java:33)
  Caused by: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 71; The element type "SCRIPT" must be terminated by the matching end-tag "&lt;/SCRIPT&gt;".
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:723)
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:317)
      at org.xhtmlrenderer.resource.XMLResource$XMLResourceBuilder.createXMLResource(XMLResource.java:189)
      ... 5 more
  Caused by: org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 71; The element type "SCRIPT" must be terminated by the matching end-tag "&lt;/SCRIPT&gt;".
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1236)
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transformIdentity(TransformerImpl.java:640)
      at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:711)
      ... 7 more
  BUILD SUCCESSFUL (total time: 9 seconds)
  </code></pre>