Question

How to stop blocking pdf from displaying?

Posted December 10, 2014 4.1k views

I am new to web development so I do not know what exactly causes the problem: apache2 or ubuntu or something else. Yesterday I followed this tutorial ([https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps) and deployed my fist app online(Ubuntu 14.04 and apache2). It is written in Flask/Python. My app writes some data to a text file which is used later for generation of a pdf file which is displayed to the user using PDF.js extension. Unfortunately, a pdf is not displayed because either a text file was not generated or pdf is blocked from displaying. Everything works great on my local server. So, I am wondering how to give permission for writing a file and displaying a pdf. Any suggestions are highly appreciated!

Thanks

3 comments

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Does the error stands for this occur all the time you’re trying to open a PDF document in a browser? Or sometimes it shows a file preview but there’s nothing but blurry or a blank page? If it does happen from time to time so it might well be a problem with the proper formatting of the PDF’s it depends on in what way do you generate or upload them. Try to drop them here eg https://ds11.pdffiller.com it shall work in such a fashion, try to save them as a new file as well

Submit an Answer