<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>lab.naoki.sato.name &#187; ebooks</title>
	<atom:link href="http://naoki.sato.name/lab/archives/category/media/ebooks/feed" rel="self" type="application/rss+xml" />
	<link>http://naoki.sato.name/lab</link>
	<description>lab for naoki.sato</description>
	<lastBuildDate>Tue, 07 Sep 2010 13:11:15 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://naoki.sato.name/lab/archives/category/media/ebooks/feed" />
		<item>
		<title>iBookstoreで提供されているEPUB書籍の構造を覗く</title>
		<link>http://naoki.sato.name/lab/archives/163</link>
		<comments>http://naoki.sato.name/lab/archives/163#comments</comments>
		<pubDate>Wed, 12 May 2010 14:36:22 +0000</pubDate>
		<dc:creator>naoki</dc:creator>
				<category><![CDATA[ebooks]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[ipad]]></category>

		<guid isPermaLink="false">http://naoki.sato.name/lab/?p=163</guid>
		<description><![CDATA[先日来、日本でもiPadの予約が開始されましたが、幸運にも一足早く手にすることができました。
既に多くの方がレビューされているので細かなレビューはしないつもりですが、噂にたがわずとてもすばらしいアイテムです。おそらくこれまでiPhoneを使っていたり、メディアデータを積極的に電子化していた人にとっては現時点で最高のデバイスではないかと思います。
そんなiPadの数ある機能の中でも、特に注目されているのがiBooks。残念ながら日本ではしばらくサービスの提供が無さそうではありますが、本格的な電子書籍プラットフォームとして着目されている方も多いと思います。
ご存知のように、iBooksではアプリケーション内でiBookstoreというサイトにアクセスし、アプリケーション内で書籍を買うことができます。

このiBookstore内で使われているファイルフォーマットが、これまでこのBlogでも度々取り上げてきたEPUBです。
EPUBファイルについてはこの記事やこのタグを参照していただきたいのですが、基本的には、本の中身のデータと、メタデータとを一緒にZIP圧縮したファイルになっています。ということは、暗号化されている内容はともかくとして、どのようなファイル構造になっているかはこのZIPファイルを伸長すればわかるはず…
ということで、この度、以前から読まなきゃなーと思っていたChris Andersonの&#8221;Free&#8221;をiBookstoreで購入してみたので、その構造がどのようになっているか、EPUBで使われている各メタファイルの内容はどうなっているかを覗いてみたいと思います。なお、以下環境はすべてMacOSX 10.6です。


まず、iBooksに登録された本のうち、購入したもの、もしくは自分で登録したものは、オーディオブックと同じiTunesのBooksにまとめられます。iBookstore内の本はサンプルが取得出来るのですが、サンプルについてはBooksには入ってきません。
iBookstoreで購入した本のファイルは、音楽データと同じく、iTunesのライブラリの中に保存されます。例えば、今回の場合は ~/Music/iTunes/iTunes Media の下に Chris Anderson/Unknown Album/Free.epub のような感じで保存されていました。
さて、実態はZIPファイルである&#8221;Free.epub&#8221;を伸長してみると、次のようなファイル構成になっています。

naokisatoname:Free naoki$unzip Free.epub
naokisatoname:Free naoki$ls -l *
-rw-r--r--  1 naoki  staff  1644795  5  8 22:55 Free.epub
----------  1 naoki  staff    75928  5  8 22:30 iTunesArtwork
----------  1 naoki  staff     3769  5  8 22:55 iTunesMetadata.plist
----------  1 naoki  staff       20  3 25 21:10 mimetype

META-INF:
total 88
----------  1 naoki  staff    242  3 25 21:10  [...]]]></description>
			<content:encoded><![CDATA[<p>先日来、日本でも<a href="http://www.apple.com/jp/ipad/">iPad</a>の予約が開始されましたが、幸運にも一足早く手にすることができました。</p>
<p>既に多くの方がレビューされているので細かなレビューはしないつもりですが、噂にたがわずとてもすばらしいアイテムです。おそらくこれまでiPhoneを使っていたり、メディアデータを積極的に電子化していた人にとっては現時点で最高のデバイスではないかと思います。</p>
<p>そんなiPadの数ある機能の中でも、特に注目されているのが<a href="http://www.apple.com/ipad/features/ibooks.html">iBooks</a>。残念ながら日本ではしばらくサービスの提供が無さそうではありますが、本格的な電子書籍プラットフォームとして着目されている方も多いと思います。</p>
<p>ご存知のように、iBooksではアプリケーション内でiBookstoreというサイトにアクセスし、アプリケーション内で書籍を買うことができます。</p>
<p><a href="http://naoki.sato.name/lab/wp-content/uploads/2010/05/Picture-2.jpg"><img src="http://naoki.sato.name/lab/wp-content/uploads/2010/05/Picture-2-300x225.jpg" title="iBookstore" width="300" height="225" class="alignnone size-medium wp-image-165" /></a></p>
<p>このiBookstore内で使われているファイルフォーマットが、これまでこのBlogでも度々取り上げてきたEPUBです。</p>
<p>EPUBファイルについては<a href="http://naoki.sato.name/lab/archives/45">この記事</a>や<a href="http://naoki.sato.name/lab/archives/tag/epub">このタグ</a>を参照していただきたいのですが、基本的には、本の中身のデータと、メタデータとを一緒にZIP圧縮したファイルになっています。ということは、暗号化されている内容はともかくとして、どのようなファイル構造になっているかはこのZIPファイルを伸長すればわかるはず…</p>
<p>ということで、この度、以前から読まなきゃなーと思っていた<a href="http://www.amazon.co.jp/gp/product/4140814047?ie=UTF8&amp;tag=naokisatoname-22&amp;linkCode=as2&amp;camp=247&amp;creative=7399&amp;creativeASIN=4140814047">Chris Andersonの&#8221;Free&#8221;</a>をiBookstoreで購入してみたので、その構造がどのようになっているか、EPUBで使われている各メタファイルの内容はどうなっているかを覗いてみたいと思います。なお、以下環境はすべてMacOSX 10.6です。</p>
<p><a href="http://naoki.sato.name/lab/wp-content/uploads/2010/05/Picture.jpg"><img src="http://naoki.sato.name/lab/wp-content/uploads/2010/05/Picture-225x300.jpg" title="Free" width="225" height="300" class="alignnone size-medium wp-image-166" /></a></p>
<p><span id="more-163"></span></p>
<p>まず、iBooksに登録された本のうち、購入したもの、もしくは自分で登録したものは、オーディオブックと同じiTunesのBooksにまとめられます。iBookstore内の本はサンプルが取得出来るのですが、サンプルについてはBooksには入ってきません。</p>
<p>iBookstoreで購入した本のファイルは、音楽データと同じく、iTunesのライブラリの中に保存されます。例えば、今回の場合は ~/Music/iTunes/iTunes Media の下に Chris Anderson/Unknown Album/Free.epub のような感じで保存されていました。</p>
<p>さて、実態はZIPファイルである&#8221;Free.epub&#8221;を伸長してみると、次のようなファイル構成になっています。</p>
<blockquote>
<pre>naokisatoname:Free naoki$unzip Free.epub
naokisatoname:Free naoki$ls -l *
-rw-r--r--  1 naoki  staff  1644795  5  8 22:55 Free.epub
----------  1 naoki  staff    75928  5  8 22:30 iTunesArtwork
----------  1 naoki  staff     3769  5  8 22:55 iTunesMetadata.plist
----------  1 naoki  staff       20  3 25 21:10 mimetype

META-INF:
total 88
----------  1 naoki  staff    242  3 25 21:10 container.xml
----------  1 naoki  staff  16834  3 31 16:07 encryption.xml
----------  1 naoki  staff  12611  3 31 16:07 signatures.xml
----------  1 naoki  staff   1800  5  8 22:30 sinf.xml

OEBPS:
total 1536
drwxr-xr-x  24 naoki  staff    816  5 12 22:13 Images
----------   1 naoki  staff   2696  3 25 21:10 footnote1.html
----------   1 naoki  staff    748  3 25 21:10 footnote2.html
----------   1 naoki  staff   6977  3 25 21:10 free.opf
----------   1 naoki  staff   6193  3 25 21:10 free_ack01.html
----------   1 naoki  staff    930  3 25 21:10 free_adc01.html
----------   1 naoki  staff   1284  3 25 21:10 free_ata01.html
----------   1 naoki  staff   9187  3 25 21:10 free_bm01.html
----------   1 naoki  staff   5631  3 25 21:10 free_bm02.html
----------   1 naoki  staff   9665  3 25 21:10 free_bm03.html
----------   1 naoki  staff   6690  3 25 21:10 free_bm04.html
----------   1 naoki  staff   1240  3 25 21:10 free_bm05.html
----------   1 naoki  staff  17315  3 25 21:10 free_ch01.html
----------   1 naoki  staff  34932  3 25 21:10 free_ch02.html
----------   1 naoki  staff  46627  3 25 21:10 free_ch03.html
----------   1 naoki  staff  42426  3 25 21:10 free_ch04.html
----------   1 naoki  staff  42840  3 25 21:10 free_ch05.html
----------   1 naoki  staff  16078  3 25 21:10 free_ch06.html
----------   1 naoki  staff  39279  3 25 21:10 free_ch07.html
----------   1 naoki  staff  36256  3 25 21:10 free_ch08.html
----------   1 naoki  staff  68123  3 25 21:10 free_ch09.html
----------   1 naoki  staff  17279  3 25 21:10 free_ch10.html
----------   1 naoki  staff  21562  3 25 21:10 free_ch11.html
----------   1 naoki  staff  24337  3 25 21:10 free_ch12.html
----------   1 naoki  staff  20721  3 25 21:10 free_ch13.html
----------   1 naoki  staff  21209  3 25 21:10 free_ch14.html
----------   1 naoki  staff  14739  3 25 21:10 free_ch15.html
----------   1 naoki  staff  52401  3 25 21:10 free_ch16.html
----------   1 naoki  staff   1516  3 25 21:10 free_cop01.html
----------   1 naoki  staff    802  3 25 21:10 free_cov.html
----------   1 naoki  staff    839  3 25 21:10 free_cre01.html
----------   1 naoki  staff    610  3 25 21:10 free_ded01.html
----------   1 naoki  staff   3314  3 25 21:10 free_fm01.html
----------   1 naoki  staff  11611  3 25 21:10 free_fm02.html
----------   1 naoki  staff  58619  3 25 21:10 free_ind01.html
----------   1 naoki  staff    745  3 25 21:10 free_pt01.html
----------   1 naoki  staff    750  3 25 21:10 free_pt02.html
----------   1 naoki  staff    801  3 25 21:10 free_pt03.html
----------   1 naoki  staff   6427  3 25 21:10 free_toc.html
----------   1 naoki  staff    703  3 25 21:10 free_tp01.html
----------   1 naoki  staff   2634  3 25 21:10 page-template.xpgt
----------   1 naoki  staff  27403  3 25 21:10 pdlmsr.css
----------   1 naoki  staff   5158  3 25 21:10 toc.ncx
</pre>
</blockquote>
<p>すなわち、&#8221;Free.epub&#8221;の直下に&#8221;mimetype&#8221;、&#8221;iTunesArtwork&#8221;、&#8221;iTunesMetadata.plist&#8221;の各ファイルと、メタデータが詰まった&#8221;META-INF&#8221;、本の実態である&#8221;OEBPS&#8221;というフォルダが存在しています。また、上のlsの結果からもわかるように、ファイルのパーミッションはすべて000になっていて、そのままでは触れなくなっています。</p>
<p><a href="http://naoki.sato.name/ocf/ocf_1_0_spec_ja.html">EPUBの仕様の１つで、ファイル構成の決まりごとを指定しているOCF 1.0</a>によると、EPUB的に重要なファイルは &#8220;mimetype&#8221;、&#8221;META-INF&#8221;以下の各ファイルと、&#8221;OEBPS&#8221;以下の”free.opf&#8221;、&#8221;toc.ncx&#8221;になります。ちなみに、&#8221;iTunesArtwork&#8221;と&#8221;iTunesMetadata.plist&#8221;は多分iTunesで使用されるファイルで、(<a href="http://naoki.sato.name/epubunco/bookmarklet.html">例えばこのツールとかを使って</a>)自分で用意したEPUBでも、iTunesのBooksに登録すると自動的に追加されるようです。また、本の本体である&#8221;OEBPS&#8221;以下のHTMLや画像は当然暗号化されていて、読むことはできません。</p>
<p>それでは、個々のファイルの内容を見ていきます。まずは &#8220;mimetype&#8221; 。</p>
<blockquote>
<pre>application/epub+zip
</pre>
</blockquote>
<p>この内容は、ご存じの方はご存知でしょう。詳細は<a href="http://naoki.sato.name/lab/archives/45">この記事</a>や<a href="http://naoki.sato.name/ocf/ocf_1_0_spec_ja.html">こちらの仕様書</a>を御覧下さい。</p>
<p>&#8220;META-INF&#8221;フォルダには、必須である&#8221;container.xml&#8221;ファイルの他、デジタル署名を定義する&#8221;signatures.xml&#8221;、暗号化を設定している&#8221;encryption.xml&#8221;、そして<a href="http://naoki.sato.name/ocf/ocf_1_0_spec_ja.html">仕様書</a>にはないファイル&#8221;sinf.xml&#8221;の4ファイルが存在しています。</p>
<p>&#8220;container.xml&#8221;は、EPUBの中核とも言えるopfファイルの場所を指定するもの。内容は<a href="../archives/45">この記事</a>のものとほぼ同じです。</p>
<blockquote>
<pre>&lt;?xml version="1.0"?&gt;
&lt;container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container"&gt;
 &lt;rootfiles&gt;
 &lt;rootfile full-path="OEBPS/free.opf" media-type="application/oebps-package+xml"/&gt;
 &lt;/rootfiles&gt;
&lt;/container&gt;
</pre>
</blockquote>
<p>”signatures.xml&#8221;は、このEPUBの署名を指定するファイルです。実際には3行くらいのファイルになっていました。</p>
<blockquote>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;c:signatures xmlns:c="urn:oasis:names:tc:opendocument:xmlns:container"&gt;
&lt;d:Signature xmlns:d="http://www.w3.org/2000/09/xmldsig#"&gt;
&lt;d:SignedInfo&gt;
&lt;d:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/&gt;
&lt;d:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/&gt;
&lt;d:Reference URI="mimetype"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;jK41hNNg9yHE3Qyjik8tizbadMc=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="META-INF/container.xml"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;w5rli5cHwlrYWIoiFKZvhms5ToE=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/footnote1.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;k96ZhhpOPNuD0eWghNn3W4WYHZM=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/footnote2.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;YEIvYP4ik5k/GT2K9QDJGbaVcmo=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free.opf"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;RitfaSZN6O/PHCE4RW/Ps88v74Q=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ack01.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;j/2j9UJXkIEOJEI5gydaeyfZYhI=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_adc01.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;SeKCSTARBrktg4ZqLWiQB1XXElY=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ata01.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;sssl0YFMDjdP/NhCxF8Mfj/grhE=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_bm01.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;B7wmBgmyvFyHHLh315C7l30PvBc=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_bm02.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;QjhgLcuxuiq58X8B2+M6LEuaNNA=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_bm03.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;0UkIZ1TRrqKaqGw9ygxQdggvaBg=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_bm04.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;8Q5EMJ7a82v2/rC4FRYY7BtF1rg=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_bm05.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;EPxTr2efXgLuHvFZdGuELb9NK9s=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch01.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;sVXkCMwVTxaf08dZMmgUWCSqU9E=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch02.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;K7E3rGbONev8F5y7cB4STBx9mpA=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch03.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;6mWuw7wwvgP0ltlzfZhYJIxd7oQ=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch04.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;2Cre1HuhK3mcUqhRGvp/5WJ4Hvg=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch05.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;kpTRwEYs53z3TSEteyAjmwM+WdE=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch06.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;ueYKwoKchJa+gTBhQB0JflICGKI=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch07.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;NXHM2FIvxjePv67110U1VQuwdVg=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch08.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;iSMdJoRHbjmZVlIJv26QiKqKCKg=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch09.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;O2eENGllrAr1DBxaeHQs4lss65g=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch10.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;8bZ5aC4KsQXWJ4EutYfnkWBNUZI=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch11.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;cNX8Uajh9VJ1fZOdtEOod2Yh7kc=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch12.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;eS/ZZIylb/Roz7D3YbHtufXvNSY=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch13.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;mCkO1YX6lpCi9XKO5yL6127Klow=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch14.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;2SOa//QWuxD56HJmS3lbiyAvdy0=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch15.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;iXrKH7ojCrIdD/mmINZba5Wb+yc=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ch16.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;qcIXNPT9aPi5obOMHTCS8AW13z4=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_cop01.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;JBPMxbVH4VEq5yc3d2/2qj0MZO8=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_cov.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;EIHlbzKfO9tyB5ULhUm1K3dyGd8=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_cre01.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;kH/2po2VE8uyRjKJi7D68DsE/eI=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ded01.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;RE4C14wiYxlws/melHyBSt0ki58=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_fm01.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;9rfCnsg7jsPhxdfrNts5RPz0sX8=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_fm02.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;ZUle+WrY8VQdvaE4MN7bvbuzsTE=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_ind01.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;190evlVqFccE1ZpjvmdIAZ/BcP0=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_pt01.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;Ly3PPGwsFLew0r/jTdb54QFIUyw=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_pt02.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;n6yqObKofr8EteEMl1hPStdysbA=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_pt03.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;nlNs+sEOGOHAOuPswr9zWWBrgr8=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_toc.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;+9mmispJK7AtdKIy3ffimB+0tDo=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/free_tp01.html"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;AiPngjtfjwkAu2YEwfcEqiNk96c=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/104.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;J6r6HLPO4uH2DL0x+78lIMntW4g=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/113.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;je3L48bOShO2YnbgbNV9MYZk6n0=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/115.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;q3ees1GDzIA2ZXHCdzX5RYmclG4=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/117.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;mVrBHp4+5s5T4n5vtBBLx1CybuI=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/122.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;B/YE09o2zvWlMhzq6RFFMMYq/MU=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/141.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;SErxY2QUXf8gW+0hJiIeV2JgsaY=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/160.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;lRkpBM0IZT3lfYvwgIBhYsrTU4c=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/166.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;CXQhDcu9B9blXpfDCW7fKS7NckY=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/185.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;u1mtReZajRrdWXf36SrYCeiv2vo=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/188.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;6GtuLzeH1WMI7oV5YRu9IKoaNss=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/19.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;wG8ASuM7WtjqG0k/VYBVQWKV1so=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/21.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;/29dZ5vQad4fcwL9cj1dXmFA1Po=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/23.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;a6V9TOLhXTz2OrTX/QiDTITb1ZM=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/25.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;CLeXKlZ4ffjP36N2zAMg6dxwcsQ=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/26.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;sOuLlbfafh5yDRynovMcVpEHs+g=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/28.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;yUn+jS9gOew98na6zgTUTHCP9zw=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/60.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;9Ar6HYdcFVccojB0kHFZAQLJ5NQ=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/81.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;rppAYD+pY9egycC98t112V3HR+o=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/85.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;5ZRIvUPb7JAleKvudEFFN3JzGFs=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/arrow.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;1kAV+4iRNlDLKxLcTMqLEI/nE44=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/cover.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;wVRqxUEGa72CLvp3gELhNl/hGd4=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/Images/logo.jpg"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;N+jetA6+F1aMcxZWSz4gsVTd/RI=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/page-template.xpgt"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;IsLznQ9s7CofXB0FiNgDzeidLlU=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/pdlmsr.css"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;ynLcCk5L4BpN8hi5bqbcG4/qXdE=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="OEBPS/toc.ncx"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;atd0UMEQVpZFQ9aJmOjvtunODsQ=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;d:Reference URI="META-INF/encryption.xml"&gt;
&lt;d:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/&gt;
&lt;d:DigestValue&gt;VZSsMfRCLdBiczUDo4ff9encxfw=
&lt;/d:DigestValue&gt;
&lt;/d:Reference&gt;
&lt;/d:SignedInfo&gt;
&lt;d:SignatureValue&gt;XMfQpn7tf68BVrG2sjiIsPGseiI=
&lt;/d:SignatureValue&gt;
&lt;d:KeyInfo&gt;
&lt;d:KeyName&gt;1
&lt;/d:KeyName&gt;
&lt;/d:KeyInfo&gt;
&lt;/d:Signature&gt;
&lt;/c:signatures&gt;
</pre>
</blockquote>
<p>&#8220;encryption.xml&#8221;は、本の中身の暗号化の情報を持っています。</p>
<blockquote>
<pre>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;c:encryption xmlns:c="urn:oasis:names:tc:opendocument:xmlns:container"
 xmlns:d="http://www.w3.org/2000/09/xmldsig#"
 xmlns:e="http://www.w3.org/2001/04/xmlenc#"&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/page-template.xpgt"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/pdlmsr.css"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_cov.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_tp01.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ded01.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_toc.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_fm01.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_fm02.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch01.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_pt01.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch02.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch03.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch04.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_pt02.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch05.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch06.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch07.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch08.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch09.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch10.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_pt03.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch11.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch12.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch13.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch14.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch15.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ch16.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_bm01.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_bm02.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_bm03.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_bm04.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_bm05.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ack01.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ind01.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_ata01.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_adc01.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_cre01.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/free_cop01.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/footnote1.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/footnote2.html"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/logo.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/19.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/arrow.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/21.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/23.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/25.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/26.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/28.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/60.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/81.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/85.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/104.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/113.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/115.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/117.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/122.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/141.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/160.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/166.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/185.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/188.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
 &lt;e:EncryptedData&gt;
 &lt;e:EncryptionMethod Algorithm="http://itunes.apple.com/dataenc"/&gt;
 &lt;d:KeyInfo&gt;
 &lt;d:KeyName&gt;1&lt;/d:KeyName&gt;
 &lt;/d:KeyInfo&gt;
 &lt;e:CipherData&gt;
 &lt;e:CipherReference URI="OEBPS/Images/cover.jpg"/&gt;
 &lt;/e:CipherData&gt;
 &lt;/e:EncryptedData&gt;
&lt;/c:encryption&gt;
</pre>
</blockquote>
<p>そして独自ファイルである&#8221;sinf.xml&#8221;。内容を見るとfairplayという文字が見えるので、AppleのDRMに関連するファイルなのだと思います。</p>
<blockquote>
<pre>&lt;?xml version="1.0"?&gt;
&lt;policy xmlns:fairplay="http://itunes.apple.com/ns/epub"&gt;
 &lt;fairplay:sinf&gt;
 &lt;fairplay:sID&gt;1&lt;/fairplay:sID&gt;
 &lt;fairplay:sData&gt;...xxx...&lt;/fairplay:sData&gt;
 &lt;/fairplay:sinf&gt;
&lt;/policy&gt;
</pre>
</blockquote>
<p>以上が&#8221;META-INF&#8221;内の各ファイルの内容。&#8221;META-INF&#8221;についての詳細は<a href="http://naoki.sato.name/ocf/ocf_1_0_spec_ja.html">こちらの仕様書</a>を参照下さい。</p>
<p>続いて、実際の本の中身が入れられている&#8221;OEBPS&#8221;フォルダ。この中には、EPUBの骨格である&#8221;free.opf&#8221;ファイルと、目次用の&#8221;toc.ncx&#8221;ファイル、そして暗号化された章ごとのHTMLファイルや画像などが入っています。</p>
<p>&#8220;free.opf&#8221;の内容は次の通り。</p>
<blockquote>
<pre>&lt;?xml version="1.0"?&gt;
&lt;package xmlns="http://www.idpf.org/2007/opf" unique-identifier="ISBN" version="2.0"&gt;
 &lt;metadata xmlns:dc="http://purl.org/dc/elements/1.1/" 

 xmlns:dcterms="http://purl.org/dc/terms/"

 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

 xmlns:opf="http://www.idpf.org/2007/opf"&gt;
 &lt;dc:title&gt;Free&lt;/dc:title&gt;
 &lt;dc:language&gt;en&lt;/dc:language&gt;
&lt;dc:identifier id="ISBN" opf:scheme="9781401394516"&gt;9781401394516&lt;/dc:identifier&gt;
 &lt;dc:creator&gt;Chris Anderson&lt;/dc:creator&gt;
 &lt;dc:contributor&gt;Chris Anderson&lt;/dc:contributor&gt;
 &lt;dc:publisher&gt;Hyperion&lt;/dc:publisher&gt;
 &lt;dc:rights&gt;Copyright  2009 Chris Anderson&lt;/dc:rights&gt;
 &lt;/metadata&gt;
 &lt;manifest&gt;
 &lt;item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml" /&gt;
 &lt;item id="pt" href="page-template.xpgt" media-type="application/vnd.adobe.page-template+xml" /&gt;
 &lt;item id="msrcss" href="pdlmsr.css" media-type="text/css" /&gt;
 &lt;item id="cov" href="free_cov.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="tp01" href="free_tp01.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ded01" href="free_ded01.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="toc" href="free_toc.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="fm01" href="free_fm01.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="fm02" href="free_fm02.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch01" href="free_ch01.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="pt01" href="free_pt01.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch02" href="free_ch02.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch03" href="free_ch03.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch04" href="free_ch04.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="pt02" href="free_pt02.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch05" href="free_ch05.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch06" href="free_ch06.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch07" href="free_ch07.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch08" href="free_ch08.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch09" href="free_ch09.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch10" href="free_ch10.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="pt03" href="free_pt03.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch11" href="free_ch11.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch12" href="free_ch12.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch13" href="free_ch13.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch14" href="free_ch14.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch15" href="free_ch15.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ch16" href="free_ch16.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="bm01" href="free_bm01.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="bm02" href="free_bm02.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="bm03" href="free_bm03.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="bm04" href="free_bm04.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="bm05" href="free_bm05.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ack01" href="free_ack01.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ind01" href="free_ind01.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="ata01" href="free_ata01.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="adc01" href="free_adc01.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="cre01" href="free_cre01.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="cop01" href="free_cop01.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="footnote1" href="footnote1.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="footnote2" href="footnote2.html" media-type="application/xhtml+xml" /&gt;
 &lt;item id="image_0001" href="Images/logo.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0002" href="Images/19.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0003" href="Images/arrow.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0004" href="Images/21.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0005" href="Images/23.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0006" href="Images/25.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0007" href="Images/26.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0008" href="Images/28.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0009" href="Images/60.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0010" href="Images/81.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0011" href="Images/85.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0012" href="Images/104.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0013" href="Images/113.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0014" href="Images/115.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0015" href="Images/117.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0016" href="Images/122.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0017" href="Images/141.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0018" href="Images/160.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0019" href="Images/166.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0020" href="Images/185.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="image_0021" href="Images/188.jpg" media-type="image/jpeg" /&gt;
 &lt;item id="my-cover-image" href="Images/cover.jpg" media-type="image/jpeg" /&gt;
 &lt;/manifest&gt;
 &lt;spine toc="ncx"&gt;
 &lt;itemref idref="cov" /&gt;
 &lt;itemref idref="tp01" /&gt;
 &lt;itemref idref="ded01" /&gt;
 &lt;itemref idref="toc" /&gt;
 &lt;itemref idref="fm01" /&gt;
 &lt;itemref idref="fm02" /&gt;
 &lt;itemref idref="ch01" /&gt;
 &lt;itemref idref="pt01" /&gt;
 &lt;itemref idref="ch02" /&gt;
 &lt;itemref idref="ch03" /&gt;
 &lt;itemref idref="ch04" /&gt;
 &lt;itemref idref="pt02" /&gt;
 &lt;itemref idref="ch05" /&gt;
 &lt;itemref idref="ch06" /&gt;
 &lt;itemref idref="ch07" /&gt;
 &lt;itemref idref="ch08" /&gt;
 &lt;itemref idref="ch09" /&gt;
 &lt;itemref idref="ch10" /&gt;
 &lt;itemref idref="pt03" /&gt;
 &lt;itemref idref="ch11" /&gt;
 &lt;itemref idref="ch12" /&gt;
 &lt;itemref idref="ch13" /&gt;
 &lt;itemref idref="ch14" /&gt;
 &lt;itemref idref="ch15" /&gt;
 &lt;itemref idref="ch16" /&gt;
 &lt;itemref idref="bm01" /&gt;
 &lt;itemref idref="bm02" /&gt;
 &lt;itemref idref="bm03" /&gt;
 &lt;itemref idref="bm04" /&gt;
 &lt;itemref idref="ack01" /&gt;
 &lt;itemref idref="bm05" /&gt;
 &lt;itemref idref="ind01" /&gt;
 &lt;itemref idref="ata01" /&gt;
 &lt;itemref idref="adc01" /&gt;
 &lt;itemref idref="cre01" /&gt;
 &lt;itemref idref="cop01" /&gt;
 &lt;itemref idref="footnote1" /&gt;
 &lt;itemref idref="footnote2" /&gt;
 &lt;/spine&gt;
 &lt;guide&gt;
 &lt;reference type="cover" title="Cover Image" href="free_cov.html" /&gt;
 &lt;/guide&gt;
&lt;/package&gt;
</pre>
</blockquote>
<p>そして&#8221;toc.ncx&#8221;。</p>
<blockquote>
<pre>&lt;?xml version="1.0"?&gt;
&lt;!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN"
 "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd"&gt;
&lt;ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1"&gt;
 &lt;head&gt;
 &lt;meta name="dtb:uid" content="c98702cc-1def-4789-9366-18d8bdf83710"/&gt;
 &lt;meta name="dtb:depth" content="1"/&gt;
 &lt;meta name="dtb:totalPageCount" content="0"/&gt;
 &lt;meta name="dtb:maxPageNumber" content="0"/&gt;
 &lt;/head&gt;
 &lt;docTitle&gt;
 &lt;text&gt;Free&lt;/text&gt;
 &lt;/docTitle&gt;
&lt;navMap&gt;
&lt;navPoint id="navpoint-1" playOrder="1"&gt;&lt;navLabel&gt;&lt;text&gt;Cover&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_cov.html"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-2" playOrder="2"&gt;&lt;navLabel&gt;&lt;text&gt;Title Page&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_tp01.html"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-3" playOrder="3"&gt;&lt;navLabel&gt;&lt;text&gt;Dedication&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ded01.html"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-4" playOrder="4"&gt;&lt;navLabel&gt;&lt;text&gt;Contents&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_toc.html"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-5" playOrder="5"&gt;&lt;navLabel&gt;&lt;text&gt;List of Sidebars&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_fm01.html#fm01"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-6" playOrder="6"&gt;&lt;navLabel&gt;&lt;text&gt;Prologue&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_fm02.html#fm02"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-7" playOrder="7"&gt;&lt;navLabel&gt;&lt;text&gt;1&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch01.html#ch01"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-8" playOrder="8"&gt;&lt;navLabel&gt;&lt;text&gt;What Is Free?&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_pt01.html#pt01"/&gt;
&lt;navPoint id="navpoint-9" playOrder="9"&gt;&lt;navLabel&gt;&lt;text&gt;2&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch02.html#ch02"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-10" playOrder="10"&gt;&lt;navLabel&gt;&lt;text&gt;3&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch03.html#ch03"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-11" playOrder="11"&gt;&lt;navLabel&gt;&lt;text&gt;4&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch04.html#ch04"/&gt;&lt;/navPoint&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-12" playOrder="12"&gt;&lt;navLabel&gt;&lt;text&gt;Digital Free&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_pt02.html#pt02"/&gt;
&lt;navPoint id="navpoint-13" playOrder="13"&gt;&lt;navLabel&gt;&lt;text&gt;5&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch05.html#ch05"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-14" playOrder="14"&gt;&lt;navLabel&gt;&lt;text&gt;6&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch06.html#ch06"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-15" playOrder="15"&gt;&lt;navLabel&gt;&lt;text&gt;7&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch07.html#ch07"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-16" playOrder="16"&gt;&lt;navLabel&gt;&lt;text&gt;8&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch08.html#ch08"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-17" playOrder="17"&gt;&lt;navLabel&gt;&lt;text&gt;9&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch09.html#ch09"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-18" playOrder="18"&gt;&lt;navLabel&gt;&lt;text&gt;10&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch10.html#ch10"/&gt;&lt;/navPoint&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-19" playOrder="19"&gt;&lt;navLabel&gt;&lt;text&gt;Freeconomics and the Free World&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_pt03.html#pt03"/&gt;
&lt;navPoint id="navpoint-20" playOrder="20"&gt;&lt;navLabel&gt;&lt;text&gt;11&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch11.html#ch11"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-21" playOrder="21"&gt;&lt;navLabel&gt;&lt;text&gt;12&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch12.html#ch12"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-22" playOrder="22"&gt;&lt;navLabel&gt;&lt;text&gt;13&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch13.html#ch13"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-23" playOrder="23"&gt;&lt;navLabel&gt;&lt;text&gt;14&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch14.html#ch14"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-24" playOrder="24"&gt;&lt;navLabel&gt;&lt;text&gt;15&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch15.html#ch15"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-25" playOrder="25"&gt;&lt;navLabel&gt;&lt;text&gt;16&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ch16.html#ch16"/&gt;&lt;/navPoint&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-26" playOrder="26"&gt;&lt;navLabel&gt;&lt;text&gt;Coda&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_bm01.html#bm01"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-27" playOrder="27"&gt;&lt;navLabel&gt;&lt;text&gt;Free Rules&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_bm02.html#bm02"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-28" playOrder="28"&gt;&lt;navLabel&gt;&lt;text&gt;Freemium Tactics&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_bm03.html#bm03"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-29" playOrder="29"&gt;&lt;navLabel&gt;&lt;text&gt;Fifty Business Models Built on Free&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_bm04.html#bm04"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-30" playOrder="30"&gt;&lt;navLabel&gt;&lt;text&gt;Acknowledgments&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ack01.html#ack01"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-31" playOrder="31"&gt;&lt;navLabel&gt;&lt;text&gt;Searchable Terms&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ind01.html#ind01"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-32" playOrder="32"&gt;&lt;navLabel&gt;&lt;text&gt;About the Author&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_ata01.html#ata01"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-33" playOrder="33"&gt;&lt;navLabel&gt;&lt;text&gt;Other Books by Chris Anderson&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_adc01.html#adc01"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-34" playOrder="34"&gt;&lt;navLabel&gt;&lt;text&gt;Credits&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_cre01.html#cre01"/&gt;&lt;/navPoint&gt;
&lt;navPoint id="navpoint-35" playOrder="35"&gt;&lt;navLabel&gt;&lt;text&gt;Copyright&lt;/text&gt;&lt;/navLabel&gt;&lt;content src="free_cop01.html#cop01"/&gt;&lt;/navPoint&gt;
&lt;/navMap&gt;
&lt;/ncx&gt;
</pre>
</blockquote>
<p>この辺りはある程度EPUBについて調べている方であれば見覚えがあるのではないでしょうか？</p>
<p>Kindle等とは異なり、EPUBはオープンフォーマットなので当然ではあるのですが、iBookstore独自のものはDRM程度で、ファイルの構成も内容もEPUBの仕様書通りになっているという印象です。</p>
<p>ということは、EPUBの仕様書通りにファイルを構成すれば、iPadのiBooksで読める本が作成出来るということ。</p>
<p>この&#8221;Free&#8221;の構成・各ファイルの内容や、あるいは<a href="http://naoki.sato.name/lab/archives/45">以前書いたこちらの記事</a>、より詳細を知りたければ高瀬さんの<span style="color: #2c0eee;"><a href="http://lost_and_found.lv9.org/ops/ops_2.0_final_spec_ja.html">Open  Publication Structure (OPS)日本語訳</a>、</span><span style="color: #2c0eee;"><a href="http://lost_and_found.lv9.org/opf/opf_2.0_final_spec_ja.html">Open  Packaging Format (OPF)日本語訳</a><span style="color: #000000;"> </span></span><a href="http://naoki.sato.name/ocf/ocf_1_0_spec_ja.html">OEBPS Container Format (OCF) 1.0 日本語版</a>等を参考に、これからの標準になるであろうEPUBの電子書籍を作ってみてはいかがでしょうか？</p>
]]></content:encoded>
			<wfw:commentRss>http://naoki.sato.name/lab/archives/163/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://naoki.sato.name/lab/archives/163" />
	</item>
		<item>
		<title>ScanSnap から作成した連番画像ファイルを簡単にePubに変換する -Windows編-</title>
		<link>http://naoki.sato.name/lab/archives/159</link>
		<comments>http://naoki.sato.name/lab/archives/159#comments</comments>
		<pubDate>Mon, 12 Apr 2010 11:40:39 +0000</pubDate>
		<dc:creator>naoki</dc:creator>
				<category><![CDATA[ebooks]]></category>
		<category><![CDATA[aozorabunko]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://naoki.sato.name/lab/?p=159</guid>
		<description><![CDATA[先日の記事で、Mac上で連番画像をePubに変換する方法をご紹介しましたが、同じことをWindows上で行う方法を説明した記事を発見したのでご紹介。
お先に！iPadのためにePubを作成する方法 &#124; EeePC カフェ [...]]]></description>
			<content:encoded><![CDATA[<p>先日の記事で、Mac上で<a href="http://naoki.sato.name/lab/archives/153">連番画像をePubに変換する方法</a>をご紹介しましたが、同じことをWindows上で行う方法を説明した記事を発見したのでご紹介。</p>
<p><a href="http://tyororin.blog80.fc2.com/blog-entry-617.html">お先に！iPadのためにePubを作成する方法 | EeePC カフェ</a></p>
<p>こちらの記事によると、Windowsには<a href="http://no722.cocolog-nifty.com/blog/chainlp/index.html">連番画像を電子ブック形式ファイル(LRF、PDF、ePub、Mobi)に変換してくれるChainLP</a>というツールがあり、このツールを利用するとお手軽にePubを作成出来るようです。</p>
<blockquote><p>連番画像を指定サイズにリサイズし、画像だけの電子ブック形式ファイル(LRF、PDF、ePub、Mobi)として出力します。連番ファイルやZIP、 LHaを作成することもできます。</p>
<p>青空文庫形式のテキストファイルを縦書き画像に変換することもできます。このとき、テキスト印刷を通じてPDF仮想プリンタにテキストデータを送りこんで、フォント埋め込みのPDFを出力することもできます。</p></blockquote>
<p>画像のコントラスト調整等もでき、リサイズもでき、いろいろなフォーマットに出力可能。すばらしいです。WindowsならこのツールとScanSnapで十分ではないでしょうか。</p>
<p>こちらの<a href="http://no722.cocolog-nifty.com/blog/">No. 722</a>さんですが、他にもいろいろなツールを作成されていらっしゃるので、特にWindowsの方はぜひ一度チェックしてみて下さい。</p>
]]></content:encoded>
			<wfw:commentRss>http://naoki.sato.name/lab/archives/159/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://naoki.sato.name/lab/archives/159" />
	</item>
		<item>
		<title>ScanSnapから作成した連番画像ファイルを1クリック(+α)でePubに変換する -Mac編-</title>
		<link>http://naoki.sato.name/lab/archives/153</link>
		<comments>http://naoki.sato.name/lab/archives/153#comments</comments>
		<pubDate>Mon, 05 Apr 2010 13:42:34 +0000</pubDate>
		<dc:creator>naoki</dc:creator>
				<category><![CDATA[ebooks]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://naoki.sato.name/lab/?p=153</guid>
		<description><![CDATA[先日の連番画像ファイルからePubを作成するの続きです。
先日の記事ではePubを作成するシェルスクリプトを公開しましたが、いちいちターミナルからスクリプトを実行するのも面倒なので、AppleScriptを使ってFind [...]]]></description>
			<content:encoded><![CDATA[<p>先日の<a href="http://naoki.sato.name/lab/archives/142">連番画像ファイルからePubを作成する</a>の続きです。</p>
<p>先日の記事ではePubを作成するシェルスクリプトを公開しましたが、いちいちターミナルからスクリプトを実行するのも面倒なので、AppleScriptを使ってFinderからスクリプトを呼出し、Finderで開いているフォルダ内の連番画像をePubに変換するアプリケーションを用意しました。AppleScriptですので、Mac専用です。</p>
<p><a href="http://naoki.sato.name/epubunco/epubsh.dmg">連番画像ファイル-&gt;ePub作成アプリケーション</a></p>
<p>簡単な使い方は以下の通り。なお、未検証ですが連番画像のファイル名に日本語が含まれていると上手くいかないかも知れませんので、ファイル名は英数字のみにしておいた方が無難だと思います。</p>
<ol>
<li>自分のホームディレクトリに &#8220;bin&#8221; フォルダを作成します。</li>
<li>dmgに入っている &#8220;epubsh.sh&#8221; を1.で作成した &#8220;bin&#8221; フォルダにコピーします。</li>
<li>dmgに入っている &#8220;epubsh.app&#8221; を任意の場所 (&#8220;bin&#8221; や &#8220;アプリケーション&#8221; をおすすめします) にコピーし、DockもしくはFinderのツールバーに登録します。</li>
<li>ePubに変換したい一連の画像のあるディレクトリを最前面のFinderで開いた状態にし、3.で登録した &#8220;epubsh.sh&#8221; を実行します。</li>
<li>タイトル、著者を入力するダイアログが表示されるので、それらを入力します。</li>
<li>暫く待つと、画像と同じディレクトリに &#8220;タイトル.epub&#8221; という名前でePubファイルが作成されます。</li>
</ol>
<p>以上です。いつも通り検証不十分ですので、At Your Own Riskでお願いします。コメント等々ございましたら<a href="http://twitter.com/naokisatoname">@naokisatoname</a>宛に頂けると幸いです。</p>
<p>以下、スクリーンショット付きの詳細説明とスクリプトのソース。</p>
<p><span id="more-153"></span></p>
<h3>詳細設定手順</h3>
<p>ここでは、以前ScanSnapからPDF形式で電子化し、今回検証のためにjpgで画像を抽出した<a href="http://www.amazon.co.jp/gp/product/4840120722?ie=UTF8&amp;tag=naokisatoname-22&amp;linkCode=as2&amp;camp=247&amp;creative=7399&amp;creativeASIN=4840120722">新海誠さんの小説・秒速5センチメートル</a>を使用しています(連番画像ファイル名は &#8220;5cm_xxx.jpg&#8221;)。</p>
<ol>
<li>上のリンクから<a href="http://naoki.sato.name/epubunco/epubsh.dmg">dmgファイル</a>をダウンロードします。</li>
<li>Finder上でダブルクリックし、マウントします。</li>
<li>中に &#8220;epubsh.app&#8221; と &#8220;epubsh.sh&#8221; の2ファイルが入っていることを確認します。</li>
<li>自分のホームディレクトリに &#8220;bin&#8221; フォルダを作成します。</li>
<li>dmgに入っている &#8220;epubsh.app&#8221; と &#8220;epubsh.sh&#8221; を &#8220;bin&#8221; フォルダにコピーします。<br />
<a href="http://naoki.sato.name/lab/wp-content/uploads/2010/04/20100405_1.png"><img src="http://naoki.sato.name/lab/wp-content/uploads/2010/04/20100405_1-300x169.png" title="20100405_1" width="300" height="169" class="alignnone size-medium wp-image-146" /></a></li>
<li>&#8220;epubsh.app&#8221; をDockもしくはFinderのツールバーに登録します。個人的にはFinderのツールバーの方が使い易い気がします。<br />
<a href="http://naoki.sato.name/lab/wp-content/uploads/2010/04/20100405_2.jpg"><img src="http://naoki.sato.name/lab/wp-content/uploads/2010/04/20100405_2-300x68.jpg" title="20100405_2" width="300" height="68" class="alignnone size-medium wp-image-147" /></a></li>
<li>連番画像ファイルをおいたディレクトリをFinderで表示します。<br />
<a href="http://naoki.sato.name/lab/wp-content/uploads/2010/04/20100405_3.png"><img src="http://naoki.sato.name/lab/wp-content/uploads/2010/04/20100405_3-300x169.png" title="20100405_3" width="300" height="169" class="alignnone size-medium wp-image-148" /></a></li>
<li>先ほど登録した &#8220;epubsh.app&#8221; をクリックして実行します。</li>
<li><em>Book Title:</em> というダイアログが表示されるので、本のタイトルを入力します。<br />
<a href="http://naoki.sato.name/lab/wp-content/uploads/2010/04/20100405_4.png"><img src="http://naoki.sato.name/lab/wp-content/uploads/2010/04/20100405_4-300x124.png" title="20100405_4" width="300" height="124" class="alignnone size-medium wp-image-154" /></a></li>
<li><em>Book Author:</em> というダイアログが表示されるので、本の著者を入力します。<br />
<a href="http://naoki.sato.name/lab/wp-content/uploads/2010/04/20100405_5.png"><img src="http://naoki.sato.name/lab/wp-content/uploads/2010/04/20100405_5-300x124.png" title="20100405_5" width="300" height="124" class="alignnone size-medium wp-image-155" /></a></li>
<li>OKをクリックして暫く待つと、Finderで開いていた、画像と同じディレクトリに &#8220;タイトル.epub&#8221; というePub形式のファイルが作成されます。<br />
<a href="http://naoki.sato.name/lab/wp-content/uploads/2010/04/20100405_6.png"><img src="http://naoki.sato.name/lab/wp-content/uploads/2010/04/20100405_6-300x169.png" title="20100405_6" width="300" height="169" class="alignnone size-medium wp-image-151" /></a></li>
<li>後はePubを表示して読書を楽しみましょう。<br />
<a href="http://naoki.sato.name/lab/wp-content/uploads/2010/04/20100405_7.png"><img src="http://naoki.sato.name/lab/wp-content/uploads/2010/04/20100405_7-300x198.png" title="20100405_7" width="300" height="198" class="alignnone size-medium wp-image-152" /></a></li>
</ol>
<h3>ソースファイル</h3>
<p>AppleScriptおよびsh Scriptのソースです。基本的にdmgファイルの内容と同様です。ダウンロードが上手くいかない際は、右クリックでファイル名を指定して保存して下さい。</p>
<ul>
<li><a href="http://naoki.sato.name/epubunco/epubsh.scpt">AppleScript (2.6KB)</a></li>
<li><a href="http://naoki.sato.name/epubunco/epubsh.sh">sh Script (3.3KB)</a></li>
</ul>
<p>知識のある方、改変・修正はご自由に。その際は後学のため<a href="http://twitter.com/naokisatoname">@naokisatoname</a>までご連絡いただければ幸いです。</p>
<h4><span style="color: #ff6600;">※2010/04/08追記</span></h4>
<p>公開したスクリプトにバクがあったので、dmg、ソースとも置き換えました。</p>
<p>タイトルやパスにスペースが含まれていた際に正常に動作しない現象を修正しました。</p>
<h4><span style="color: #ff6600;">※ 2010/04/26追記</span></h4>
<p>dmg、ソースを再度置き換えました。</p>
<p>前回と同じく、タイトルやパスにスペースが含まれていた際に正常に動作しない不具合の修正です。</p>
<p><span style="color: #808080;">スクリプト内でディレクトリ名をクォートするのを忘れておりました。スミマセン…</span></p>
<h4><span style="color: #ff6600;">※  2010/05/09追記</span></h4>
<p>dmg、ソースを置き換えました。</p>
<p>作成されたePubがAppleのiBooksで開けないバグを修正しました。</p>
<p>ただし、iBooksでは画像のサイズを変更する指定が無効になるらしく、表示が崩れる可能性があります。</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;"><a href="../../epubunco/epubsh.sh">連番画像ファイル-&gt;ePub作成ス クリプト</a></div>
]]></content:encoded>
			<wfw:commentRss>http://naoki.sato.name/lab/archives/153/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://naoki.sato.name/lab/archives/153" />
	</item>
		<item>
		<title>連番画像ファイルからePubを作成する</title>
		<link>http://naoki.sato.name/lab/archives/142</link>
		<comments>http://naoki.sato.name/lab/archives/142#comments</comments>
		<pubDate>Sat, 03 Apr 2010 14:21:57 +0000</pubDate>
		<dc:creator>naoki</dc:creator>
				<category><![CDATA[ebooks]]></category>
		<category><![CDATA[media]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://naoki.sato.name/lab/?p=142</guid>
		<description><![CDATA[日本でのiPadの発売も近づき、USではiPadが発売され、俄然電子書籍に対する注目が高まっていると感じるこの頃。iPadのリリースにあわせてiTunesも9.1にバージョンアップされてePubファイルもiTunesで管 [...]]]></description>
			<content:encoded><![CDATA[<p>日本でのiPadの発売も近づき、USではiPadが発売され、俄然電子書籍に対する注目が高まっていると感じるこの頃。iPadのリリースにあわせてiTunesも9.1にバージョンアップされてePubファイルもiTunesで管理できるようになりました。</p>
<p>ただ、惜しむらくは書籍として認識されるのがePub形式のみという点。以前からPDFはiTunesで管理できましたが、書籍形式としては認識されず、このことからiPad上のiBooksではePub形式の電子書籍のみがサポートされることが予想されます。</p>
<p>海外の古い書籍であれば<a href="http://books.google.com/">Google Books</a>や<a href="http://www.gutenberg.org/wiki/Main_Page">Project Gutenberg</a>で入手できますし、日本の古典は<a href="http://naoki.sato.name/epubunco/bookmarklet.html">拙作のBookmarklet</a>を使えば<a href="http://www.aozora.gr.jp/">青空文庫</a>からePubを作成できることができます。しかし、現在紙の本から電子データを作成する上で最も一般的と思われるScanSnap (+裁断機)では、PDFを作ることはできてもePubは作成できず、このままではiPad (というかiBooks)で市販の書籍を読む事が難しそうです。</p>
<p>他方、ScanSnapでは連番画像ファイルとして電子データを保存できます。そこで、連番の画像ファイルからePubを作成するシェルスクリプトを書いてみました。</p>
<p><a href="http://naoki.sato.name/epubunco/epubsh.sh">連番画像ファイル-&gt;ePub作成スクリプト</a></p>
<p>べた書きの上にきちんとテストも行っていない状態なので、いつも通りAt Your Own Riskでお願いします。変更はご自由に。</p>
<p>以下、スクリプトの使用方法と説明です。</p>
<h3><span id="more-142"></span>前提</h3>
<ul>
<li>bashスクリプトなので、MacもしくはLinux等Unix系OSが必須です。</li>
<li>元画像ファイルは .jpg もしくは .png いずれかの形式・拡張子で、ファイル名は連番になっている必要があります。</li>
<li>スクリプトはターミナル・コンソールから実行する必要があります。</li>
</ul>
<h3>実行方法</h3>
<ol>
<li>任意のディレクトリにePubに変換する一連の連番画像ファイルとスクリプトファイル(epubsh.sh)を置きます。
<pre>$ ls .</pre>
<pre>  001.jpg</pre>
<pre>  002.jpg</pre>
<pre>  003.jpg</pre>
<pre>  epubsh.sh</pre>
</li>
<li>ターミナルで1.で画像、スクリプトを置いたディレクトリに移動します。
<pre>$ cd /home/user/hoge</pre>
</li>
<li>引数に書籍のタイトル、著者名を入力してスクリプトを実行します。
<pre>$ sh epubsh.sh タイトル 著者</pre>
</li>
<li>実行したディレクトリに&#8221;(書籍のタイトル).epub&#8221;というファイル名が作成されます。</li>
</ol>
<h3>動作確認</h3>
<p>Mac上のSony Reader Library、Stanza、iPhone上のStanza、Sony Readerで表示確認済み。</p>
<p>予想以上にiPhone上のStanzaで読めました。</p>
<h3>やっていること</h3>
<p>基本的に<a href="http://naoki.sato.name/lab/archives/45">以前ポストしたePub形式のファイル構成</a>に従って必要なファイルを作成し、パッケージ化しているだけです。</p>
<ul>
<li>画像ファイルを/tmp以下の作業フォルダにコピー</li>
<li>各画像ファイルを表示するためのhtmlファイルを作成</li>
<li>CSSで画像ファイルをheight=100%、text-align=centerに</li>
<li>ePub用のファイルを作成</li>
<li>ePub用のフォルダ構成に設定</li>
<li>zipでePub形式を作成</li>
<li>ePubを作業フォルダからカレントフォルダに移動</li>
<li>作業フォルダを削除</li>
</ul>
<h3>今後は…</h3>
<p>正直な所、今後書籍の電子化をPDF形式にするべきかePub形式にするべきかは分かりかねるところです。</p>
<p>PDFは既に広く一般化していて、電子書籍としてだけではなくMac等ではOSレベルでサポートされているものの、iPadやE-Bookリーダでのサポートが弱い。</p>
<p>ePubはiPadのiBooksでも標準サポートされ、主要なE-Bookリーダでサポートされるものの、Mac等で扱いにくい。</p>
<p>実は画像ファイルで電子化しておくのが一番汎用的なのかも知れません。</p>
]]></content:encoded>
			<wfw:commentRss>http://naoki.sato.name/lab/archives/142/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://naoki.sato.name/lab/archives/142" />
	</item>
		<item>
		<title>PDFのタイトル、著者を一括変更するlrf-epub-tools</title>
		<link>http://naoki.sato.name/lab/archives/94</link>
		<comments>http://naoki.sato.name/lab/archives/94#comments</comments>
		<pubDate>Tue, 02 Feb 2010 01:42:12 +0000</pubDate>
		<dc:creator>naoki</dc:creator>
				<category><![CDATA[ebooks]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[pdf]]></category>

		<guid isPermaLink="false">http://naoki.sato.name/lab/?p=94</guid>
		<description><![CDATA[使い様によっては非常に便利なツールです。
Sony ReaderやKindleはPDFをサポートしているので、PDFファイルをそれらのリーダに入れれば読むことができます。その際(少なくともSony Readerでは)PD [...]]]></description>
			<content:encoded><![CDATA[<p>使い様によっては非常に便利なツールです。</p>
<p>Sony ReaderやKindleはPDFをサポートしているので、PDFファイルをそれらのリーダに入れれば読むことができます。その際(少なくともSony Readerでは)PDFのメタデータに登録されているタイトルや著者がそのままTitle, Authorとなるので、PDFのメタデータをきちんと設定しておかないと、書籍を管理するのが大変になります。また、Sony Readerでは、<a href="http://naoki.sato.name/lab/archives/45">本文中では日本語が表示できるものの</a>、Home画面や書籍一覧の画面では日本語が表示されないため、タイトルや著者が日本語のPDFは事前に修正しておくことが不可欠です。</p>
<p>このPDFのメタデータはAcrobat等を使えば編集できるものの、<span style="text-decoration: line-through;">一括編集はできないので</span>(<span style="color: #ff0000;">訂正。</span>バッチ処理とJavaScriptを組み合わせれば一括編集出来そうです。AcrobatのJavaScriptの仕様書は<a href="http://www.adobe.com/devnet/acrobat/javascript.html">こちら</a>です)、例えば<a href="http://a2k.aill.org/">青空キンドル</a>である著者の本をたくさんPDFにしてそれらを編集する場合等はそれなりに大変な作業になります。一括して編集するスクリプトを作成すれば良い訳ですが、コマンドラインからPDFを扱う定番ツール<a href="http://www.accesspdf.com/pdftk/">PDFTK</a>は残念ながらMacOSX 10.6に対応しておらず、portからもソースからのビルドも失敗してしまいます。</p>
<p>このような場合に便利なのが<a href="http://code.google.com/p/lrf-epub-tools/">lrf-epub-tools</a>。本来はLRFをEPUBやPDF等に変換するJavaプログラムなのですが、その機能の一つに、<span style="text-decoration: underline;">ファイル名が&#8221;</span><em><span style="text-decoration: underline;">著者名</span></em><span style="text-decoration: underline;">-</span><em><span style="text-decoration: underline;">タイトル</span></em><span style="text-decoration: underline;">.pdf&#8221;となっているPDFファイルに対して著者名、タイトルを設定する</span>というものがあり、これと<a href="http://www.manytricks.com/namemangler/">ファイル名を編集するユーティリティ</a>を組み合わせることで大量のPDFのメタデータを容易に編集・修正することが可能です。実際に試してみたところ、ASCIIはもちろん、日本語も文字化けすることなくタイトル・著者に反映されました。</p>
<p><a href="http://code.google.com/p/lrf-epub-tools/">lrf-epub-tools : Convert LRF (Sony BeBB) files to EPUB, PDF, RTF, and HTML. Also converts PDF and DOCX to EPUB.</a></p>
<p>また、まだ試してはいませんがPDFをePubに変換する機能もあるようです。</p>
<p>詳細な使い方は<a href="http://code.google.com/p/lrf-epub-tools/">プロジェクトページ</a>を参照して下さい。</p>
]]></content:encoded>
			<wfw:commentRss>http://naoki.sato.name/lab/archives/94/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://naoki.sato.name/lab/archives/94" />
	</item>
		<item>
		<title>電子書籍ファイルePubについてメモ -ePubを閲覧する-</title>
		<link>http://naoki.sato.name/lab/archives/73</link>
		<comments>http://naoki.sato.name/lab/archives/73#comments</comments>
		<pubDate>Thu, 21 Jan 2010 15:13:19 +0000</pubDate>
		<dc:creator>naoki</dc:creator>
				<category><![CDATA[ebooks]]></category>
		<category><![CDATA[epub]]></category>

		<guid isPermaLink="false">http://naoki.sato.name/lab/?p=73</guid>
		<description><![CDATA[自分で作成したePubファイルや入手したePubファイルを閲覧する各種ツール・方法をメモとしてまとめておきます。未検証のものもありますし、網羅しているわけではないのでご注意ください。
Windows

Stanza
So [...]]]></description>
			<content:encoded><![CDATA[<p>自分で作成したePubファイルや入手したePubファイルを閲覧する各種ツール・方法をメモとしてまとめておきます。未検証のものもありますし、網羅しているわけではないのでご注意ください。</p>
<h3>Windows</h3>
<ul>
<li><a href="http://www.lexcycle.com/">Stanza</a></li>
<li><a href="http://ebookstore.sony.com/download/">Sony Reader</a></li>
<li><a href="http://www.adobe.com/products/digitaleditions/">Adobe Digital Edition</a>s</li>
<li><a href="http://calibre-ebook.com/">Calibre</a></li>
<li><a href="http://www.amazon.com/gp/feature.html?docId=1000234621">KindleGen</a>で<a href="http://www.mobipocket.com/en/DownloadSoft/default.asp?Language=EN">Mobipocket Reader</a>用に変換</li>
</ul>
<h3>Macintosh</h3>
<ul>
<li><a href="http://www.lexcycle.com/">Stanza</a></li>
<li><a href="http://ebookstore.sony.com/download/">Sony Reader</a></li>
<li><a href="http://www.adobe.com/products/digitaleditions/">Adobe Digital Edition</a></li>
<li><a href="http://calibre-ebook.com/">Calibre</a></li>
</ul>
<h3>Linux</h3>
<ul>
<li><a href="http://calibre-ebook.com/">Calibre</a></li>
</ul>
<h3>オンライン + ブラウザ</h3>
<ul>
<li><a href="http://bookworm.oreilly.com/">BookWorm from O’Reilly Labs</a> : アカウント作成後、ePubファイルをアップロードすると、オンライン上にライブラリーを作ってくれる様です</li>
</ul>
<h3>Sony Reader</h3>
<ul>
<li>標準で対応</li>
</ul>
<h3>Nook</h3>
<ul>
<li>標準で対応</li>
</ul>
<h3>Kindle</h3>
<ul>
<li><a href="http://www.amazon.com/gp/feature.html?docId=1000234621">KindleGen</a>でePubから対応形式に変換可能</li>
</ul>
<h3>iPhone, iPod touch</h3>
<ul>
<li><a href="http://www.lexcycle.com/">Stanza</a> (Windows, MacのStanzaから転送)</li>
</ul>
<h3>携帯電話、PDA</h3>
<ul>
<li>いろいろ方法があるようです</li>
<li><a href="http://www.amazon.com/gp/feature.html?docId=1000234621">KindleGen</a>でePubから変換すれば<a href="http://www.mobipocket.com/en/DownloadSoft/default.asp?Language=EN">Mobipocket Reader</a>で読めます (Blackberry, Windows Mobile, Symbian, Palm)</li>
<li><a href="http://jp.access-company.com/index.html">NetFront Book Viewer EPUB Edition</a>?</li>
<li><a href="http://twitter.com/harycurl">@harycurl</a>さんから<a href="http://twitter.com/harycurl/status/8025647800">EZReaderでの動作報告いただきました</a></li>
</ul>
<h3>(参考)</h3>
<ul>
<li><a href="http://epublishersweekly.wordpress.com/ebooks/♦♦-d-read/how-to-read-epub/">♦♦♦♦ How to Read ePub &amp;laquo; Epublishers Weekly . net</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://naoki.sato.name/lab/archives/73/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://naoki.sato.name/lab/archives/73" />
	</item>
		<item>
		<title>電子書籍ファイルePubについて -ツールを使ってePubを作成する-</title>
		<link>http://naoki.sato.name/lab/archives/64</link>
		<comments>http://naoki.sato.name/lab/archives/64#comments</comments>
		<pubDate>Thu, 21 Jan 2010 14:26:56 +0000</pubDate>
		<dc:creator>naoki</dc:creator>
				<category><![CDATA[ebooks]]></category>
		<category><![CDATA[epub]]></category>

		<guid isPermaLink="false">http://naoki.sato.name/lab/?p=64</guid>
		<description><![CDATA[先日の記事でePubを自分で作成するという記事を書きましたが、その後TwitterからePubの検索結果を辿っていたら@alohzさんのツイートでePubのオーサリングツールが存在することを知りました。
eCub &#8 [...]]]></description>
			<content:encoded><![CDATA[<p>先日の記事で<a href="http://naoki.sato.name/lab/archives/45">ePubを自分で作成する</a>という記事を書きましたが、その後TwitterからePubの検索結果を辿っていたら<a href="http://twitter.com/alohz/status/7823832528">@alohzさんのツイートでePubのオーサリングツールが存在する</a>ことを知りました。</p>
<p><a href="http://www.juliansmart.com/ecub">eCub &#8211; a simple to use EPUB and MobiPocket ebook creator | JulianSmart.com</a></p>
<p><a href="http://naoki.sato.name/lab/wp-content/uploads/2010/01/ecub_main.jpg"><img src="http://naoki.sato.name/lab/wp-content/uploads/2010/01/ecub_main-300x190.jpg" title="ecub_main" width="300" height="190" class="alignnone size-medium wp-image-67" /></a></p>
<p>eCubはクロスプラットフォームで動くフリーウェア。Windows、Mac、Linuxの他、FreeBSDとSolaris版が提供されています。</p>
<p>元となるXHTMLファイルや画像ファイルを準備する必要があることは<a href="http://naoki.sato.name/lab/archives/45">コマンドなどを使って自分で作成する場合</a>と変わりませんが、opfファイルやncxファイルの修正、実際のePubファイルの作成などを自動的に行ってくれます。１画面でXHTMLの修正や画像の確認ができます。</p>
<p><a href="http://naoki.sato.name/lab/wp-content/uploads/2010/01/ecub_properties.jpg"><img src="http://naoki.sato.name/lab/wp-content/uploads/2010/01/ecub_properties-300x228.jpg" title="ecub_properties" width="300" height="228" class="alignnone size-medium wp-image-68" /></a></p>
<p>タイトルや著者などのメタ情報もわかりやすい画面で修正できます。</p>
<p>なお、実際に試してみてSony Readerで確認したところ、目次ページでの日本語の文字化けと、HTMLファイルに対してNavMapのオプションをオンにしておくと本文が見られなくなる不具合が生じたものの、それ以外は日本語の表示を含めて問題なく読むことができました。</p>
<p>また、<a href="http://www.amazon.com/gp/feature.html?docId=1000234621">Amazonから提供されているHTMLやePubファイルをKindle用にコンバートするKindleGen</a>がインストールされていれば、直接Kindle用のファイルを作ることもできるようです（<span style="text-decoration: underline;">なお、2010年01月21日現在、KindleGenはWindows版およびLinux版のみ提供されています</span>）。</p>
<p>有料のソフトウェアでは<a href="http://blogs.adobe.com/digitaleditions/indesign-epub.html">Adobe InDesignでePubファイルを作成できるようです</a>。</p>
<p><a href="http://naoki.sato.name/lab/archives/45">ePubファイルの構成を理解するのであればともかく</a>、普通にePubファイルを作製する場合はこのようなツールを利用した方が容易ですね。</p>
]]></content:encoded>
			<wfw:commentRss>http://naoki.sato.name/lab/archives/64/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://naoki.sato.name/lab/archives/64" />
	</item>
		<item>
		<title>電子書籍ファイルePubについて -ePubを自分で作成する-</title>
		<link>http://naoki.sato.name/lab/archives/45</link>
		<comments>http://naoki.sato.name/lab/archives/45#comments</comments>
		<pubDate>Wed, 20 Jan 2010 14:30:35 +0000</pubDate>
		<dc:creator>naoki</dc:creator>
				<category><![CDATA[ebooks]]></category>
		<category><![CDATA[epub]]></category>

		<guid isPermaLink="false">http://naoki.sato.name/lab/archives/45</guid>
		<description><![CDATA[2010年代に突入して半月強、Kindleの国際展開やACCESSによる携帯電話での提供など、心なしか日本における電子書籍に関する話を目にする・耳にすることが増えたような気がします。個人的には昨年末にSony Reade [...]]]></description>
			<content:encoded><![CDATA[<p>2010年代に突入して半月強、<a href="http://japanese.engadget.com/2010/01/06/amazon-kindle-dx-1-19/">Kindleの国際展開</a>や<a href="http://k-tai.impress.co.jp/docs/news/20100118_343122.html">ACCESSによる携帯電話での提供</a>など、心なしか日本における電子書籍に関する話を目にする・耳にすることが増えたような気がします。個人的には昨年末に<a href="http://ebookstore.sony.com/">Sony Reader</a>を購入したこともあり、日本でもアメリカのように電子書籍が本格普及してくれればと感じています。</p>
<p>そんな電子書籍のフォーマットの１つに、ePubというものがあります。このフォーマットは「<span style="text-decoration: underline;">米国の電子書籍標準化団体の1つであるInternational Digital Publishing Forum（IDPF）が普及促進するオープンな電子書籍ファイルフォーマット規格</span>」（<a href="http://ja.wikipedia.org/wiki/EPUB">Wikipedia</a>より）であり、Sony Readerでは標準型式として採用されているほか、<a href="http://books.google.com/">Google Books</a>でも採用されている型式です。現状ではKindleではサポートされていないようですが、オープン型式ということで、いずれサポートされる可能性も無くはないと思います。</p>
<p>ePubの仕組みは非常に簡単で、普通のWebページと同様に(X)HTMLやCSSで作られているため、基本的にはWebページを作る知識があれば誰でも作ることができます。そのあたりの解説は<a href="http://www.kobu.com/docs/epub/index.htm">日本語Epubブックサンプル &#8211; 横浜工文社</a>に詳しくまとめられていますが、ここでは筆者の知識の整理の意味も込めて、改めて自分でePubを作成する手順(=<a href="http://naoki.sato.name/epubunco/bookmarklet.html">青空文庫XHTML→ePub変換</a>で行っている処理)について解説して行きたいと思います。</p>
<p>ご意見・ご感想・ご指摘・質問(は答えられるかはわかりませんが)等は<a href="http://twitter.com/naokisatoname">@naokisatoname</a>まで。</p>
<p>なお、サンプルとしては<a href="http://naoki.sato.name/epubunco/sample/42378_18502_min_ruby.epub">青空文庫から作成したアンデルセンの「赤いくつ」</a>を取り上げます。</p>
<p style="text-align: left;"><a href="http://naoki.sato.name/lab/wp-content/uploads/akaikutsu.png"><img src="http://naoki.sato.name/lab/wp-content/uploads/akaikutsu-233x300.png" alt="赤いくつ" title="akaikutsu" width="233" height="300" class="alignnone size-medium wp-image-56" /></a></p>
<p><span id="more-45"></span><img src="http://naoki.sato.name/lab/wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" title="もっと読む..." /></p>
<h3>そもそもePubって?</h3>
<p><strong>電子書籍型式の１つ</strong>です。PDFと似たようなものです。</p>
<p><strong>Sony Readerでは標準形式として採用されています</strong>。Kindleではサポートされていませんが、その他の主要な電子書籍リーダでは基本的にサポートされていると思います。</p>
<p>PCやiPhoneでのePubリーダとしては<a href="http://www.lexcycle.com/">Stanza</a>等があります。また、最近では<a href="http://k-tai.impress.co.jp/docs/news/20100118_343122.html">ACCESSが携帯電話向けへの提供</a>を試験中のようです。</p>
<h3>ePubの概要</h3>
<p>ePub型式の特徴については、<a href="http://www.kobu.com/docs/epub/index.htm">横浜工文社さんのページ</a>に非常に的確にまとめられているので、ここではそれを引用させていただきます。</p>
<blockquote>
<ul>
<li><span style="color: #003300;">一定の約束のもとに構成ファイルをZIPファイルにまとめたもの（ただし拡張子は.epub）。</span></li>
<li><span style="color: #003300;">ファイル一覧や目次などXML形式のメタファイルを持つ。</span></li>
<li><span style="color: #003300;">コンテンツはXHTML（サブセット）、CSS、PNG、JPEGなど、Web標準に準拠。</span></li>
<li><span style="color: #003300;">最大の特徴は、PDFとは異なり固定のページ境界がなく、画面やフォントの大きさに応じて、表示のたびにページ境界が変動する。</span></li>
</ul>
</blockquote>
<p>つまり、<strong>本質的にはePubはHTML、CSS、画像等をまとめたZIPファイルでしか無く</strong>、同梱するメタファイルだけ用意できれば<strong>普通にWebページを作る感覚で作成することができます</strong>。</p>
<p>なお、ePubの規格は<a href="http://www.idpf.org/">International Digital Publishing Forum (IDPF)</a>によって決められています。また、<a href="http://d.hatena.ne.jp/lost_and_found/">ろすさんによって各仕様書の日本語版が公開されています</a>。</p>
<h3>ePubのファイル構成</h3>
<p>それでは、サンプルのePubファイルの構成を見ていきます。なお、サンプルファイルのファイル名は&#8221;<span style="color: #3366ff;">42378_18502.epub</span>&#8220;とします。先に説明したように、ePubの実態はZIPファイルなので、ZIPツールで伸長できます。</p>
<blockquote>
<pre><code>$ unzip 42378_18502.epub

	42378_18502.epub
	    42378_18502.ncx
	    42378_18502.opf
	    mimetype
	    META-INF
	        container.xml
	    OEBPS
	        42378_18502.html
	        default.css
	        font
	            ipamp-mona.ttf
	        images
	            fig42378_01.png
	            fig42378_02.png</code></pre>
</blockquote>
<p>この内、&#8221;OEBPS&#8221;内に格納されているHTML等のファイルがこのePubの本体であり、中身は普通のWebページのものとほぼ同一です。ブラウザで表示すれば、普通に表示できると思います。  その他の&#8221;mimetype&#8221;、&#8221;META-INF/container.xml&#8221;、&#8221;42378_18502.opf&#8221;、&#8221;42378_18502.ncx&#8221;の各ファイルがePub固有のメタファイルとなります。各ファイルの意味と内容は次のようになります。</p>
<h4>mimetype</h4>
<p>このファイルがePub型式であることを指定するためのファイルです。ZIP変換後に必ずファイルの最初にくるように指定します(ZIP変換のコマンドについては後述)。  <strong><span style="text-decoration: underline;">ファイル名、内容とも固定</span></strong>。</p>
<blockquote>
<pre><code>application/epub+zip</code></pre>
</blockquote>
<h4>container.xml (META-INF/container.xml)</h4>
<p>ePubファイルの核である.opfファイルのパスを指定するためのファイルです。<strong><span style="text-decoration: underline;">ファイル名は固定、内容は.opfファイルのパスに応じて編集します</span></strong>。</p>
<blockquote>
<pre><code>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;container xmlns="urn:oasis:names:tc:opendocument:xmlns:container" version="1.0"&gt;
  &lt;rootfiles&gt;
    &lt;rootfile full-path="42378_18502.opf" media-type="application/oebps-package+xml" /&gt;
  &lt;/rootfiles&gt;
&lt;/container&gt;
</code></pre>
</blockquote>
<h4>opfファイル (42378_18502.opf)</h4>
<p>このePubファイルの核となるファイル。タイトル、著者等のメタ情報、各HTMLファイルや画像ファイル、CSS、目次ファイル(.ncx)のパスおよび目次の設定を指定します。また、<a href="http://lost_and_found.lv9.org/opf/opf_2.0_final_spec_ja.html#TOC2.2.10">dc:identifierには任意のIDを指定します</a>。<strong>ファイル名およびパスは任意。<span style="text-decoration: underline;">内容はコンテンツに応じて編集する必要があります</span></strong>。</p>
<blockquote>
<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;package version="2.0" xmlns="http://www.idpf.org/2007/opf" unique-identifier="BookId"&gt;
 &lt;metadata xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:opf="http://www.idpf.org/2007/opf"&gt;
   &lt;dc:title&gt;赤いくつ&lt;/dc:title&gt;
   &lt;dc:creator opf:role="aut"&gt;ハンス・クリスティアン・アンデルセン　Hans Christian Andersen&lt;/dc:creator&gt;
   &lt;dc:contributor opf:role="trl"&gt;楠山正雄訳&lt;/dc:contributor&gt;
   &lt;dc:contributor opf:role="prt"&gt;naoki.sato.name&lt;/dc:contributor&gt;
   &lt;dc:language&gt;ja&lt;/dc:language&gt;
   &lt;dc:publisher&gt;Aozora Bunko (青空文庫)&lt;/dc:publisher&gt;
   &lt;dc:identifier id="BookId"&gt;urn:uuid:www.aozora.gr.jp_42378_18502&lt;/dc:identifier&gt;
 &lt;/metadata&gt;
 &lt;manifest&gt;
  &lt;item id="ncx" href="42378_18502.ncx" media-type="text/xml" /&gt;
  &lt;item id="style" href="OEBPS/default.css" media-type="text/css" /&gt;
  &lt;item id="42378_18502" href="OEBPS/42378_18502.html" media-type="application/xhtml+xml" /&gt;
  &lt;item id="img_fig42378_01" href="OEBPS/images/fig42378_01.png" media-type="image/png"/&gt;
  &lt;item id="img_fig42378_02" href="OEBPS/images/fig42378_02.png" media-type="image/png"/&gt;
 &lt;/manifest&gt;
 &lt;spine toc="ncx"&gt;
  &lt;itemref idref="42378_18502" /&gt;
 &lt;/spine&gt;
&lt;/package&gt;</code></pre>
</blockquote>
<h3>ncxファイル (42378_18502.ncx)</h3>
<p>目次ファイル。.opfファイルで指定した目次項目のidと、実際のHTMLファイルとの紐付けを指定します。<strong><span style="text-decoration: underline;">ファイル名およびパスは任意。内容はコンテンツに応じて編集する必要があります。</span></strong></p>
<blockquote>
<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1"&gt;
  &lt;head&gt;
    &lt;meta name="dtb:uid" content="www.aozora.gr.jp_42378_18502"/&gt;
    &lt;meta name="dtb:depth" content="1"/&gt;
    &lt;meta name="dtb:totalPageCount" content="0"/&gt;
    &lt;meta name="dtb:maxPageNumber" content="0"/&gt;
  &lt;/head&gt;
  &lt;docTitle&gt;
    &lt;text&gt;赤いくつ&lt;/text&gt;
  &lt;/docTitle&gt;
  &lt;docAuthor&gt;
	&lt;text&gt;ハンス・クリスティアン・アンデルセン　Hans Christian Andersen&lt;/text&gt;
  &lt;/docAuthor&gt;
  &lt;navMap&gt;
    &lt;navPoint id="42378_18502" playOrder="1"&gt;
      &lt;navLabel&gt;
        &lt;text&gt;contents&lt;/text&gt;
      &lt;/navLabel&gt;
      &lt;content src="OEBPS/42378_18502.html"/&gt;
    &lt;/navPoint&gt;
  &lt;/navMap&gt;
&lt;/ncx&gt;</code></pre>
</blockquote>
<h3>ePub作成手順</h3>
<p>ePubを作成するには、その本体となるコンテンツ(XHTML、CSS、画像等)と、ファイルの内容を指定するメタファイルとを用意する必要があります。基本的には次のような流れになります。</p>
<ol>
<li>エディタ等を使ってXHTMLとCSSで文書を作成します。この時、ファイルを複数に分割しても問題はありません。また、<a href="http://www.kobu.com/docs/epub/index.htm">XHTMLについてはHTML宣言に言語を指定した方が良いようです</a>。同文書で使用する画像等のリソースファイルを準備します。</li>
<li>文書と各リソースファイル類をOEBPSフォルダに移動します。リソースファイル類のアドレスに注意して、作成したXHTMLファイルがブラウザで問題なく表示できることを確認します。</li>
<li>目次ファイル(ncxファイル)を作成します。コンテンツの各XHTMLファイルとidとを紐付けます。</li>
<li>opfファイルを作成します。各メタ情報、アイテムのパス、目次等をコンテンツに応じて編集します。</li>
<li>META-INF/container.xmlを作成します。内容をopfファイルのパスに応じて修正します。</li>
<li>mimetypeを作成します。</li>
<li>ePubファイルを作成します。この時点でのフォルダ構成は上記のサンプルの例を参考にしてください。以下のようなコマンドでePubファイルを作成します。<br />
<blockquote>
<pre><code>zip -0 yourbook.epub mimetype
zip -r yourbook.epub * -x mimetype
</code></pre>
</blockquote>
<p>なお、詳細は<a href="http://www.kobu.com/docs/epub/index.htm">横浜工文社さん</a>をご確認ください。特に、Windows環境の方は標準ZIPではうまくいかないようなので、ご注意ください。</li>
<li>電子書籍リーダやブラウザ等で動作を確認します。</li>
</ol>
<p>以上の手順でePub型式の電子書籍が作成できました。あとはWebページで公開するなり、<a href="http://ebookstore.sony.com/">電子書籍リーダで読み耽るなり</a>、<a href="http://www.lexcycle.com/">iPhoneで持ち出すなり</a>、<a href="http://www.scribd.com/">Scribdで共有するなり</a>、各自でお楽しみください。</p>
<h3>フォントの埋め込みとSony Readerにおける日本語コンテンツの表示</h3>
<p>ePubはフォントの埋め込みに対応しています。<a href="http://naoki.sato.name/epubunco/sample/42378_18502_min_ruby.epub">上のサンプルファイル</a>でもフォントを埋め込んでいます。埋め込むにはサンプルのように</p>
<ul>
<li>フォントファイルをOEBPS以下の任意の場所にコピーし、</li>
<li>CSSファイルで@font-faceを指定します。<br />
<blockquote>
<pre><code>@font-face {
  font-family: "ipampmona";
  src: url(font/ipamp-mona.ttf);
}</code></pre>
</blockquote>
</li>
</ul>
<p>なお、<strong>Sony Readerには日本語フォントがインストールされていないため、ePubに日本語用のフォントが埋め込まれていない場合、標準の状態では日本語を表示することができません。ですが、Sony Readerのルートフォルダの直下(Macの場合は &#8220;/Volumes/READER/&#8221; の下)に&#8221;fonts&#8221;というフォルダを作成し、そのフォルダにフォントファイルをコピーすることでそのフォントを利用できるようになります。</strong>この場合、CSSファイルでの指定は次のようになります。</p>
<blockquote>
<pre><code>@font-face {
  font-family: "ipampmona";
  src: url(res:///Data/fonts/ipamp-mona.ttf);
}</code></pre>
</blockquote>
<h3><strong>ePubファイルを作成するWebサービス</strong></h3>
<p>上で解説した一連の手順を自動化して、<a href="http://naoki.sato.name/epubunco/bookmarklet.html">青空文庫からePubを作成するBookmarkletを提供しています</a>。URLを判断しているので青空文庫でしか使えませんが、古典作品のePubファイルをご所望の場合はお試しください。</p>
<p>また、現在はまだBetaサービスのようですが、<a href="http://www.instapaper.com/">Instapaper</a>で未読のWeb記事をまとめて１つのePubファイルにまとめるサービスが提供されています。ただ、試してみたところ、残念ながら今のところ日本語には対応していない模様です。</p>
<h3>(参考)</h3>
<ul>
<li><a href="http://ja.wikipedia.org/wiki/EPUB">EPUB &#8211; Wikipedia</a></li>
<li><a href="http://www.idpf.org/">International Digital Publishing Forum (formerly Open eBook Forum)</a></li>
<li><a href="http://www.kobu.com/docs/epub/index.htm">日本語Epubブックサンプル &#8211; 横浜工文社</a></li>
<li><a href="http://d.hatena.ne.jp/lost_and_found/">08th Grade Syndrome</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://naoki.sato.name/lab/archives/45/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://naoki.sato.name/lab/archives/45" />
	</item>
		<item>
		<title>青空文庫を電子書籍リーダで読める形式にするサービス２つ</title>
		<link>http://naoki.sato.name/lab/archives/17</link>
		<comments>http://naoki.sato.name/lab/archives/17#comments</comments>
		<pubDate>Wed, 02 Dec 2009 13:59:30 +0000</pubDate>
		<dc:creator>naoki</dc:creator>
				<category><![CDATA[ebooks]]></category>
		<category><![CDATA[aozorabunko]]></category>
		<category><![CDATA[epub]]></category>
		<category><![CDATA[pdf]]></category>

		<guid isPermaLink="false">http://naoki.sato.name/lab/?p=17</guid>
		<description><![CDATA[青空文庫 to Kindle
青空文庫のtxt(zip)を、日本語フォント埋め込み済みの縦書きPDFに変換する。
ただし、Kindleとあるように、サイズはKindle用に最適化されている模様。
Sony Readerで [...]]]></description>
			<content:encoded><![CDATA[<h4><a title="青空文庫 to Kindle" href="http://a2k.aill.org/">青空文庫 to Kindle</a></h4>
<p>青空文庫のtxt(zip)を、日本語フォント埋め込み済みの縦書きPDFに変換する。<br />
ただし、Kindleとあるように、サイズはKindle用に最適化されている模様。<br />
Sony Readerで読むにはやや小さすぎる印象。</p>
<p><a href="http://twitter.com/takayama">@takayama</a>さん作。</p>
<h4><a href="http://naoki.sato.name/epubunco/bookmarklet.html">青空文庫 (XHTML) -&gt; ePub変換用Bookmarklet</a></h4>
<p>青空文庫のXHTMLページからePub形式のファイルを作成するBookmarklet。<br />
基本的にSony Readerに最適化して作成しているため、横書き、ルビ無し。<br />
作成するePubファイルの詳細を設定できるページもある (<a title="ePubunco" href="http://naoki.sato.name/epubunco/">ePubunco</a>)。</p>
<p>拙作 (<a href="http://twitter.com/naokisatoname">@naokisatoname</a>)。</p>
]]></content:encoded>
			<wfw:commentRss>http://naoki.sato.name/lab/archives/17/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://naoki.sato.name/lab/archives/17" />
	</item>
	</channel>
</rss>
