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

197
Views
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
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!