ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have seen this done many years (I get a web page with adobe acrobat open inside of a small box where the pdf is displayed). I want to be able to do this in HTML code. I want to have an embedded pdf file inside of a box displayed in an html page. I have tried the many reccomendations that have been suggested throughout the internet but many require third party services to hold the file somewhere for hosting. I want to host my own pdf file so I can embed it myself. I'm guessing that if you leave the pdf file alone and never access it for a while they remove it, that's only my guess I just want to be able to embed a pdf document in an html page without installing anything extra.
<html>
<head>
<title>Hello Worlds, I just learned how to embed a pdf</title>
</head>
<body>
<iframe id="fred" style="border:1px solid #666CCC" title="PDF in an i-Frame" src="http://216.82.199.195/images/pdf/walton.pdf" frameborder="1" scrolling="auto" height="1100" width="850" ></iframe>
</body>
</html>
And it did the trick, i never looked into using iframe (mainly because I haven't coded HTML in a while, I just use CMS platforms now but I see some need to insert html every now and then). The way it works is that it depends on what kind of browser you have and what types of plugins it has, Some have the plugins to display embedded PDFs and some don't. I tried it with two different browsers. The browser I tried first was epiphany which downloaded the pdf file into the downloads directory and only displayed a rectangle. Next I tried chrome (a more feature-full browser should do the trick). And low and behold the browser has the appropriate pdf reading plugin (chrome's native pdf reader) and it turned up. Never thought about iframe before you brought it up. I am wondering now if it's possible to embed word documents, and presentations (a stretch i guess but I'm just wondering)
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
Think I'd stick with PDF -- unless, of course, you're only serving Microsoft platforms with Word (or the significantly more expensive Office) available on the boxes. You might get lucky and have a visitor that has LibreOffice or OpenOffice (both of which can deal with all the Office formats), but, then, maybe not, eh? There are browser plug-ins for Word and the like, but those do point to software living on the box, ya know.
The entire rationale for PDF is that it's Portable Document Format; Firefox has an embedded reader, KDE has Okular, Linux has more than a couple of PDF readers. 32-bit boxes (or multilib-enabled ones) have Adobe Reader (no 64-bit Reader... yet, perhaps never).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.