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

203
Visualizações
Is there an appropriate way to open a PDF from a temporary directory in a browser window using Python or is Javascript preferable?

I am currently generating a PDF from user input data on the Python side using ReportLab, after the PDF gets done generating it is saved using canvas.save() where it is saved temporarily into a directory such as 'static/tmp/example.pdf'. Currently, I just send the pdf to the user to save using return send_file(f"static/tmp/{example}.pdf", as_attachment=True) but I would like to be able to have this PDF open into a separate browser window where they can preview the PDF before saving it. I've tried a few methods with Python but no luck, is this feasible on the Python side, or would doing this on the Javascript side after the PDF is generated be more appropriate? Thanks!

about 4 years ago · Juan Pablo Isaza
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