title: Embed PDF on webpage and scroll horizontally to center it
body: <p>I have added a PDF to a webpage using the embed tag. The width of the embed window is smaller than the width of the PDF. So, A horizontal scroll bar appears. However, there are wide margins on the left and the right of the PDF document itself. If user scrolls center to the PDF, the PDF's content fits perfectly. </p>
  
  <p>I would like to have this scrolling happen automatically if possible.</p>
  
  <p>The code is here <a href="http://shop.stelladoradus.com/product/gsm-repeater/" rel="nofollow">http://shop.stelladoradus.com/product/gsm-repeater/</a><br>
  You must click on the specification tab to see the PDF.</p>
  
  <p>For google chrome I did the following:</p>
  
  <p>I used an Iframe instead of the embed</p>
  
  <pre><code>&lt;iframe id='pdf_embed' height='1300' style='width: 734px; margin-left: -40px;' src='iframe_url?pdf=pdf_url.'&gt;&lt;/iframe&gt;
  </code></pre>
  
  <p>on the iframe page I have:</p>
  
  <pre><code>&lt;style&gt;
  object{
      width: 200%;
      margin-left: -370px;
      margin-top: -150px;
  }
  embed{
      width:100%;
      height:95%;
  }
  &lt;/style&gt;
  &lt;html&gt;
  &lt;body &gt;
      &lt;object height='1430' data="&lt;?php echo $_GET['pdf']; ?&gt;" type="application/pdf"&gt;
          &lt;embed height='1430' src="&lt;?php echo $_GET['pdf']; ?&gt;" type="application/pdf" /&gt;
      &lt;/object&gt; 
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This solution is actually exactly what I was looking for, as the pdf is zoomed in so the margins aren't showing, and its easier to read (bigger text). I couldn't get it to work for firefox or IE, for that you can use @Infer-On solution below.</p>