View Single Post
Old 04-02-2019, 07:10 PM   #8
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
So it sounds like my SVG code only works on Kobo and Calibre, and the orientation code only works on Kobo.

Anyone have any suggestions how to achieve the effect on other devices?

Edit: Here is one thing I tried using this simpler SVG, but it has the unacceptable flaw that some of the map is lost if the image aspect is too wide to fit on two pages. I can think of a way to fix it up on Adobe RMSDK readers using the page-aspect() conditional, but there doesn't seem to be an equivalent @media query to get the page aspect?.

(This works the same on Kobo's ACCESS and RMSDK10 readers and the Calibre viewer. Not tested on others.)

Code:
  <div style="margin:0;max-height:100%;max-width:100%;overflow:hidden;">
    <svg:svg viewBox="0 0 600 400" width="100%" height="100%"
	     preserveAspectRatio="xMinYMid slice">
	<svg:image height="400" width="600" xlink:href="map.png"/>
    </svg:svg>
  </div>

  <div style="margin:0;max-height:100%;max-width:100%;overflow:hidden;">
    <svg:svg viewBox="0 0 600 400" width="100%" height="100%"
	     preserveAspectRatio="xMaxYMid slice">
      <svg:image height="400" width="600" xlink:href="map.png"/>
    </svg:svg>
  </div>
Attached Thumbnails
Click image for larger version

Name:	map3a.png
Views:	236
Size:	30.2 KB
ID:	170555   Click image for larger version

Name:	map3b.png
Views:	197
Size:	30.2 KB
ID:	170556   Click image for larger version

Name:	map3c.png
Views:	192
Size:	27.2 KB
ID:	170560   Click image for larger version

Name:	map3d.png
Views:	226
Size:	27.3 KB
ID:	170561  
Attached Files
File Type: epub map3.epub (6.3 KB, 174 views)

Last edited by GeoffR; 04-02-2019 at 07:55 PM. Reason: simpler but flawed SVG
GeoffR is offline   Reply With Quote