Created
October 1, 2020 01:00
-
-
Save JacobFischer/aecbd871cb2aae46993236f65797da5c to your computer and use it in GitHub Desktop.
Thank you so much. It's work now. using
const asPdf = pdf([] as any);
Thank you so much. It's working.
Hi @JacobFischer
Im able to download PDF using your solution, but im not getting any data of images or text which i dynamically fetching to pdf it just shows empty
Any idea how to resolve this please
Hello, please tell me what to transfer to asPdf.
thanks a lot, thats work!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My guess is
@react-pdf/renderer
's TS types have been updated since I wrote this gist, and the type signature for thepdf()
constructor has changed. If you wish to "hack" a solution, you could always do anany
cast (though it's dangerous as you are losing type safety in the future):It looks like it wants a
DocumentProps
typed object. I'd suggest looking at what expected key/values exist inDocumentProps
and adding them to make TypeScript and@react-pdf/renderer
happy, without hacks.