T
T
thaessaep2020-08-20 07:46:48
Python
thaessaep, 2020-08-20 07:46:48

How to display a pdf file on a website page?

Good afternoon.

The task is this: when you click on the button, the site should transfer the user to a new html page. This page should display a file (any format is possible, but as I understand it is better to work with pdf), stored in the project folder.

PS I looked at the output through iframe, embed and object, but they only work when you open the html file locally on the PC. When launched with flask, there is either nothing on the page, or there is an empty frame (when using the iframe tag)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Adamos, 2020-08-20
@Adamos

Any modern browser simply opens the PDF as a page.
Give a link - and the user opens, saves, prints - as he pleases and conveniently.

M
Maxim, 2020-08-20
@maxpointn2point

perhaps this option is suitable
https://habr.com/en/post/111647/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question