I'm pretty sure that you can't render pdf to the browser. You can either 
provide links for the users to download and view the pdfs, or extract the 
content from the pdfs and put that in your templates.

You may be able to get what you want with javascript. I can't vouch for 
this, but I found it searching - 
https://pspdfkit.com/blog/2018/render-pdfs-in-the-browser-with-pdf-js/

good luck

On Sunday, November 11, 2018 at 1:09:48 PM UTC-5, Vikas Sri wrote:
>
> I am preparing learning tutorial application in Django, which will contain 
> PDF's  that I need to display in my templates. I tried <embed>, <iframe> 
> etc but nothing worked. Do I need to install something to make it work?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c9aae107-7deb-46e7-b1db-8c35592049de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to