<?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/"
	>

<channel>
	<title>Digital Editions</title>
	<atom:link href="http://blogs.adobe.com/digitaleditions/feed" rel="self" type="application/rss+xml" />
	<link>http://blogs.adobe.com/digitaleditions</link>
	<description>News, info and tips about Adobe Digital Editions</description>
	<lastBuildDate>Tue, 02 Feb 2010 10:36:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Digital Editions 1.7.2 now available</title>
		<link>http://blogs.adobe.com/digitaleditions/2010/02/digital_editions_172_now_avail.html</link>
		<comments>http://blogs.adobe.com/digitaleditions/2010/02/digital_editions_172_now_avail.html#comments</comments>
		<pubDate>Tue, 02 Feb 2010 10:36:56 +0000</pubDate>
		<dc:creator>Dave Dickson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Digital Editions]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/digitaleditions/2010/02/digital_editions_172_now_avail.html</guid>
		<description><![CDATA[Today, we&#8217;re excited to announce the release of Digital Editions 1.7.2, which is now available for download on Adobe.com. This update adds compatibility for additional operating systems, including Microsoft Windows 7 (32- and 64 bit) and Mac OS X 10.6 &#8230; <a href="http://blogs.adobe.com/digitaleditions/2010/02/digital_editions_172_now_avail.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Today, we&#8217;re excited to announce the release of Digital Editions 1.7.2, which is now available for download on <a href="http://www.adobe.com/products/digitaleditions/">Adobe.com</a>.  This update adds compatibility for additional operating systems, including Microsoft Windows 7 (32- and 64 bit) and Mac OS X 10.6 (Snow Leopard, 32- and 64-bit).  Compatibility with these additional operating systems allows readers to continue to acquire eBooks in the interoperable PDF and EPUB formats from thousands of online booksellers and libraries, and read these books wherever and whenever they like &mdash; especially across different screen and device types.  The Digital Editions 1.7.2 release also contains updates that address other previous known issues with the application.</p>
<p>You can access the Digital Editions 1.7.2 application update on <a href="http://www.adobe.com/products/digitaleditions/">Adobe.com</a>. Enterprise IT administrators can find standalone installers on the <a href="http://www.adobe.com/devnet/digitalpublishing/">Adobe Digital Publishing Technology Center</a> site.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/digitaleditions/2010/02/digital_editions_172_now_avail.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>EPUB, iPad and Content Interoperability</title>
		<link>http://blogs.adobe.com/digitaleditions/2010/01/epub_ipad_and_content_interope.html</link>
		<comments>http://blogs.adobe.com/digitaleditions/2010/01/epub_ipad_and_content_interope.html#comments</comments>
		<pubDate>Wed, 27 Jan 2010 16:56:08 +0000</pubDate>
		<dc:creator>Dave Dickson</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[EPUB]]></category>
		<category><![CDATA[InDesign]]></category>
		<category><![CDATA[Interoperability]]></category>
		<category><![CDATA[iPad]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/digitaleditions/2010/01/epub_ipad_and_content_interope.html</guid>
		<description><![CDATA[We&#8217;re anticipating that the eBook functionality on the newly announced Apple iPad will spur further consumer interest in eBooks and we welcome the decision Apple has made to standardize on the EPUB format. With export support from professional publishing tools &#8230; <a href="http://blogs.adobe.com/digitaleditions/2010/01/epub_ipad_and_content_interope.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>We&#8217;re anticipating that the eBook functionality on the newly announced Apple iPad will spur further consumer interest in eBooks and we welcome the decision Apple has made to standardize on the EPUB format.  With export support from professional publishing tools like <a href="http://www.adobe.com/products/indesign/">Adobe InDesign</a>, EPUB allows publishers to streamline the authoring workflow by reducing the number of formats to which they output.</p>
<p>However, in a recent study commissioned by the Book Industry Study Group, the number one complaint consumers noted about the e-reader experience is that &#8220;certain e-books [are] specific to certain e-readers.&#8221;  (Book Industry Study Group. &#8220;<a href="http://www.bisg.org/publications/product.php?p=19&amp;c=437">Consumer Attitudes Toward E-book Reading</a>&#8221; Jan. 2010, p. 28).  Clearly, consumers value content interoperability as a key feature of the digital reading experience, preferring to not have their content specific to one device.  Although Apple has standardized on the EPUB format, because it employs its own DRM to protect eBooks consumers will lose out on much of the benefit of an interoperable format simply because they won&#8217;t be able to transfer content across devices.</p>
<p>For example, EPUB content protected with Apple DRM won&#8217;t work on numerous eReaders like the Barnes &amp; Noble nook and the Sony Reader, not to mention future, forthcoming models.  Similarly, protected EPUB eBooks obtained from thousands of online booksellers (including Barnes &amp; Noble) and most public libraries (including The New York Public Library)&mdash;are unreadable on the iPad.</p>
<p>In the coming months, we&#8217;ll see a plethora of tablets besides the iPad hit the market.  Before investing in a library of eBook content, readers should consider how they&#8217;ll be able to access their content across the range of devices&mdash;eReaders, tablets, desktop PCs, and smartphones&mdash;that they use on a daily basis.  The Adobe eBook Platform&mdash;including the thousands of online booksellers and libraries using <a href="http://www.adobe.com/products/contentserver/">Content Server 4</a> to protect PDF and EPUB eBooks and the 30+ device manufacturers building compatible eReaders&mdash;allows consumers to download, transfer and read EPUB eBooks across PCs, smartphones, and dozens of dedicated eReader devices.  The result is a reading experience not limited to a specific platform, but tailored to the consumer&mdash;whenever and wherever they wish to read.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/digitaleditions/2010/01/epub_ipad_and_content_interope.html/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Creating EPUB with InDesign &#8211; online resources</title>
		<link>http://blogs.adobe.com/digitaleditions/2010/01/creating_epub_with_indesign_.html</link>
		<comments>http://blogs.adobe.com/digitaleditions/2010/01/creating_epub_with_indesign_.html#comments</comments>
		<pubDate>Tue, 26 Jan 2010 13:58:10 +0000</pubDate>
		<dc:creator>Dave Dickson</dc:creator>
				<category><![CDATA[Authoring]]></category>
		<category><![CDATA[authoring]]></category>
		<category><![CDATA[eBooks]]></category>
		<category><![CDATA[EPUB]]></category>
		<category><![CDATA[InDesign]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/digitaleditions/2010/01/creating_epub_with_indesign_.html</guid>
		<description><![CDATA[We&#8217;ve posted new resources over at Adobe.com to help authors as they use InDesign to create eBooks and export them to EPUB. You can find three new how-to guides at www.adobe.com/products/indesign/epub/howto that cover the following topics: Creating EPUB from InDesign &#8230; <a href="http://blogs.adobe.com/digitaleditions/2010/01/creating_epub_with_indesign_.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>We&#8217;ve posted new resources over at Adobe.com to help authors as they use InDesign to create eBooks and export them to EPUB. You can find three new how-to guides at <a href="http://www.adobe.com/products/indesign/epub/howto">www.adobe.com/products/indesign/epub/howto</a> that cover the following topics:</p>
<ul>
<li>Creating EPUB from InDesign</li>
<li>FAQ on the InDesign EPUB export</li>
<li>Working with images when exporting to EPUB</li>
</ul>
<p>For more general InDesign EPUB authoring resources, including video tutorials on setting up documents for optimal EPUB export, visit the new InDesign eBooks authoring center at <a href="http://www.adobe.com/products/indesign/epub/howto">www.adobe.com/products/creativesuite/design/crossmedia_resources/ebooks_software.html</a></p>
<p>If you&#8217;d like have a suggestion for a future topic you&#8217;d like to see in a how-to guide, please leave a comment here.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/digitaleditions/2010/01/creating_epub_with_indesign_.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adobe Expanding Investment in Digital Publishing</title>
		<link>http://blogs.adobe.com/digitaleditions/2009/11/adobe_expanding_investment_in_digital_publishing.html</link>
		<comments>http://blogs.adobe.com/digitaleditions/2009/11/adobe_expanding_investment_in_digital_publishing.html#comments</comments>
		<pubDate>Wed, 11 Nov 2009 17:22:45 +0000</pubDate>
		<dc:creator>Dave Dickson</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/digitaleditions/2009/11/adobe_expanding_investment_in_digital_publishing.html</guid>
		<description><![CDATA[As part of a restructuring announced yesterday, Adobe has made the decision to expand its investment in digital publishing, creating a new organization focused on delivering products to increase digital revenue opportunities for book, newspaper and magazine publishers. This organization &#8230; <a href="http://blogs.adobe.com/digitaleditions/2009/11/adobe_expanding_investment_in_digital_publishing.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>As part of a restructuring announced yesterday, Adobe has made the decision to expand its investment in digital publishing, creating a new organization focused on delivering products to increase digital revenue opportunities for book, newspaper and magazine publishers.  This organization will combine the efforts of Adobe&#8217;s eBook business responsible for the <a href="http://www.adobe.com/devnet/readermobile/">Adobe Reader Mobile SDK</a>, <a href="http://www.adobe.com/products/contentserver/">Adobe Content Server</a>, <a href="http://www.adobe.com/products/digitaleditions/">Adobe Digital Editions</a>, and PDF and EPUB authoring support in <a href="http://www.adobe.com/products/indesign/">Adobe InDesign</a> with Adobe&#8217;s digital newspaper and magazine efforts responsible for, among other products, the collaboration with the New York Times to create the AIR-based <a href="https://timesreader.nytimes.com/">Times Reader 2.0</a>.</p>
<p>The decision to increase investment in this area underscores the importance that Adobe has always given to digital publishing as well as the bright future it sees in helping publishers to deliver compelling digital publications that support a variety of business models: subscription, advertising, retail and other emerging models. We are particularly excited about what we have in store for 2010.  We plan to further our reach to emerging mobile reading platforms to allow readers to read anywhere, on any device.  With Adobe&#8217;s acquisition of Omniture, we will help publishers measure and understand how their readership interacts with and uses their content.  But, most of all, we will continue to deliver products that make digital books, newspapers and magazines a terrific experience for readers.</p>
<p>We look forward to working with our existing customers and business partners and welcome any new inquiries as we continue our progress in digital publishing.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/digitaleditions/2009/11/adobe_expanding_investment_in_digital_publishing.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>InDesign to Kindle conversion guide</title>
		<link>http://blogs.adobe.com/digitaleditions/2009/09/indesign_to_kindle_conversion.html</link>
		<comments>http://blogs.adobe.com/digitaleditions/2009/09/indesign_to_kindle_conversion.html#comments</comments>
		<pubDate>Thu, 17 Sep 2009 15:47:09 +0000</pubDate>
		<dc:creator>Dave Dickson</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[InDesign]]></category>
		<category><![CDATA[ Kindle]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/digitaleditions/2009/09/indesign_to_kindle_conversion.html</guid>
		<description><![CDATA[Today, we&#8217;re posting a how-to guide that explains how to convert eBooks authored using Adobe InDesign for compatibility with the Amazon Kindle and the Kindle Store. Because Amazon uses their proprietary AZW format, the Kindle doesn&#8217;t natively support the open &#8230; <a href="http://blogs.adobe.com/digitaleditions/2009/09/indesign_to_kindle_conversion.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Today, we&#8217;re posting a how-to guide that explains how to convert eBooks authored using Adobe InDesign for compatibility with the Amazon Kindle and the Kindle Store. Because Amazon uses their proprietary AZW format, the Kindle doesn&#8217;t natively support the open EPUB standard. However, with a bit of open source software, it&#8217;s fairly easy to convert the EPUB files exported with InDesign into the Amazon-compatible MOBI format.</p>
<p>Converting InDesign documents for Kindle compatibility requires the following steps:</p>
<p>1. Export InDesign document to EPUB<br />
2. Convert EPUB to Amazon-compatible MOBI format<br />
3. Preview on Kindle device (optional)<br />
4. Upload to Amazon store</p>
<p>For complete details, check out the <a href="http://www.adobe.com/devnet/digitalpublishing/articles/indesigntokindle.html">Adobe InDesign to Amazon Kindle Store white paper</a><br /></p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/digitaleditions/2009/09/indesign_to_kindle_conversion.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EPUB generation library written in Java</title>
		<link>http://blogs.adobe.com/digitaleditions/2009/05/epub_generation_library_writte.html</link>
		<comments>http://blogs.adobe.com/digitaleditions/2009/05/epub_generation_library_writte.html#comments</comments>
		<pubDate>Mon, 11 May 2009 14:39:17 +0000</pubDate>
		<dc:creator>norton</dc:creator>
				<category><![CDATA[Authoring]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/digitaleditions/2009/05/epub_generation_library_writte.html</guid>
		<description><![CDATA[It&#8217;s come to my attention that I didn&#8217;t really give EPUBGen a proper introduction, and so there&#8217;s been some confusion about the project. EPUBGen project EPUBGen is a Java library that demonstrates EPUB generation from a variety of document formats, &#8230; <a href="http://blogs.adobe.com/digitaleditions/2009/05/epub_generation_library_writte.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s come to my attention that I didn&#8217;t really give EPUBGen a proper introduction, and so there&#8217;s been some confusion about the project.
</p>
<h2>EPUBGen project</h2>
<p>EPUBGen is a Java library that demonstrates EPUB generation from a variety of document formats, and which may be a useful starting point or reference code for other EPUB generation needs. That is to say, it&#8217;s an effort to promote the development of a variety of tools and workflows.</p>
<p><span id="more-123"></span></p>
<p>EPUBGen has both a set of back-end code generation modules and front end format importer modules. The back-end modules generate EPUB and illustrate more advanced functionality, including font subset embedding with obfuscation. The front-end modules are experimental and incomplete at this time. There are sample Java applications are provided that illustrate the conversion of respective file types (rt2epub, word2epub, fb2epub). There&#8217;s a build script and available jar file for the &#8216;rtf2epub&#8217; project.</p>
<p>This project is being provided to the development community to build on, and so contribution and derivative works, within the scope of the BSD license are invited.</p>
<h2>epub-tools</h2>
<p>This project is really part of our efforts to support the community effort around EPUB, and as such is hosted with other tools for generating and working with EPUB documents.</p>
<p>The project is hosted with <a href="http://code.google.com/p/epub-tools/">epub-tools</a>.<br />You can find the source code via <a href="http://code.google.com/p/epub-tools/source/checkout">subversion</a>.<br />For rtf2epub there is an entry in the <a href="http://code.google.com/p/epub-tools/downloads/list?can=2&amp;q=label:rtf2epub&amp;colspec=Filename%20Summary%20Uploaded%20Size%20DownloadCount">downloads</a></p>
<h2>A quick look at the packages.</h2>
<p> Without going into too much detail, here&#8217;s a list of the top level packages (by which the project is organized) and a short description of each:</p>
<h3>com.adobe.epub</h3>
<p>This is where you&#8217;ll find EPUB related functionality, including handling of OPF, OPS, NCX, and CSS generation.</p>
<h3>com.adobe.otf</h3>
<p>This has most of the font management code (although Font Subsetting is actually found in com.adobe.epub).</p>
<h3>com.adobe.conv.rtf2epub, com.adobe.conv.word2epub, com.adobe.fb2</h3>
<p>These are the front-end modules, they&#8217;ll each have a main entry point and conversion code for reading and parsing through the source format.</p>
<h3>com.adobe.office.word</h3>
<p>Functionality used by both rtf2epub and word2epub.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/digitaleditions/2009/05/epub_generation_library_writte.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Font obfuscation code, available for review</title>
		<link>http://blogs.adobe.com/digitaleditions/2009/05/font_mangling_code_available_f.html</link>
		<comments>http://blogs.adobe.com/digitaleditions/2009/05/font_mangling_code_available_f.html#comments</comments>
		<pubDate>Mon, 11 May 2009 12:54:07 +0000</pubDate>
		<dc:creator>norton</dc:creator>
				<category><![CDATA[Authoring]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/digitaleditions/2009/05/font_mangling_code_available_f.html</guid>
		<description><![CDATA[I realize this blog might have a diverse readership so I&#8217;ll warn those of you who aren&#8217;t developers, that this particular blog post probably isn&#8217;t for you. Unless you find reading Java code interesting, you can probably skip this article. &#8230; <a href="http://blogs.adobe.com/digitaleditions/2009/05/font_mangling_code_available_f.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I realize this blog might have a diverse readership so I&#8217;ll warn those of you who aren&#8217;t developers, that this particular blog post probably isn&#8217;t for you.</p>
<p>Unless you find reading Java code interesting, you can probably skip this article.</p>
<p>I&#8217;ve implemented the IDPF font obfuscation algorithm which is recommended <a href="http://www.openebook.org/doc_library/informationaldocs/FontManglingSpec.html">here</a>. The font obfuscation code can be found in the EPUBGen project, and so you can take and review, and use the code. In this article, I&#8217;m going to highlight just the portions of that project that are related to embedding and obfuscating the font information. (The project also has font subsetting and other features which I will not cover.)</p>
<p><span id="more-122"></span></p>
<p>If you&#8217;d like to follow along, the code I&#8217;m referring to is hosted on <a href="http://code.google.com/p/epub-tools/">epub-tools</a>, and you&#8217;ll find it in the epubgen section within epub-tools.</p>
<p>As I mentioned, this should match the approach outlined in the informational document from the IDPF, which describes an algorithm for obfuscating a font, how to identify the document key for that algorithm, and how those fonts should be identified.</p>
<h2>Obfuscation Algorithm</h2>
<p>The code that actually modifies the font is in the &#8220;IDPFFontResource.java&#8221; file. You&#8217;ll find it in &#8230;/com.adobe.epub/src/com/adobe/epub/opf/IDPFFontResource.java within the project.</p>
<p>The loop is a little different than that of the recommendation document, but the end result is the same. The obfuscation key (see below) is applied to the first 1040 bytes of the font file.</p>
<p>The code that actually does this is in the the serialize method:</p>
<pre>/** Implements the Obfuscation Algorithm from* http://www.openebook.org/doc_library/informationaldocs/FontManglingSpec.html**/public void serialize(OutputStream out) throws IOException {try {byte[] buffer = new byte[4096];int len;InputStream in = source.getInputStream();boolean first = true;while ((len = in.read(buffer)) &gt; 0) {if( first &amp;&amp; mask != null ) {first = false;for( int i = 0 ; i &lt; 1040 ; i++ ) {buffer[i] = (byte)(buffer[i] ^ mask[i%mask.length]);}}out.write(buffer, 0, len);}} catch (IOException e) {e.printStackTrace();}out.close();}</pre>
<h2>Identifying the Obfuscation Key</h2>
<p>Ok, so we need an obfuscation key. The recommendation tells us to use the EPUB&#8217;s &#8216;unique-identifier&#8217;. Every EPUB has a <code>unique-identifier</code>, and it&#8217;s <code>unique-identifier</code> is referenced in the root element of the OPF file. Look through the metadata in the OPF and you&#8217;ll find an identifier with an <code>id</code> that matches the <code>unique-identifier</code>, that&#8217;s the EPUB&#8217;s unique identifier and is the basis for our obfuscation key.</p>
<p>Of course as EPUBGen is creating the epub, and not parsing it, we need to create the identifier. This is done in the <code>addUID</code> method.</p>
<p>Both the <code>addUID</code> method and the <code>makeXORMask</code> method (below) are found in Publication.java.</p>
<pre>/** Every EPUB needs a unique identifier, this could be an ISBN or other identifier.* In this case we're generating a random identifier.** For the purposes of font obfuscation, this does not need to be random, just unique (like an ISBN)*/public String addUID() {String uid = this.generateRandomIdentifier();return uid;}</pre>
<p>The value of the <code>unique-identifier</code> needs to have the whitespace removed. The resulting string will be passed through the SHA-1 hash algorithm to give us our key or mask for the font files.</p>
<p>Note: I&#8217;m only showing the portion of <code>makeXORMask</code> that relate to the IDPF approach. The project can also create a mask for the deprecated approach.</p>
<pre>private byte[] makeXORMask() {if(opfUID == null)return null;ByteArrayOutputStream mask = new ByteArrayOutputStream();if (useIDPFFontMangling){/** This starts with the "unique-identifier", strips the whitespace, and applies SHA1 hash* giving a 20 byte key that we can apply to the font file.** See: http://www.openebook.org/doc_library/informationaldocs/FontManglingSpec.html*/try {Security.addProvider(new com.sun.crypto.provider.SunJCE());MessageDigest sha = MessageDigest.getInstance("SHA-1");String temp = strip(opfUID);sha.update(temp.getBytes(), 0, temp.length());mask.write(sha.digest());} catch (NoSuchAlgorithmException e) {System.err.println("No such Algorithm (really, did I misspell SHA-1?");System.err.println(e.toString());return null;} catch (IOException e) {System.err.println("IO Exception. check out mask.write...");System.err.println(e.toString());return null;}if (mask.size() != 20) {System.err.println("makeXORMask should give 20 byte mask, but isn't");return null;}}else {/** This is where the deprecated approach is implemented.* Removed for clarity.*/}return mask.toByteArray();}</pre>
<h2>Specifying Obfuscated Resources</h2>
<p>The result is put together by the <code>serialize</code> method in Publication.java. You&#8217;ll see the call to <code>makeXORMask</code> passing that mask to the IDPFFontResource, the call to the resource serialization (<code>res.serialize</code>), and then generating the <code>encryption.xml</code> file.</p>
<pre>public void serialize(ContainerWriter container) throws IOException {Enumeration names = resourcesByName.keys();byte[] mask = makeXORMask();boolean needEnc = false;while (names.hasMoreElements()) {String name = (String) names.nextElement();Resource res = (Resource) resourcesByName.get(name);if (mask != null &amp;&amp; res instanceof AdobeFontResource) {((AdobeFontResource) res).setXORMask(mask);needEnc = true;}if (mask != null &amp;&amp; res instanceof IDPFFontResource) {((IDPFFontResource) res).setXORMask(mask);needEnc = true;}OutputStream out = container.getOutputStream(name, res.canCompress());res.serialize(out);}if (needEnc) {XMLSerializer ser = new XMLSerializer(container.getOutputStream("META-INF/encryption.xml"));ser.startDocument("1.0", "UTF-8");ser.startElement(ocfns, "encryption", null, true);names = resourcesByName.keys();while (names.hasMoreElements()) {String name = (String) names.nextElement();Resource res = (Resource) resourcesByName.get(name);if ((res instanceof FontResource) &amp;&amp; (useIDPFFontMangling)) {SMapImpl attrs = new SMapImpl();ser.startElement(encns,"EncryptedData", null, true);attrs.put(null, "Algorithm", "http://www.idpf.org/2008/embedding");ser.startElement(encns, "EncryptionMethod", attrs, false);ser.endElement(encns, "EncryptionMethod");ser.startElement(encns, "CipherData", null, false);attrs = new SMapImpl();attrs.put(null, "URI", name);ser.startElement(encns, "CipherReference", attrs, false);ser.endElement(encns, "CipherReference");ser.endElement(encns, "CipherData");ser.endElement(encns, "EncryptedData");}else if (res instanceof FontResource) {/** This is where the deprecated approach is implemented.* Removed for clarity.*/}}ser.endElement(ocfns, "encryption");ser.endDocument();}XMLSerializer ser = new XMLSerializer(container.getOutputStream("META-INF/container.xml"));/** Code removed for brevity.* Can be viewed in the project, it just fills out the container.xml file.*/}</pre>
<p> And with that, you should have the IDPF recommended font obfuscation approach. The font still needs to be listed in the manifest, and can be referenced by the CSS as it normally would.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/digitaleditions/2009/05/font_mangling_code_available_f.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>InDesign 6.0.2 and EPUB export</title>
		<link>http://blogs.adobe.com/digitaleditions/2009/05/indesign_602_and_epub_export.html</link>
		<comments>http://blogs.adobe.com/digitaleditions/2009/05/indesign_602_and_epub_export.html#comments</comments>
		<pubDate>Fri, 08 May 2009 15:53:30 +0000</pubDate>
		<dc:creator>norton</dc:creator>
				<category><![CDATA[Authoring]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/digitaleditions/2009/05/indesign_602_and_epub_export.html</guid>
		<description><![CDATA[There&#8217;s a new update to InDesign CS4. Version 6.0.2. The update fixes lots of other stuff, so you may want to look at the release notes to see what&#8217;s fixed that is not related to the EPUB export, I&#8217;m only &#8230; <a href="http://blogs.adobe.com/digitaleditions/2009/05/indesign_602_and_epub_export.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>There&#8217;s a new <a href="http://www.adobe.com/support/downloads/new.jsp">update</a> to InDesign CS4. Version 6.0.2. The update fixes lots of other stuff, so you may want to look at the <a href="http://www.adobe.com/support/documentation/en/indesign_incopy/releasenotes.html">release notes</a> to see what&#8217;s fixed that is not related to the EPUB export, I&#8217;m only going to talk about the EPUB plug-in.</p>
<p><span id="more-121"></span></p>
<h3>Issues fixed by the update are:</h3>
<blockquote><p>Content is dropped during export to Digital Editions when two or more documents are included in a book. [2262891]*</p></blockquote>
<p>This was an issue where, if you have more than one document in a book file, and you export an EPUB from the book file, the first document is the only one that&#8217;s guaranteed to have any content.<br />
<blockquote>Export for Digital Editions will put underscores, rather than spaces, in the Contents if TOCStyle is not used. [2296603]*</p></blockquote>
<p>This is the case where you use the InDesign Book feature to export a set of documents, and the file names end up in the &#8220;Contents&#8221; panel in ADE. The problem was that if you had spaces in the filenames, the export filter would replace them with underscores. You&#8217;ll now get spaces rather than having them replaced by underscores.<br />
<h3>The issues that were fixed in previous updates, in case you missed them:</h3>
<blockquote><p>Bold (and in some cases italic) won’t work when exporting an InDesign document to Digital Editions. [2296606]</p></blockquote>
<p>It was actually that bold wasn&#8217;t working when it wasn&#8217;t in the paragraph style, and italic worked only if you did not embed the font. Both were fixed in the 6.0.1 update, but are also fixed in the 6.0.2 update.<br />
<blockquote>Exporting to Digital Editions fails with an error in the Italian and French version. [1923992]</p></blockquote>
<p>The dialog wasn&#8217;t working, which had prevented the plug-in from being used.So with this update you should be getting much better output from InDesign CS4.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/digitaleditions/2009/05/indesign_602_and_epub_export.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RTF, Word, and FB2 file conversion</title>
		<link>http://blogs.adobe.com/digitaleditions/2009/04/rtf_word_and_fb2_file_conversi.html</link>
		<comments>http://blogs.adobe.com/digitaleditions/2009/04/rtf_word_and_fb2_file_conversi.html#comments</comments>
		<pubDate>Tue, 28 Apr 2009 12:00:38 +0000</pubDate>
		<dc:creator>norton</dc:creator>
				<category><![CDATA[Authoring]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/digitaleditions/2009/04/rtf_word_and_fb2_file_conversi.html</guid>
		<description><![CDATA[EPUBGen is an open source project supporting conversion of FB2, RTF, and Word to ePub <a href="http://blogs.adobe.com/digitaleditions/2009/04/rtf_word_and_fb2_file_conversi.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>EPUBGen is a project that Peter Sorotokin has started, it&#8217;s a conversion utility for rtf files, word files, and FictionBook files. The output in each case is, of course, epub.</p>
<p>The project is open source, and available for <a href="http://code.google.com/p/epub-tools/">download</a>.</p>
<p>Note that there is also a .jar file for rtf2epub and it should work, but the main intent of this project is to provide source code and examples of the way things could be done. In other words, there&#8217;s plenty of room for developers to improve and enhance the conversion.</p>
<p>The project includes code to convert a couple different formats to ePub, including generating all the required files and creating the package. The project also shows how to mangle embedded fonts, how to sub-set those font (thus reducing the size of the ePub).</p>
<p><span id="more-120"></span></p>
<h3>Location</h3>
<p>The code is hosted with the epub-tools site on code.google.com. Thanks to <a href="http://www.threepress.org/about/">Liza Daly</a> for organizing a location for ePub tools.</p>
<h3>Building</h3>
<p>I created an ant file for building the rtf2epub converter, and it&#8217;s included. I expect there&#8217;s a need for build scripts for the others, but it&#8217;s really straight forward. FB2 conversion does have some additional dependencies, I&#8217;ll cover that in more detail in an upcoming entry to this blog.</p>
<p>Once you have the project building it should be straightforward.You&#8217;ll find the &#8216;build.xml&#8217; in the com.adobe.conv.rtf2epub folder. Of course you&#8217;ll need Ant installed to use the Ant script.</p>
<pre>ant</pre>
<p>Should give you results similar to the following:
<pre>Buildfile: build.xmlcreateDistributionDir:buildSrcZip:removeClasses:compile:[javac] Compiling 9 source files to .../com.adobe.conv.rtf2epub/bin[javac] Compiling 47 source files to .../com.adobe.conv.rtf2epub/bin[javac] Compiling 78 source files to .../com.adobe.conv.rtf2epub/bin[javac] Compiling 2 source files to .../com.adobe.conv.rtf2epub/binbuildJar:[jar] Building jar: .../com.adobe.conv.rtf2epub/dist/rtf2epub-0.1.0.jarbuildBinZip:[delete] Deleting:  .../com.adobe.conv.rtf2epub/dist/rtf2epub-0.1.0.zip[zip] Building zip: .../com.adobe.conv.rtf2epub/dist/rtf2epub-0.1.0.zipbuildrtf2epub:BUILD SUCCESSFULTotal time: 3 seconds</pre>
<h3>Running</h3>
<p>After building, or if you download the pre-built jar file, you can run the converter at the command line. Arguments are the path to the file to convert and the path to the epub file.</p>
<pre>java -jar rtf2epub-0.1.0.jar In.rtf Out.epub</pre>
<h3>Some items worth noting</h3>
<p>Of course Main.java is the entry for each of the converters, but much of the interesting code is in the Publication.java file.</p>
<p>FB2 conversion requires some additional dependencies, which I&#8217;ll note in an upcoming entry.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/digitaleditions/2009/04/rtf_word_and_fb2_file_conversi.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Working with the cover</title>
		<link>http://blogs.adobe.com/digitaleditions/2009/03/working_with_the_cover.html</link>
		<comments>http://blogs.adobe.com/digitaleditions/2009/03/working_with_the_cover.html#comments</comments>
		<pubDate>Fri, 27 Mar 2009 14:08:21 +0000</pubDate>
		<dc:creator>norton</dc:creator>
				<category><![CDATA[Authoring]]></category>

		<guid isPermaLink="false">http://blogs.adobe.com/digitaleditions/2009/03/working_with_the_cover.html</guid>
		<description><![CDATA[The covers on your books make a first impression. So when you&#8217;re creating a cover for a book you&#8217;re likely to put in some extra effort to make sure it looks good. When you&#8217;re working with EPUBs and Adobe Digital &#8230; <a href="http://blogs.adobe.com/digitaleditions/2009/03/working_with_the_cover.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>The covers on your books make a first impression. So when you&#8217;re creating a cover for a book you&#8217;re likely to put in some extra effort to make sure it looks good. When you&#8217;re working with EPUBs and Adobe Digital Editions, there are some simple things that you can do that have a big impact on the look of the covers.</p>
<p><span id="more-119"></span><br />
In general, I&#8217;m assuming your cover pages are going to be a separate XHTML file from the rest of the content, and that the XHTML file will have, basically, a single image to represent the cover.<br />
<h3>The right aspect ratio for the thumbnail.</h3>
<p>Our thumbnail size is 90&#215;130. For a cover page to fit well in that, and also look good at larger sizes, you&#8217;ll want to create  is a single image with that aspect ratio. (567&#215;819 should work well.) In the CSS you&#8217;ll want to set the max-width to 100%, all margins and padding set to zero.
<pre>img { max-width: 100%;padding: 0;margin: 0;}</pre>
<h3>Keeping the cover always centered.</h3>
<p>You&#8217;ve probably noticed that in Adobe Digital Editions, when you shrink the text enough, the reading view goes into a two column or three column mode. That&#8217;s great for the text, but not so good for the image, you&#8217;d rather keep it centered. A one column view is usually best.This is one case where I&#8217;d probably just include the style information in the XHTML file for the cover. You&#8217;ll want to style the &#8216;body&#8217; tag with the <code>oeb-column-number</code> property and a value of 1, like this:<code>&lt;body style="oeb-column-number: 1;"&gt;</code>The inline style will override the default style, and you&#8217;ll have a single column for everything in that particular <code>body</code> element.<br />
<h3>Advanced techniques could be achieved via SVG.</h3>
<p>So, now we&#8217;ve got a cover image that fills the thumbnail without any white bands. It also looks good in the reading view. That&#8217;s as far as we&#8217;re going in this blog post, but I thought I should mention that if you want more sophisticated cover pages, perhaps changing the background color in the reading view, or having an image that bleeds well off of the view at most aspect ratios&#8230; well, that&#8217;s certainly possible, but requires using inline SVG to control the view, and that&#8217;s beyond the scope of today&#8217;s post. <img src='http://blogs.adobe.com/digitaleditions/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.adobe.com/digitaleditions/2009/03/working_with_the_cover.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
