View Single Post
Old 05-17-2014, 12:18 PM   #8
odedta
Addict
odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.odedta read the news today, oh boy.
 
Posts: 398
Karma: 96448
Join Date: Dec 2013
Device: iPad
For some meta tags such as:
Code:
<meta property="ibooks:iphone-orientation-lock">none</meta>
<meta property="ibooks:ipad-orientation-lock">none</meta>
You must include the ibooks prefix
Quote:
prefix="ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/"
in the package so your file will pass validation, if it works with or without the prefix I have no clue and I don't intend to try, just stick with the ePub standard and you should be fine.

If you are working with Fixed-Layout ePubs you will have to use the meta tags:
Code:
<meta property="rendition:layout">pre-paginated</meta>
<meta property="rendition:orientation">portrait</meta>
<meta property="rendition:spread">landscape</meta>
AND include the prefix:
Quote:
prefix="rendition: http://www.idpf.org/vocab/rendition/#"
to the package.opf

Now, if you have both fixed layout and embedded fonts the correct form of declaring the package prefixes are as follows:
Quote:
prefix="rendition: http://www.idpf.org/vocab/rendition/# ibooks: http://vocabulary.itunes.apple.com/rdf/ibooks/vocabulary-extensions-1.0/"
Meaning, just add a space between them.

Everything I said so far is ePub 3 standards requirements. In order to be backwards compatible, meaning, conforming to ePub 2 standards you must include the com.apple.ibooks.display-options.xml file in order to have embedded fonts or fixed layout.

Here is a template I use:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<display_options>
	<platform name="*">	 <!-- all devices -->
		<option name="fixed-layout">true</option> <!-- fixes the layout -->
		<option name="specified-fonts">false</option>	 <!-- set to "true" when embedding fonts -->
		<option name="open-to-spread">true</option>	 <!-- single page or full spread on open -->
		<!--<option name="orientation-lock">landscape-only</option>	 "landscape-only" or "portrait-only" or leave this line commented -->
		<option name="interactive">false</option>	 <!-- set to "true" when using javascript or canvas -->
	</platform>
</display_options>
To summarize, in my opinion, it's best to include both the tags you need and the com.apple.ibooks.display-options.xml file to have backwards compatibility, now, we also want our files to be validated to know they are well-formed, so we declare the prefixes we used in the package tags.
odedta is offline   Reply With Quote