ivmarcos/react-to-pdf

Is it possible to create a pdf by hiding content elements?

Closed this issue ยท 6 comments

Is it possible to create a pdf by hiding content elements?

Oh absolute yes, Thank you.

Is there any way to do the opposite: hiding certain components or elements ONLY when being exported to PDF?

@t3db0t you can achieve this using data-html2canvas-ignore="true"

https://stackoverflow.com/a/43253745/7577691

@aaronzhongg Oh amazing, thank you!

Hi @woraput , do you mean like this?

https://codesandbox.io/s/fast-frost-m43fg7?file=/src/App.tsx

Is there any way to do this in JS?