Export current razor page to pdf

Hi,
I have a razor page that show up some results get from database.
The application use asp net core Identity for logins and https.
I need to add a button "export to pdf" on top of page that convert the current page content, without have to reload it using url.

Samples in documentation always converts external url; my need is to convert the page itself.
If I pass as parameter the full url of the page, the result is the pdf conversion of the app login page.
Maybe is there a way to get  html string of the current razor page and pass it to the converter?

Can you help me ?

Thanks  

1 Reply 1 reply marked as answer

GK Gowthamraj Kumar Syncfusion Team May 28, 2021 12:14 PM UTC

Hi lorella, 
 
Thank you for contacting Syncfusion support.  
 
We can convert the authenticated web page to PDF using cookies in HTML to PDF converter, please refer below links for more information. Kindly try the conversion with cookies in our HTML to PDF converter to avoid the login page issue.  
 
We can get the HTML string of view page, please refer below link for more information, You also can get the HTML string using javascript on a button click and then this to the server side for converting HTML to PDF.  
 
Please let us know if you need any further assistance on this.  
 
Regards, 
Gowthamraj K 


Marked as answer
Loader.
Up arrow icon