Skip to content

Instantly share code, notes, and snippets.

@tshrinivasan
Created August 2, 2024 13:45
Show Gist options
  • Save tshrinivasan/0707a24ebbae53409b1e5f6a40e0fad2 to your computer and use it in GitHub Desktop.
Save tshrinivasan/0707a24ebbae53409b1e5f6a40e0fad2 to your computer and use it in GitHub Desktop.
Embed archive.org books in HTML page
<h1> Embed archive.org books in HTML page </h1>
<br/>
<br/>
<h1> Double page embed mode </h1>
<!-- thanks to https://stackoverflow.com/questions/7847465/pre-tag-wont-show-text-containing-iframe for the fix on pre and embed -->
<pre>
&lt;iframe src="https://archive.org/embed/perinbak-kaadhal" width="80%" height="800" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen&gt;&lt;/iframe&gt;
</pre>
The default code from "embed" option at archive.org gives double page book view.
<br/>
<br/>
<iframe src="https://archive.org/embed/perinbak-kaadhal" width="80%"
height="600" frameborder="0" webkitallowfullscreen="true"
mozallowfullscreen="true" allowfullscreen></iframe>
<br/>
<br/>
<h1> Single page embed mode </h1>
<pre>
&lt;iframe src="https://archive.org/embed/perinbak-kaadhal?ui=embed#mode/1up" width="80%" height="800" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen&gt;&lt;/iframe&gt;
</pre>
<iframe src="https://archive.org/embed/perinbak-kaadhal?ui=embed#mode/1up" width="80%" height="800" frameborder="0" webkitallowfullscreen="true" mozallowfullscreen="true" allowfullscreen></iframe>
<br/>
<br/>
add "?ui=embed#mode/1up" with the URL to get single page view on the embedded viewer.
<br/>
<br/>
<br/>
<br/>
<br/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment