Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

372
Views
Save react-pdf rendered file to state for sending it to server?

im using react-pdf library i managed to save file localy but now i would also need to save it on server since i am required to do a history display of all the files that were generated by a certain user.

                                    document={
                                        <DailyAssetPDF
                                            information={{ title, subtitle, locationName, today, selectedAssetName }}
                                            tableData={tableData}
                                            image1={{
                                                chart1, chart2, chart4 // donut chart
                                            }}
                                            image2={
                                                this.chartRef3.current.chartInstance.toBase64Image() || // chart bar
                                                ""
                                            }
                                            LN={LN}
                                            language={language}
                                        />
                                    }
                                    fileName={`${title}.pdf`}
                                >
                                    {({ loading }) =>
                                        loading ? (
                                            LN[language].loadingDocument
                                        ) : (
                                            <Button>{LN[language].report_export_btn}</Button>
                                        )
                                    }
                                </PDFDownloadLink> ```
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

the best solution for me was:

  1. send the data that we want on the pdf file from react to backend [json FORMAT]

  2. create the same pdf in the backend and save it there [using multer ..] OR on DB

for more inspiration visit : https://github.com/exportsdk/sample-react-pdf-api

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!