0

I want to display the different pdf view on button click (small,large,medium etc). I used object to display the pdf file.

<div id="pdfview">
   <object data="filename#view=FitH" type="application/pdf" style="width:100%;" id="pdfHeight" >
      <embed src="filename#view=FitH" type="application/pdf" />
   </object>
</div>

I need to change the pdf view without reloading, when click on a button named as Small PDF, then the width of the div having id pdfview changed to width:30%.

Abhilash Ravindran C K
  • 1,818
  • 2
  • 13
  • 22
Ann
  • 471
  • 9
  • 22
  • May I ask what is a pdf view and what type of framework are you using? Plain HTML and Javascript or some JQuery too? – Eugenio Mar 20 '18 at 11:35
  • @Eugenio Plain HTML and JQuery – Ann Mar 20 '18 at 11:37
  • Do you just want to change the height of the pdf object on click? – Eugenio Mar 20 '18 at 11:39
  • @Eugenio I need to fit the PDF in the dynamic width which is small, large or medium view. – Ann Mar 20 '18 at 11:39
  • @Eugenio I want to change the width of the pdf, Large PDF means zoomed one.. Is it possible ? – Ann Mar 20 '18 at 11:42
  • See if you like the answer, if you need anything else or you have any suggestions just ask in the comments down there! EDIT: Nevermind, I just found out what you were trying to do and will redirect you to this other post: https://stackoverflow.com/questions/20562543/zoom-to-fit-pdf-embedded-in-html – Eugenio Mar 20 '18 at 11:53

0 Answers0