Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-17-2020, 11:46 AM   #1
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 682
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
Horrendous formatting...

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?
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	262
Size:	30.1 KB
ID:	182004  
patrik is offline   Reply With Quote
Old 09-17-2020, 11:58 AM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,428
Karma: 145491800
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
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.
JSWolf is offline   Reply With Quote
Old 09-17-2020, 12:18 PM   #3
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
I think I read somewhere that Kobos expect fixed layout epubs to be named sometitle.fxl.kepub.epub
jackie_w is offline   Reply With Quote
Old 09-17-2020, 12:21 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 45,367
Karma: 168808725
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by jackie_w View Post
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.
DNSB is offline   Reply With Quote
Old 09-17-2020, 12:23 PM   #5
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 682
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
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.
patrik is offline   Reply With Quote
Old 09-17-2020, 12:30 PM   #6
patrik
Guru
patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.patrik ought to be getting tired of karma fortunes by now.
 
Posts: 682
Karma: 4568205
Join Date: Jan 2010
Location: Sweden
Device: Kobo Forma
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?)
patrik is offline   Reply With Quote
Old 09-17-2020, 12:31 PM   #7
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 45,367
Karma: 168808725
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by patrik View Post
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.
DNSB is offline   Reply With Quote
Old 09-17-2020, 01:28 PM   #8
najgori
Klak
najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'najgori gives new meaning to the word 'superlative.'
 
najgori's Avatar
 
Posts: 174
Karma: 150374
Join Date: Sep 2011
Location: Belgrade, Serbia
Device: many
Quote:
Originally Posted by patrik View Post
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.
najgori is offline   Reply With Quote
Old 09-18-2020, 09:54 AM   #9
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,428
Karma: 145491800
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
To keep your sanity, don't try to convert it to reflowable ePub. It's going to be a nightmare at best.
JSWolf is offline   Reply With Quote
Old 09-22-2020, 09:07 AM   #10
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by patrik View Post
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
Hitch is offline   Reply With Quote
Old 09-22-2020, 10:47 AM   #11
Sarmat89
Fanatic
Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.
 
Posts: 515
Karma: 2268308
Join Date: Nov 2015
Device: none
It should be trivial to simplify the markup with a bit of regexes, as both the paragraph separation and whitespace is present. Locate important formatting like italics, and remove everything else.

Is the "KEPITEL 6" in your example a typo? Are there any OCR errors?
Sarmat89 is offline   Reply With Quote
Old 09-22-2020, 11:09 AM   #12
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Sarmat89 View Post
It should be trivial to simplify the markup with a bit of regexes, as both the paragraph separation and whitespace is present. Locate important formatting like italics, and remove everything else.

Is the "KEPITEL 6" in your example a typo? Are there any OCR errors?
Well, heck, there you go!

Sarmat can do that for you, easy-peasy.

Hitch
Hitch is offline   Reply With Quote
Old 09-22-2020, 11:41 AM   #13
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,428
Karma: 145491800
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Hitch View Post
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
With a reflowable ePub, can you copy/paste from the screen as plain text? I don't have a reflowable ePub to be able to check.
JSWolf is offline   Reply With Quote
Old 09-22-2020, 11:48 AM   #14
Sarmat89
Fanatic
Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.
 
Posts: 515
Karma: 2268308
Join Date: Nov 2015
Device: none
Quote:
Originally Posted by Hitch View Post
Well, heck, there you go!
Sure, sure, EPUBs are kuhplicated matter, and you need to give $$ to Hitch to do it correctly.
Sarmat89 is offline   Reply With Quote
Old 09-22-2020, 11:52 AM   #15
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Sarmat89 View Post
Sure, sure, EPUBs are kuhplicated matter, and you need to give $$ to Hitch to do it correctly.
No, no, but thanks. You said it would be trivial, so...why would anyone on earth pay MOI? Obviously, you have tricks and superpowers in regex that I don't know, so...I'm deferring, happily, to you! :-)

Hitch
Hitch is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[KOBO] Strip existing formatting to apply my own default formatting to all books digital_steve Calibre 2 08-10-2010 06:34 PM
Calibre and FORMATTING how to stop it altering my formatting? nerys Calibre 37 07-23-2010 02:35 AM


All times are GMT -4. The time now is 01:15 AM.


MobileRead.com is a privately owned, operated and funded community.