react-pdf-html
react-pdf-html copied to clipboard
suggestion: Use ref
Is there any issue with using ref to grab elements and css directly from the node save the step of rendering the dom to string and back again and be able to grab all styles that exist both inline and in sheet.
In my initial use case I was using HTML for some of my content server side (user editable markdown -> HTML -> PDF). It sounds like you are exploring rendering DOM elements from a browser using their computed styles. That would be great to explore but I just haven't looked into it.
I may explore it for my use case so I'll PR the changes if it goes ahead and yes you are right I'm rendering from the browser.
https://github.com/mikey0000/react-pdf-html/tree/feature/use-ref
work in progress. By no means perfect. I'll be working on it for a few days more at least
https://github.com/mikey0000/react-pdf-html/tree/feature/use-ref
work in progress. By no means perfect. I'll be working on it for a few days more at least
@mikey0000 awesome. May I suggest a few separate PRs? I'm noticing that you are dealing with multiple things at once in that branch (support for additional tags, further image support, etc)
Yeah I'll have to spend some time to split it out into usable PRs, just needed to work on getting it working first. There are some hurdles with images but I'll PR svg support(when it's completed which shouldn't be hard) and the additional tags that were missed (section and span)
3/09/2021 9:24:56 am Dan Blaisdell @.***>:
https://github.com/mikey0000/react-pdf-html/tree/feature/use-ref
work in progress. By no means perfect. I'll be working on it for a few days more at least
@mikey0000[https://github.com/mikey0000] awesome. May I suggest a few separate PRs? I'm noticing that you are dealing with multiple things at once in that branch (support for additional tags, further image support, etc)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub[https://github.com/danomatic/react-pdf-html/issues/5#issuecomment-912068578], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AALDOPM6L6CIKHTYYFQC5O3T77TR5ANCNFSM5CABS4LQ]. Triage notifications on the go with GitHub Mobile for iOS[https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675] or Android[https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub]. [data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAABCCAYAAADjVADoAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAAnSURBVHic7cEBDQAAAMKg909tDwcUAAAAAAAAAAAAAAAAAAAAAPBjRFIAASHKmKkAAAAASUVORK5CYII=###24x24:true###][Tracking image][https://github.com/notifications/beacon/AALDOPPUFPNKGTFRHDANMYDT77TR5A5CNFSM5CABS4L2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGZOQ7YQ.gif]