Mobileread
Horrendous formatting...
#1  patrik 09-17-2020, 11:46 AM
Bought a new book the other day, and it seems to be some weird fixed layout which makes it impossible to read...

Every word has it's own set up spans etc...


Maybe some of you regex masters can salvage this, I'm actually thinking converting it to pdf and run it through Finereader...



Code
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">	<head>	<meta charset="utf-8"/>	<meta content="width=420,height=595" name="viewport"/>	<title>9789137154060-147</title>	<link href="css/idGeneratedStyles.css" rel="stylesheet" type="text/css"/>
<meta content="urn:uuid:d6736828-9029-46f0-8f4e-838ca7e0a36b" name="Adept.expected.resource"/>	</head>	<body id="x9789137154060-147" lang="sv-SE" style="width:420px;height:595px" xml:lang="sv-SE">	<div id="_idContainer466">	<img alt="" class="_idGenObjectAttribute-1 _idGenObjectAttribute-2" src="image/1.png"/>	</div>	<div class="Enkel-textram" id="_idContainer467">	<div style="width:5782.68px;height:589.61px;position:absolute;top:0px;left:0px;-webkit-transform-origin: 0% 0%; -webkit-transform: translate(0px,1px) rotate(0deg) scale(0.05);transform-origin: 0% 0%; transform: translate(0px,1px) rotate(0deg) scale(0.05);">	<p class="Allm-nt-styckeformat ParaOverride-1"><span class="CharOverride-15" id="_idTextSpan32802" style="position:absolute;top:146.54px;left:5516.68px;letter-spacing:-0.63px;">147</span></p>	</div>	</div>	<div id="_idContainer468">	<div style="width:5782.68px;height:9070.87px;position:absolute;top:0px;left:0px;-webkit-transform-origin: 0% 0%; -webkit-transform: translate(0px,1px) rotate(0deg) scale(0.05);transform-origin: 0% 0%; transform: translate(0px,1px) rotate(0deg) scale(0.05);">	<p class="Kapitelnummer ParaOverride-1"><span class="CharOverride-16" id="_idTextSpan32803" style="position:absolute;top:608.94px;left:2380.64px;letter-spacing:0.53px;">KEPITEL 6</span></p>	<p class="Kapitelrubrik ParaOverride-1"><span class="CharOverride-17" id="_idTextSpan32804" style="position:absolute;top:1146.1px;left:1647.97px;letter-spacing:-1.61px;">Hoor </span><span class="CharOverride-17" id="_idTextSpan32805" style="position:absolute;top:1146.1px;left:2433.83px;letter-spacing:-1.3px;">möter </span><span class="CharOverride-17" id="_idTextSpan32806" style="position:absolute;top:1146.1px;left:3651.52px;letter-spacing:-2.8px;">doo</span><span class="CharOverride-17" id="_idTextSpan32807" style="position:absolute;top:1606.1px;left:1239.79px;letter-spacing:-3.86px;">oomfärldens </span><span class="CharOverride-17" id="_idTextSpan32808" style="position:absolute;top:1606.1px;left:3504.02px;letter-spacing:-2.54px;">kref?</span></p>	<p class="Underrubrik-kapitel ParaOverride-1"><span class="CharOverride-19" id="_idTextSpan32809" style="position:absolute;top:2214.14px;left:1514.99px;letter-spacing:0.68px;">Tre-a </span><span class="CharOverride-19" id="_idTextSpan32810" style="position:absolute;top:2214.14px;left:1870.41px;letter-spacing:5.58px;">sätt </span><span class="CharOverride-19" id="_idTextSpan32811" style="position:absolute;top:2214.14px;left:2287.82px;letter-spacing:5.34px;">itt </span><span class="CharOverride-19" id="_idTextSpan32812" style="position:absolute;top:2214.14px;left:2608.28px;letter-spacing:5.12px;">hoontera </span><span class="CharOverride-19" id="_idTextSpan32813" style="position:absolute;top:2214.14px;left:3388.53px;letter-spacing:5.27px;">ferdegee-a</span></p>	<p class="noindent ParaOverride-1"><span class="CharOverride-11" id="_idTextSpan32814" style="position:absolute;top:3420.12px;left:0px;letter-spacing:-0.5px;">Kommer </span><span class="CharOverride-11" id="_idTextSpan32815" style="position:absolute;top:3420.12px;left:839.93px;letter-spacing:-0.39px;">doo </span><span class="CharOverride-11" id="_idTextSpan32816" style="position:absolute;top:3420.12px;left:1122.98px;letter-spacing:-0.47px;">ihåg </span><span class="CharOverride-11" id="_idTextSpan32817" style="position:absolute;top:3420.12px;left:1556.48px;letter-spacing:-0.5px;">testet </span><span class="CharOverride-11" id="_idTextSpan32818" style="position:absolute;top:
Code
#_idContainer002 {	-webkit-transform:translate(-14.174px,-64.257px) rotate(0.000deg) skew(0.000deg) scale(1.000,1.000);	-webkit-transform-origin:0% 0%;	height:793.47px;	left:0px;	position:absolute;	top:0px;	transform:translate(-14.174px,-64.257px) rotate(0.000deg) skew(0.000deg) scale(1.000,1.000);	transform-origin:0% 0%;	width:499.95px;
}
span.CharOverride-22 {	color:#ffffff;	font-family:"Circular Std Black", sans-serif;	font-size:220px;	font-style:normal;	font-weight:900;
}
div._idGenObjectStyleOverride-1 {	border-bottom-left-radius:12px;	border-bottom-right-radius:12px;	border-style:dotted;	border-top-left-radius:12px;	border-top-right-radius:12px;
}
The image is how Calibre shows the ebook. As a epub on my Kobo is shows words sprinkled about on the page. Absolutly worthless.

What monstrous program makes this?
Capture.PNG 
Reply 

#2  JSWolf 09-17-2020, 11:58 AM
That is a fixed layout ePub. Change the file extention to .kepub.epub and load it on your Forma and it may work.

Converting to PDF won't work.
Reply 

#3  jackie_w 09-17-2020, 12:18 PM
I think I read somewhere that Kobos expect fixed layout epubs to be named sometitle.fxl.kepub.epub
Reply 

#4  DNSB 09-17-2020, 12:21 PM
Quote jackie_w
I think I read somewhere that Kobos expect fixed layout epubs to be named sometitle.fxl.kepub.epub
Correct.

From the Kobolabs Epub Spec:

Quote
eInk

Connect the device to your computer via USB.
Find the drive on your computer in Finder or Windows Explorer.
Drag your EPUB onto the device. To trigger the Kobo WebKit, change the file extension to “.kepub.epub”. To trigger the Kobo WebKit for a Fixed Layout title, change the extension to “.fxl.kepub.epub”. (If the extension is left unchanged it will render using the Adobe Digital Editions WebKit. This is the default display engine for sideloaded content to enable bookmarking, searching and highlighting.)
Disconnect your device. The file will automatically appear in your library.

Sideloaded EPUBs with the ".fxl.kepub.epub" or ".kepub.epub" will disable bookmarking and note keeping. Thumbnails for covers may not display. Otherwise the reading experience and content display will be identical to how the file would display when loaded through the store. Leaving the extension as ".epub" will enable bookmarking and note keeping and will trigger the ADE display engine.
Reply 

#5  patrik 09-17-2020, 12:23 PM
Yes, as a kepub it's readable on Kobo.

I would like to convert it to a flowable epub, that's why I thought it may be easier to go via pdf and Finereader, but I may try to play around with regex and see what happens.
Reply 

#6  patrik 09-17-2020, 12:30 PM
When I renamed the file to xxx.fxl.kepub.epub it only shows the upper left quadrant of every page. (This was from the kepub-file, maybe it's different from the original epub?)
Reply 

#7  DNSB 09-17-2020, 12:31 PM
Quote patrik
Yes, as a kepub it's readable on Kobo.

I would like to convert it to a flowable epub, that's why I thought it may be easier to go via pdf and Finereader, but I may try to play around with regex and see what happens.
Converting a fixed layout epub to reflowable is "fun". Good luck.
Reply 

#8  najgori 09-17-2020, 01:28 PM
Quote patrik
When I renamed the file to xxx.fxl.kepub.epub it only shows the upper left quadrant of every page. (This was from the kepub-file, maybe it's different from the original epub?)
Who in Sweden sells books like this?*
Can you convert it to unicode text and just put some tags around headings?

*I visit relatives in Sweden at least once a year (before Corona) for 5 days or a week.
Reply 

#9  JSWolf 09-18-2020, 09:54 AM
To keep your sanity, don't try to convert it to reflowable ePub. It's going to be a nightmare at best.
Reply 

#10  Hitch 09-22-2020, 09:07 AM
Quote patrik
Yes, as a kepub it's readable on Kobo.

I would like to convert it to a flowable epub, that's why I thought it may be easier to go via pdf and Finereader, but I may try to play around with regex and see what happens.
Lotsa luck. To be as blunt as I can, that's a job that my company will simply decline. It's 10-20x as much work, to "convert" FXL to reflowable, as it would be to make the entire thing from a damn PDF, (not Word, not InDesign) in the first place. It's...it's an horrific amount of work.

Hitch
Reply 

  Next »  Last »  (1/3)
Today's Posts | Search this Thread | Login | Register