#@react-pdf/renderer

3 messages · Page 1 of 1 (latest)

marble girder
#
  • I am using this library to generate and download PDFs in My Next.js15 web app, but whenever I tried to render a component (button to download or view the pdf) with <PDFDownloadLink> or <PDFViewer> from react/pdf I got an error that is shown in the image.
  • I am getting the data that should be used to generate the PDF from a Form (using react-hook-form) in a client component, and also the button to download or view the pdf is presented inside this client component.
  • I tried these solutions from the web:
    -> using dynamic import with ssr: false.
    -> using "use client" with useState and useEffect to render the button only if isClient = true.
    But I didn't succeed. Is there a way to solve this problem or has anyone faced the same scenario when they need to get data to create a dynamic pdf file and faced this error.
    Thank you🫡
willow gyroBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

ionic fern
#

@marble girder
what are the updates on your project?