Timeline for Create PDF (or other exportable file) out of a LWC
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 16 at 16:48 | history | edited | Miguel Diaz | CC BY-SA 4.0 |
added 22 characters in body
|
Feb 16 at 16:41 | history | edited | Miguel Diaz | CC BY-SA 4.0 |
added 22 characters in body
|
Feb 16 at 16:35 | comment | added | Miguel Diaz | @BritishBoyinDC, we'll most definitely have some that go over two pages so it may not be ideal. But at this point I am willing to consider anything haha. Thank you for the suggestion! | |
Feb 16 at 16:33 | comment | added | Miguel Diaz | @sfdcfox thanks for the suggestion and the resources. I am just getting started with LWCs so sounds like I'd be diving right into the deep end. But I will explore that option. If you can think of any major caveats that a newer developer might run into with this, I would appreciate any tips. Currently my LWC is used in a Lightning Record Page as well as a record detail page in an Experience site. It's hard for me to fully comprehend what I'm reading in those articles, but as best as I can interpret them, I assume using the LWC in those two places would not be a problem. | |
Feb 15 at 22:32 | comment | added | sfdcfox♦ | It may be possible today with html2pdf if you're running all your LWC in Light DOM. I haven't tried it out, though, so this is more of a musing than an answer. | |
Feb 15 at 21:02 | comment | added | BritishBoyinDC | I've never found a 'good' solution. The only solution that sort of worked was to pass the data from the LWC to a hidden VF page via the Lightning Message Service, have the VF page build the printable page from the payload using javascript, and either use render as/click to print and have the user choose Print to PDF. But once the data goes over one page, you get into some painful issue in my experience | |
Feb 15 at 20:54 | history | asked | Miguel Diaz | CC BY-SA 4.0 |