'can i scale a react component like an SVG
i have a website where i had a pdf preview as a react component, the pdf should be in real dimension, all works smooth until I start working on making the website responsive, I didn't know wt to do exactly with the pdf preview, I have an idea to scale the whole component up and down like we do with an SVG but idk if that's possible to do
Solution 1:[1]
I think you better use a library to preview the PDF.Since you want to make it responsive without affecting the preview.You may make use of libraries like react-pdf. This library may generate PDF files from a URL, a local file within the project, or a base64 encoded version.
And i found this article useful. Hope this may help you!
And as you have mentioned you have some troubles installing react-pdf it's not very compatible with webpack5that is mostly due to Buffer dependency. Refer to thsi :react-pdf issues
Without knowing the exact error, it's so difficult to help, so be more specific when you are asking questions.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
