Results 1 to 2 of 2
  1. #1
    Rajkumar is offline Member
    Join Date
    Jul 2013
    Rep Power

    Post Convert HTML file into JPEG


    I want to convert a HTML file into PNG image. My HTML page has IMAGES as well.
    For this I'm using html2image java library.
    When I'm converting my HTML file, the images are broken.

    HtmlImageGenerator imageGenerator = new HtmlImageGenerator();
    imageGenerator.loadHtml("<p>test test <b>test</b> xxx <a title='test\" link' href=''>link<br/>link</a>xxx xxx</p><img width=\"820\" height=\"347\" alt=\"ביטוח ישיר\" style=\"width: 820px; height: 347px;\" src=\"\"><br/><img width=\"820\" height=\"132\" alt=\"ביטוח ישיר\" style=\"width: 820px; height: 132px;\" src=\"\">");
    imageGenerator.saveAsHtmlWithMap("/temp/test2.html", "test2.png");

    Output of converted Image:
    Convert HTML file into JPEG-test2.png

    Please help me to convert html pages (along with images) into PNG file.


  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Madgaon, Goa, India
    Rep Power

    Default Re: Convert HTML file into JPEG

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 0
    Last Post: 07-11-2012, 12:18 PM
  2. Replies: 0
    Last Post: 02-24-2012, 05:18 PM
  3. Convert jpeg image to int
    By aelynne in forum New To Java
    Replies: 3
    Last Post: 10-26-2011, 07:25 PM
  4. How to convert html file to text
    By chamnan in forum Advanced Java
    Replies: 5
    Last Post: 09-08-2010, 01:02 PM
  5. To open an image file such as Jpeg file using JAva Program
    By itmani2020 in forum Advanced Java
    Replies: 10
    Last Post: 07-11-2008, 09:57 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts