0

This is a very general question, yet I don't seem to find any answer anywhere.

I have a Python program that manipulates documents using the PyMuPDF library, and then would like to show them through Flask on a <object> html tag. The data argument just accepts URL, so I was wondering if it was even possible. Is it possible to show a document on memory without needing to save it onto a file first?

Clement Genninasca
  • 732
  • 1
  • 4
  • 14
  • The reason I’m not using a temporary file is because I already take the document from a SQL database, and I feel like there must be a way of doing this without creating another copy. Also, concerning @Jorj McKie, I specify PyMuPdf since I open anyways the document with it, so it may have a function I don’t know about. – Clement Genninasca Aug 04 '22 at 15:16

1 Answers1

0

This is obviously independent from PyMuPDF. Mentioning it in the title is therefore misleading. As per your question, I think this is not possible: you must specify a valid URL. Why not storing the PDF in memory in a temp file?

Jorj McKie
  • 2,062
  • 1
  • 13
  • 17