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 :-)
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
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
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 :-)
Html formatted table