View Single Post
Old 11-05-2016, 10:04 AM   #12
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,834
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by fbrzvnrnd View Post
I attach a simple EPUB3: when you open the page it looks for width and height and draw a svg with a border big as the page. It works in iBooks, it do not work in adobe that gives ever 300 width and 150 height (you can read 120 because I leave 30px in height for avoid overflow in iBooks). I do not find a way to have REAL values of page in ADE.
I think you wouldn't need javascript to do what you want. You are using (under "preserveAspectRatio" property the value ""xMidYMid slice". You should change it for "xMidYMid meet". After that, erase the code for <rect> and instead, use the property "border". For example, try with this:

Code:
<body style="margin:0; padding:0">
    <div style="text-align: center; padding: 0pt; margin: 0pt;">
         <svg xmlns="http://www.w3.org/2000/svg" height="95%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 600 900" width="100%" style="border: 10px solid black" xmlns:xlink="http://www.w3.org/1999/xlink">
         </svg>
    </div>
</body>
Regards
Rubén
RbnJrg is offline   Reply With Quote