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

204
Vistas
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 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