I am trying to build a way to take an html document, possibly built by an angular component and print it to pdf without it being shown to the user. I have no idea if that is possible.
The optimal solution would have the component render the page, but not display it. That document gets passed to a service, which then “prints” the document to pdf and downloads it for the user. I am currently using angular 17 to do this work.
I have tried creating a component and rendering it in an “invisible” div, but that doe snot seem to work. I have also tried rendering a component by passing it to another component, but I was not successful in that either. I am not sure if/how to send a component to another component.
jakeprime is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.