1

I have a large PDF and I need to show it 50% reduced in size inside a div tag that is 600px 600px in size. I also need to offer the client a zoom function.

Should I use the "object" tag? But can I reduce the pdf size inside an "object"?

Is there a jquery example or anything out there?

Need help.

Dan
  • 9,257
  • 5
  • 40
  • 72
Erik
  • 5,533
  • 26
  • 67
  • 113

2 Answers2

1
<div>
  <object data="febrero2012.pdf" type="application/pdf"  width="600px" height="600px">
    alt : <a href="febrero2012.pdf">febrero2012.pdf</a> 
  </object>
</div >

I coudn't find the way to set a default zoom level yet. If you find a way, please let me know.

Rafał Rawicki
  • 21,626
  • 3
  • 57
  • 77
Ele
  • 11
  • 1
0

No. PDFs cannot be displayed in a DIV, as they're not html or an image. You can convert the PDF to html/images on the server and display that, just like google's "quick view" function does. But in general, PDF rendering in-browser is dependent on the presence of a plugin (e.g. Adobe Reader, Chrome's built-in rendering engine notwithstanding). Plugins can't be displayed in divs, just embed/object/iframe sections.

Marc B
  • 348,685
  • 41
  • 398
  • 480
  • But what about in an `` section - I am experiencing same issue as Erik, can't adjust zoom of PDF even within object tag. I asked a separate question here: http://stackoverflow.com/questions/25917007/zoom-and-other-parameters-on-embedded-pdf-object-not-working – Dan Sep 18 '14 at 16:20