How to embed pdf file into books.google.com? - html

Hi I have problem that I want to embed my website pdf file in books.google.com by iframe. I have tried that answer but I dont know that how to give my site link to iframe
<iframe frameborder="0" scrolling="no" style="border:0px" src="https://books.google.com.kh/viewerng/viewer?embedded=true&url=website.com/test/CV.pdf" width="500" height=500></iframe>
So any suggestion or help would be very much appreciated. Thanks!

It does't seem that you ever uploaded your PDF to books.google. You will have to do so in order to get the embed code to include in you site.
With the direct link you provided, you can embed that like this:
<iframe src="http://www.softbroz.com/test/CV.pdf" style="width:718px; height:700px;" frameborder="0"></iframe>
If you want to embed a PDF from books.google, you will have to upload the PDF first, then follow these instructions:
Embed a PDF located on google drive
Select your PDF in Google Drive. In the toolbar click on the eye
icon to preview the PDF.
You need to pop out the PDF by clicking on the Pop-out icon (square
with an arrow).
The more options icon (3 dots) has the option to embed the PDF.
Copy the embed code. Use this in your site. Notice the default height and width in the code of
640 by 480 pixels. You may want to edit those values to show the
size you want in your embed.

Related

How can I directly embed audio that I have uploaded to OneDrive into HTML using the <audio> element?

I would like to know how I can directly embed an audio file that I have uploaded to OneDrive in HTML using the <audio> element.
I know there's always an Embed button in OneDrive, but I don't want that. That really only provides a big rectangle-shaped thing with a music icon and the filename, and when I click that, I'm still redirected to OneDrive. How can I really embed this using the HTML <audio> element?
I actually already tried the Copy Audio Location menu item from Firefox's context menu. It gave me a link that worked in the Dreamweaver's Live Preview (in the split view), but it didn't work in any other browser, including Firefox and Chrome.
I would like to use pure HTML to do this, i.e. no JavaScript.
Does anyone know how to do this? Thanks!
You can probably do it this way:
Get the direct link to the file:
how to do it:
Open OneDrive and Copy Embed Code
Paste the Embed Code and Modify:
Now paste the embed code you copied in a notepad or a text editor. This code looks like this one – <iframe src="https://onedrive.live.com/embed?cid=FA476CAFF1A7E75C&resid=FA476CAFF1A7E75C%21122&authkey=AN_axXpcOy7Zfl8" width="98" height="120" frameborder="0" scrolling="no"></iframe>. You have to modify this code, remove everything except source URL of the file https://onedrive.live.com/embed?cid=FA476CAFF1A7E75C&resid=FA476CAFF1A7E75C%21122&authkey=AN_axXpcOy7Zfl8 and then just replace embed with download to get direct/permanent link. After this modification, the link should look like this – https://onedrive.live.com/download?cid=FA476CAFF1A7E75C&resid=FA476CAFF1A7E75C%21122&authkey=AN_axXpcOy7Zfl8
That’s the OneDrive direct or native link
Use this link in the audio tag:
<audio src="https://onedrive.live.com/download?cid=FA476CAFF1A7E75C&resid=FA476CAFF1A7E75C%21122&authkey=AN_axXpcOy7Zfl8"></audio>
I mean provide into src the link you get from OneDrive.

How to make GoogleBot recognize embedded object in HTML?

<object width="900" height="900" data="https://docs.google.com/gview?embedded=true&url=http://example.com/mydoc.pdf"></object>
I embed PDF on my site using the above code. The GoogleBot does not "see" the pdf embedded. The page has no other visual content on it except a link to download the same PDF. I want the bot to read the PDF and want the page to show up in SERP.
Will it work? If not, what are the options?

Is it possible to embed a Google Map in a Github pages site?

Does anyone know if it's possible to embed a Google Map using iframe into a Github pages page built using the automatic page generator?
For example, I would like to embed something like this:
<iframe src="https://www.google.com/maps/embed?pb=!1m16!1m12!1m3!1d100921.8397227734!2d-122.50711698562192!3d37.77111185957552!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!2m1!1sGithub!5e0!3m2!1sen!2sus!4v1464784986282" width="400" height="300" frameborder="0" style="border:0" allowfullscreen></iframe>
When I try to embed the above, however, the iframe element appears to be stripped from the final HTML so that no map is shown.
I looked around a bit and couldn't find much information on embedding maps, or in general, using iframe elements in Github pages.
People appear to have luck embedding Youtube videos within an iframe, but the same tweak does not help with the maps.
Any suggestions?
You will not be allowed to insert iframe from the page generator.
You have to edit your page from, for example, https://github.com/username/repositoryname/blob/gh-pages/index.html, by clicking on edit button (see picture) and insert your iframe code.

Embed PDF in mobile browsers

I have the code below which is a perfect solution to what I need, which would essentially be embedding any of JPG, GIF, PNG or PDF files in my webpages. It works perfectly in PC browsers, but a critical requirement for the pages is to have them compatible in mobile browsers due to its target users.
<iframe src="uploads/test1.pdf" width="auto" height="auto"> </iframe>
Although image files work fine, PDF files are opened separately in the mobile browser and not embedded inline in the web page. What would be an alternative solution or implementation to this?
You can use PDFJs library. Using just JS you can render pdf files.
Please , check here : https://mozilla.github.io/pdf.js/
One simple option is that the the object element provides a fallback, so you can do:
<object data='some.pdf'>
<p>Oops! Your browser doesn't support PDFs!</p>
<p>Download Instead</p>
</object>
Then, when the mobile browser can't get the item, it'll just show this and you'll be all set, kinda.
Here is my solution to this problem.
<object data="mypdf.pdf" type="application/pdf" frameborder="0" width="100%" height="600px" style="padding: 20px;">
<embed src="https://drive.google.com/file/d/1CRFdbp6uBDE-YKJFaqRm4uy9Z4wgMS7H/preview?usp=sharing" width="100%" height="600px"/>
</object>
Explanation:
<object> tag has a feature that when it is unable to load item, it loads the content inside itself i.e tag.
Since object tag cannot load on mobile view, therefore on mobile devices, embed tag will become active.
Q) Why can't we directly use tag for all cases?
You can actually, but since the embed tag is loading file from
drive, it does not gives any user controls for the pdf that we see
with object tag (zoom, page no., etc.). So our code will give the user pdf view controls atleast in the desktop mode instead of not giving any controls at all.
Q) Direct drive links don't work....so why this solution?
In the above google drive URL, view is changed to preview.
drive.google.com/file/d/1CRFdbp6uBDE-YKJFaqRm4uy9Z4wgMS7H/view?usp=sharing
becomes,
drive.google.com/file/d/1CRFdbp6uBDE-YKJFaqRm4uy9Z4wgMS7H/preview?usp=sharing
So, we can make direct drive links work with this little modification
Google Docs viewer offers a feature, that lets you embed PDF files and PowerPoint presentations on a web page.
<iframe src="https://docs.google.com/viewer?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:100%; height:650px;" frameborder="0"></iframe>
replace the URL(http://infolab.stanford.edu/pub/papers/google.pdf) with your own address, It's worked for me but it takes more time to load on
src:http://googlesystem.blogspot.com/2009/09/embeddable-google-document-viewer.html?utm_source=pocket_mylist
The only way I have found, which allows you to embed pdf is using Google drive, then select the menu button once you have opened your file, and select get embed code, you can only use a Google drive or Google docs reference. And you must also turn public sharing on otherwise others won't be able to view it without permission.
Using Adobe PDF Embed API solved my problem.
Adobe PDF Embed API
I ran into the same issue. As a new developer, I wasn't aware that mobile browsers have issues embedding PDF files in iframes. I am now... lol
I racked my resources trying to get this to work when it dawned on me that mobile browsers do not have an issue displaying PNG files in a new window. So, in my infinite wisdom, I opened the PDF files in Gimp 2.0 then exported them as PNG files. And then I created buttons for the user to click and now it opens the graphic instead of trying to embed the PDF.
Looks like this:
<input class="AG" id="UnityBtn" type="button" value="Unity" onclick="location.href='../Meeting_Info/Unity.png'" />
I don't know if this is possible for you, but it worked beautifully for me.
Use an object tag with a iframe tag inside your object tags.
The object data can be a pdf or png file by changing the type and can use any link you want stored wherever, however the I frame is the one which will be loaded for mobiles which has to be a link from Google drive or Google docs you also need to allow the files to be shared public otherwise others won't be able to view them.
I would share the code but this site has some rubbish rules about code and won't let me share them so I'll leave you to Google how object and iframe tags work by viewing better sites that actually wants the help from developers.
Have fun guys!

Embed a Powerpoint in a Web Page

Is there any way to embed a PowerPoint slide show in an HTML page using just the standard tags etc? I tried using a iframe, but that just results in the PowerPoint being downloaded.
<iframe src="Chapter1.pptx">Your browser does not support.</iframe>
I am looking for a way to show the slide show using only standard stuff. I realize I could use google docs or flash or something, but I'd rather have a simple implementation.
Does the web just not know how to process a PowerPoint presentation?
Plain and simple...this is the best method to embed any Microsoft or Adobe file into a HTML website.
<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[https://www.your_website/file_name.pptx]' width='100%' height='600px' frameborder='0'>
Just to update this question - as there is a new way to embed Powerpoints in a web page. If you have an account on OneDrive, do the following using Powerpoint Online (accessing Powerpoint via the browser) to embed a Powerpoint:
Click 'File', then 'Share', then 'Embed'
Click the 'Generate' button to generate HTML code to be embedded
Copy the 'Embed Code' and paste it in the HTML of a website
Web browsers don't understand power point, but there are solutions besides Flash.
You could export it to HTML or a PDF. Or you could also upload to site like slideshare and make use of their players which are built for this problem.
I have decided to take a hack route and upload the powerpoint onto YouTube and then just include the youtube video in the iframe.
<iframe height="375" width="600" src="http://www.youtube.com/embed/assignedId"></iframe>
I know, it's cheap, but it's also easy.
EDIT
I eventually checked my page as XHTML Strict, which does not support the <iframe> tag. So I used the object tag instead.
<object data="http://www.youtube.com/embed/assignedId">
I tried answer posted by Shane, which looks exactly right and how MS used to have PPT viewing online earlier but it didn't worked for me. After doing some research I found out that the link has changed a bit.
So use:
https://view.officeapps.live.com/op/view.aspx instead of https://view.officeapps.live.com/op/embed.aspx
Example:
<iframe src='https://view.officeapps.live.com/op/view.aspx?src=[https://www.your_website/file_name.pptx]' width='100%' height='600px' frameborder='0'>
Note: Link to PPT need to be publicly accessible.
Use Microsoft skydrive, upload your power point to this site and use this code
where
http://skydrive.live.com/redir.aspx?cid=20f065afc1acdb2e&page=view&resid=20F065AFC1ACDB2E!723&parid=20F065AFC1ACDB2E!719 is the URL of the powerpoint file.
You have to replace SD20F065AFC1ACDB2E!723 for your own string of the corresponding URL
Upload a PowerPoint document on your Google Drive and then 'Share' it with everyone (make it public):
Sharing your pptx doc
Then, go to File > Publish to the web > hit the publish button.
Go to Embed and copy the embed code and paste it to your web page
Copy embed code
Works Best for me.
Goto MS View Office Documents Online Page
Enter link to PPT file
Note: This link should be publicly Accessible
Click on Create URL.
Link to view office documents online will be generated.
Paste this link to any webpage or as iframe src attribute.
You are all set!! :)
If you are using Google slides you could easily publish it on the web and also embed the slide in an iframe.
Go to google slides -> file-> sharing -> embed and copy the code
and then in your HTML file use the below code to show slides in fullscreen mode.
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/journey.css">
</head>
<body>
<!-- show slides in html web page -->
<iframe src="https://docs.google.com/presentation/d/e/2PAxxxxxCX-xxxxxxxx-_GuZImZqRUxxxxxxxxxx/embed?start=true&loop=false&delayms=3000" frameborder="0" width="1440" height="839" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe>
</body>
</html>
why not use prezi, I just use it in my work, very easy and useful.
I was able to do this by saving the PPT as an mp4 (Save As > MPEG-4 Video (*.mp4)) and then using the video tag.
<video controls autoplay preload="none" style="width:1000px;">
<source src="/_dev/power_point/m11983.mp4" type="video/mp4" />
<p>Your browser does not support HTML5 Video.</p>
</video>