I have a workflow model. Internet Explorer doesn't support some features required for model editing functionality (and regular user doesn't need it).
I want a read-only preview of my model. Is it possible to server-side render my HTML to an image?
I would prefer offline solution to allow our system run in corporate LAN without access to internet.
Some server-side rendering advantages include: A server-side rendered application enables pages to load faster, improving the user experience. When rendering server-side, search engines can easily index and crawl content because the content can be rendered before the page is loaded, which is ideal for SEO.
Between the two options, server-side rendering is better for SEO than client-side rendering. This is because server-side rendering can speed up page load times, which not only improves the user experience, but can help your site rank better in Google search results.
Server-side rendering (SSR), is the ability of an application to contribute by displaying the web-page on the server instead of rendering it in the browser. Server-side sends a fully rendered page to the client; the client's JavaScript bundle takes over and allows the SPA framework to operate.
Here are 'local' solutions:
wkhtmltoimage
from the wkhtmltopdf
package
does exactly its name says
PhantomJS
more advanced capabilities, like evaluating any js code in the page's context before rendering it to an image or pdf.
You can try using a java library called flyingsaucer (aka xhtmlrenderer). It has worked very well for me in the past.
Homepage: http://code.google.com/p/flying-saucer//
FAQ for generating an image: http://pigeonholdings.com/projects/flyingsaucer/R8/doc/guide/users-guide-R8.html#xil_29
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With