Currently I am Working on a workflow where on the left side are input fields and on the right half is a scalable pdf.
But actually I am not able to show a PDF in an iframe.
I am using django 2.1.1(python 3.7.2) on windows. Is there any solution to display a pdf in an iframe?
I hope you have some ideas..i looked up many sides an tried different solution but actually the pdf document is not shown.. Hope to hear from you soon!
Kind regards
I have experienced a similar setting where I wanted to render a PDF in a webpage. For that, I did the following : Wrote a view method (in
views.py) that renders the pdf's name. Indicated in theurls.pythe path used for the view method. Next, in the HTML file, I use the following line of code :The
{{ doc_file.url }}is the data obtained from the View method, it returns the PDF file location as a string. In my case, the pdfs were stored in theMEDIA_ROOTdirectory set insettings.py.