HTML rendering report component

Hi Friends!

This is not a development question, just a quick survey. I developed a custom HTML rendering report component that can render ANY html code into the report. It is based on MSHTML, so it is not cross-paltform.

The first step is to save the TWebBrowser's whole rendered image with good quality. It is solved perfectly. I used the IHTMLDocument2, IHTMLElement2 and IHTMLElementRender interfaces for rendering the browser's image to an external DC. In the past, saving the visible part of the browser window was quite easy via IViewObject.Draw method, but I needed the whole page's shot for working correctly, the visible part useless in this case. Now it is possible.

The second step is to draw this graphic on a TMetaFilecanvas, that can be draw on any DC without quality issues by using the PlayEnhMetafile API-call. This is great.

The third step is to create a custom report component, that receives the HTML text and renders it using the above method, then draws it onto the page's Canvas. It is solved. The component is ready.

In this way the component can render ANY html element, including flash.

So, my question. Do You need this component? I love FR and this would be my gift for the FR community. I think, You need this! :-)

If the feedback is positive, I will publish the component in the near future ASAP.

Best regards: Alex :-)

Comments

  • Anu de DeusAnu de Deus Hampshire, UK
    edited 7:32PM
    Yes, Please!!!
    I'm sure it's needed by a lot of developers that want to replace the not-so-efficient TfrxRichView.
    My opinion: if this component is crucial for your own systems, you could accelerate bug identification and fixes and general improvements by making its source code available too.
    Maybe you could start a project in SourceForge.net?
    I'd love to contribute (although HTML is not my expertise, I could help with everything else, memory leaks, code optimization, etc)
    Cheers
  • edited 7:32PM
    Hi!

    Of course, the source will be published and anyone can use and modify it for custom needs.

    Here are some examples of webpage shots, generated by the code (that is the base of the report component):

    example1
    example2

    I will publish the code, ASAP.

    Best regards: Alex :-)
  • edited 7:32PM
    And for a more report-oriented example, here is a document image from a html string.

    Html formatted table

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.