Save a radzen page as html on the server

Hi Radzen team,

I have a radzen page that produces a report like view, I want to save it's HTM to file on the server or database table, leaving out any header footer data.

This radzen page will be requested by an custom method using URL parameters passing some filter values .

Can we also mark some elements to be excluded when saving the file .

How can we do this in Radzen ( Angular app)


Hi @mcanavar,

I am afraid Radzen doesn't provide a built-in feature that will do this.


If not out of the box in Radzen, Do you have any suggestions where to start ? In Angular or serverside ?
Also there where some examples in the forum for invoice printing ? the difference is that I do not want to print but I want to save to file or database ?

Is it possible to invoke own page from server side method using process invoke : e.g:
savepage ("https://radzenwebsite/reportpage?id=2")

hope you can point me in the right direction.
thank you.

I am afraid I can't think of anything. For printing you can just print the web page. There isn't anything else required.

So , I can't get the renderd HTML of a page.
Can we force the output to be HTML ?

Using :click
() => {
var target = document.getElementById('row15');
var divel = document.createElement('div');
tried this with the (click) attribute to see if I can get the HTML after rendering.

Out of luck here ...

I don't understand what you are trying to achieve with this code. What is 'row15'? Is there an element with such id in your page? Angular pages are rendered client-side. You can get the HTML of the page via document.body.innerHTML but it will not be styled (to say the least).

I'm trying to get the 'styled' html to be able to use it to save it to a file or convert it to pdf to save the calculation sheet.
I have named a Row component in Radzen (via attribute) to have "id" "row15" .

Basic gaol is : I have page that displays an calculation : I want to be able to save what you see as a pdf or whatever format even HTML , but formatted.

document.body.innerHTML gives the same as view page source from the browser menu, not usable html even without any readable data .

like this:

    <div id="spinner" class="splash-screen">
      <div class="splash-container">
        <div class="load-bar">
          <div class="bar"></div>
          <div class="bar"></div>
          <div class="bar"></div>
        This application requires JavaScript.

I already told you that Radzen doesn't include any capabilities for saving a page as HTML or PDF.

Yes , you did.
I'm not happy..

Perhaps I have to ask a different question: How can I produce a report with Radzen to save the page output. Must be a way to do that. server side or provide the URL to a third party endpoint

Here is what document.body.innerHML returns for which is a Radzen application.

Radzen does not support report generation or saving the page output as HTML or PDF. For report generation you need to look for a third party solution or library.

There are solution that take a URL as input to produce a pdf file , will that work ?

Also see you mention that ad the end of day it produces html ..

Thank you

How different is my question comparing it with this one: PDF Creation

Not sure as I haven't tested any. You can try though.

That question was about generating a custom PDF file. My answer was again to look for a third party library as Radzen doesn't include PDF creation capabilities.