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 .
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 ?
So , I can't get the renderd HTML of a page.
Can we force the output to be HTML ?
Using :click
() => {
console.log('click');
var target = document.getElementById('row15');
var divel = document.createElement('div');
divel.appendChild(target.cloneNode(true));
alert(divel.innerHTML);
}
tried this with the (click) attribute to see if I can get the HTML after rendering.
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.
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
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.
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.