Link to home
Start Free TrialLog in
Avatar of Gemini532
Gemini532Flag for United States of America

asked on

Set the view of the PRF embedded in HTML

Hello EVeryone,
I have the following code to embed a PDF into HTML, and get it to fit inside our webpage.  The PDF has to stay at 50% because otherwise it's too big for the area we allowed it... We have other things on the page, like the right menu, etc... so the PDF has to fit at 50% or it stretches out...

Here's the code:
<IFRAME src="PDF/myDocument.pdf#destination" name=myIframe scrolling="no" frameBorder=0 id=myIframe style="Z-INDEX: 1; LEFT: 0px; WIDTH: 100%; POSITION: relative; TOP: 0px; HEIGHT: 700px" target="_self"></IFRAME>

I go to Adobe Acrobat>Zoom>Fit in Page, or Fit Width, but it does'nt work.
Do you know how to fix it?
Avatar of Karl Heinz Kremer
Karl Heinz Kremer
Flag of United States of America image

Embedding a PDF into a web page is a bad idea: It only works with Internet Explorer, and chances are that a new version of Explorer and/or Acrobat or Reader will break what you are doing.
You have to set the inital view of your document. In Acrobat 7, go to File>Document Properties... and select the "Initial View" tab. You can now set the "Magnification" so that the document looks correct.
Avatar of Gemini532

ASKER

and if I do this, change the magnification to 60%, will it show up as 60% on the computer of every person who comes to visit our website, or just my computer?
It will open with whatever the local Acrobat thinks is 60% (that depends on Acrobat being able to determine the screen resolution).
>> It only works with Internet Explorer

When I opened the website which had the embedded PDF into an .htm or .asp page depending on the code with Mozilla Firefox, I had no problem.  IT opened just as well as in IE.

My boss REALLY wants the PDF embedded, I cannot change her mind.... On the page there is a link which opens the PDF in a new window, for printing purposes or if the users want to see it bigger...

The only problem is that sometimes it does not shrink down to 50% and the users have to scroll to see the entire PDF...
Our website is made up of a MENU on the right of the screen and white area on the left and that's where all the information is, so the PDF must also fit in that white area and the only way to make it fit is it get it down to 50%

<<It will open with whatever the local Acrobat thinks is 60% (that depends on Acrobat being able to determine the screen resolution).

I'm not sure what you  mean by this....  Does this mean that even if I follow your instructions, some of the people who navigate our page will not see the PDF sharnk down to 50%?  They will have to scroll to see it all because the IFRAME will not stretch...  Is there a way around this?  I mean something I can do a programmer, I cannot go to the computer of the people who visit our website and change their acrobat or IE settings... But what I can do is write some text telling them how to change their settings in order to see the PDF without scrolling by chanign the  "Magnification" to 50%

If I add your instructions will that work for them?
I can write:

If the PDF requires scrolling, please set its magnification to 50%.  In order to do this, in Acrobat 7, go to File>Document Properties and select the "Initial View" tab, and set the "Magnification" to 50%.              

Is that correct? Should I add the instruction above the the htm pages that have PDFs embedded in them?
Can this same change be made in Adobe Acrobat 5?
ASKER CERTIFIED SOLUTION
Avatar of Karl Heinz Kremer
Karl Heinz Kremer
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial