Display PDF as Image in HTML

Sp0rk-eh

New Member
What is the best way to display a pdf in your browser using HTML?The main goal here is to display the pdf as if it was a normal image. The user of the website uploads a pdf file, this file gets separated in his different pages using PyPDF and then each page should be displayed on the webpage. So with each page as a different image.This would be ideal:\[code\]<img src="http://stackoverflow.com/questions/15486233/test_page1.pdf"><img src="http://stackoverflow.com/questions/15486233/test_page2.pdf">\[/code\]I have been trying to do this by using ImageMagick (Python) to convert my pdf's to images however this causes some difficulties:
  • Crashes sometimes
  • The quality of the image severely decreases
  • Size increases
Is there a better way to accomplisch this? I would prefer a non-server dependent method if that exists!
 
Back
Top