Atalasoft
Welcome to Atalasoft Community Sign in | Join | Help
in

Write HTML to Tiff ??

Last post 24 Jun 2009, 2:10 PM by David Cilley. 3 replies.
Sort Posts: Previous Next
  •  18 Jun 2009, 10:10 PM 18681

    Write HTML to Tiff ??

    Hello, I was looking to write some HTML out to a tiff created at runtime by my users.  I have not found any information on how to do this.  I checked with support and they told me I would need to write my own HtmlDecoder using the draw tools. Let me qoute support here  "it would not be a simple endevor"

    Has anyone done this or know of another way to possible accomplish this tast?

    Thanks

    Jim

    Filed under: ,
  •  19 Jun 2009, 10:14 AM 18685 in reply to 18681

    Re: Write HTML to Tiff ??

    If your 'viewer' was a web browser, this could be pretty simple.  You could store the HTML in a TIFF tag on the server side, and render it out to the web page.  Then use some JavaScript to place it on a layer above the image, and move it around while the underlying image's scroll position/zoom changes.

    If you're talking about rendering HTML directly to a raster image format, then yes, it will be very difficult.  I have seen blogs articles with code snippets that use an ActiveX Internet Explorer interface to render HTML to an image.  You may want to start looking there.


    David Cilley
    My AJAX Imaging Blog
    Atalasoft Development Team
  •  22 Jun 2009, 3:46 PM 18699 in reply to 18685

    Re: Write HTML to Tiff ??

    David,

    Yes it is a web browser.  After rendering it and placing on a layer couldn't I just burn it to the tiff?  If so can give me some more information on how to accomplish this?

    Thanks

    Jim

  •  24 Jun 2009, 2:10 PM 18713 in reply to 18699

    Re: Write HTML to Tiff ??

    Rendering HTML to a browser just outputs text, burning that text to a tiff would most likely not look anything like rendered HTML... it would look like HTML code on an image.  What I was describing, was more along the lines of taking the HTML that you have, and outputting it to a DIV tag or something, and then floating it above the tiff image.

    It's either that, or render the HTML to an image.  This can be done using a WinForms control on the server side.  A System.Forms.WebBrowser control supports rendering straight HTML into a System.Drawing.Bitmap, which you can then use to overlay on the tiff image.

    I am currently writing a blog article on how to use the WebBrowser control to render HTML to an image on the server side... so if there is anything more specific you'd like me to cover, I may be able to include it in the article as well.


    David Cilley
    My AJAX Imaging Blog
    Atalasoft Development Team
View as RSS news feed in XML