Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

380
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda