View Single Post
Old 10-11-2012, 03:07 AM   #2
jobalcaen
Junior Member
jobalcaen began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Oct 2012
Location: Winnipeg, Canada
Device: Sony PRS-505
fixed

I was finally able to resolve my own issue. The solution was to reduce the width and the height of the svg to 99% instead of 100%. I guess there is somekind of a hidden margin that does not get removed even though I set the margins for everything to 0 in the css. Here is an example of the code I used:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="../Styles/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
/*<![CDATA[*/

@page {padding: 0pt; margin:0pt}
body { text-align: center; padding:0pt; margin: 0pt; }
/*]]>*/
</style>
</head>

<body>
<div>
<svg xmlns="http://www.w3.org/2000/svg" height="99%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 524 612" width="99%" xmlns:xlink="http://www.w3.org/1999/xlink">
<image height="612" width="524" xlink:href="../Images/image001.png"></image>
</svg>
</div>
</body>
</html>

I tested this successfully in ibooks, kobo reader app on the ipad, Sony PRS-505, firefox epubreader, FBreader and ADE.
jobalcaen is offline   Reply With Quote