Leonardo Trimarchi Leonardo Trimarchi - 3 months ago 48
ASP.NET (C#) Question

Print all content in aspx page including embedded pdf

I have an aspx page that i need to be able to print out. Inside my page i embed a pdf that is displayed using a cdn as the src.
Since it is a pdf and it is embedded but being hosted on another site when i try to print the page even though it displays correctly the element shows as empty. How can i capture everything in the DOM including the embedded pdf?

I have tried to use the jspdf library to no avail.

<embed src='https://image.pdf' style="width: 607px; height: 500px" />


If you are trying to print everything inside the browser window then maybe use print function of window object?