Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

373
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda