Hi, I want to show a barcode in the pdf document.
I used the
But this component renders a svg element in the background, and I suppose only View, Text components are available within react-pdf, so it's throwing an error.
Is there a way to show it?
Hey.
The only way right now would be getting the svg as a jpeg or png image. Unfortunately svg are not supported right now (#29) but I plan to work on this soon!
@moparlakci Did you figure out how to do this? I'm trying to do the exact same thing. Can't figure out how to get a jpeg or png from 'react-barcode'.
Is this fixed ?
SVGs are supported on 2.0. It's currently on npm as a beta version. Feel free to try rendering barcodes!
I tried to use the current beta version (2.0.0-beta.5) from npmjs but I couldn't get it to work.
Could you please provide an example for using react-pdf in combination with react-barcode?
is there a sample with react-barcode?
Most helpful comment
I tried to use the current beta version (2.0.0-beta.5) from npmjs but I couldn't get it to work.
Could you please provide an example for using react-pdf in combination with react-barcode?