Rank: Advanced Member Groups: Member
Joined: 5/9/2016 Posts: 84
|
I have the "Total package" with EO.PDF and EO.WebBrowser.
I have HTML being shown in EO.WebBrowser. Content is generated mostly through Javascript and the content looks nice in EO.WebBrowser.
But what is the best way (dynamically - not manually) to save the page, exactly as it looks, to PDF and HTML?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, To save the page to HTML, you can simply call this method: https://www.essentialobjects.com/doc/eo.webbrowser.webview.gethtml.htmlTo get the page as PDF, we recommend you to use a HtmlToPdfSession object: https://www.essentialobjects.com/doc/eo.pdf.htmltopdfsession.runwebviewcallback_overload_1.htmlYou can model your code based on the sample code from the above link. The key is you will have access to the underlying WebView object that you can use to load whatever you want to normally load into a WebView. Once you load your desired content, you can then call RenderAsPDF to produce the final PDF file. Please let us know if this works for you. Thanks!
|