PDF inserted into HTML - Post ID 127302

User 427108 Photo


Registered User
292 posts

Hi
I want to insert a PDF file into a HTML page and once open the HTML display the PDF. It's possible?
Thanks
Jimmy
Jimmy The Sailor
http://www.jimmythesailor.net (trying to show my photos)
http://www.art-i-batik.com (my wife's gallery)
User 184085 Photo


Ambassador
1,707 posts

<object data="data/test.pdf" type="application/pdf" width="300" height="200">
alt : <a href="data/test.pdf">test.pdf</a>
</object>


Save with .shtml extension

works cross browser but IE Mac 5.2.3 Lynx 2.8.5 don't like it.
Volunteering to help :)
http://www.tbaygeek.ca
My HTML play area
http://www.tbaygeek.ca/test/
User 184085 Photo


Ambassador
1,707 posts

User 427108 Photo


Registered User
292 posts

Hi
Thanks
I tested already this code and worked with Opera, Safari and Chrome but not with FF and IE8.
I will change the extension for .shtml and test.
Jimmy
Jimmy The Sailor
http://www.jimmythesailor.net (trying to show my photos)
http://www.art-i-batik.com (my wife's gallery)
User 427108 Photo


Registered User
292 posts

and failed again.... tomorrow is another day :D
Jimmy The Sailor
http://www.jimmythesailor.net (trying to show my photos)
http://www.art-i-batik.com (my wife's gallery)
User 184085 Photo


Ambassador
1,707 posts

works for me here

http://www.lnfnresources.com/project_map.shtml

are you using it on your local machine or uploaded to a server?
Volunteering to help :)
http://www.tbaygeek.ca
My HTML play area
http://www.tbaygeek.ca/test/
User 427108 Photo


Registered User
292 posts

Thanks David
You are right, tested on server and worked. :)

Regards
Jimmy
Jimmy The Sailor
http://www.jimmythesailor.net (trying to show my photos)
http://www.art-i-batik.com (my wife's gallery)
User 46210 Photo


Registered User
1 post

I want to display a pdf file that has internal bookmarks to other files. When I view the pdf file directly using Acrobat Reader, the bookmark links work properly. When I view it in IE8 only the first document displays and the bookmark links in that first page do not work. How can I get the bookmark links to work when viewing the pdf file in IE8? Thanks.
User 427108 Photo


Registered User
292 posts

Hi John
How do you do the links? Do you insert the complete path? like this: "http://www.yoursite.com/yourpage.html"?
Jimmy The Sailor
http://www.jimmythesailor.net (trying to show my photos)
http://www.art-i-batik.com (my wife's gallery)
User 184085 Photo


Ambassador
1,707 posts

try adding #page=53&pagemode=bookmarks to your object statement to specify the start page number and turn on bookmarks.

so <object data="data/test.pdf" type="application/pdf#page=53&pagemode=bookmarks" would change to <object data="data/test.pdf" type="application/pdf"
Volunteering to help :)
http://www.tbaygeek.ca
My HTML play area
http://www.tbaygeek.ca/test/

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.