title: Converting HTML to image using java
body: <p>i'm facing some problem converting html to image using java
  im using html2image[java]</p>
  
  <p>it create an image, but the problem is it only create an image on a small part of the html. how can i make it to make an image of the whole html. thank you</p>
  
  <p>this is my code</p>
  
  <pre><code>import gui.ava.html.image.generator.HtmlImageGenerator;
  import java.io.File;
  
  
  public class test {
      public static void main(String[] args) {
          HtmlImageGenerator imageGenerator = new HtmlImageGenerator();
          String uri = new File("C:\\cover.html").toURI().toString();
          imageGenerator.loadUrl(uri);
          imageGenerator.saveAsImage("hello-world.png");
          imageGenerator.saveAsHtmlWithMap("hello-world.html", "hello-world.png");
      }
  }
  </code></pre>
  
  <p>i also use saveAsHtmlWithMap to save the html file. and that html file written by the program to the harddisk is also a small one. </p>
  
  <p>this is the html code of cover.thml</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="***"&gt;
      &lt;head&gt;
          &lt;title&gt;&lt;/title&gt;
          &lt;meta charset="utf-8"/&gt;
          &lt;meta name="viewport" content="width=1200, height=1200"/&gt;
          &lt;link rel="stylesheet" type="text/css" href="main.css"/&gt;
      &lt;/head&gt;
      &lt;body id="cover_page"&gt;
          &lt;nav id="cover" &gt;
              &lt;ol&gt;
                  &lt;li id="nav1"&gt;
                      &lt;a&gt;cover&lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ol&gt;
          &lt;/nav&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>