Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 09-17-2020, 12:46 PM   #1
patrik
Fanatic
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: 525
Karma: 277601
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:	93
Size:	30.1 KB
ID:	182004  
patrik is offline   Reply With Quote
Old 09-17-2020, 12:58 PM   #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: 60,353
Karma: 58876985
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, 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 online now   Reply With Quote
Advert
Old 09-17-2020, 01: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: 5,652
Karma: 14278244
Join Date: Sep 2009
Location: UK
Device: Kobo: H2O, GloHD, KA1, ClaraHD, Forma
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, 01: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: 8,892
Karma: 41038543
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, 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 online now   Reply With Quote
Old 09-17-2020, 01:23 PM   #5
patrik
Fanatic
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: 525
Karma: 277601
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
Advert
Old 09-17-2020, 01:30 PM   #6
patrik
Fanatic
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: 525
Karma: 277601
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, 01: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: 8,892
Karma: 41038543
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, 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 online now   Reply With Quote
Old 09-17-2020, 02: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, 10: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: 60,353
Karma: 58876985
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, 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 online now   Reply With Quote
Old 09-22-2020, 10: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: 8,790
Karma: 95022867
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 online now   Reply With Quote
Old 09-22-2020, 11:47 AM   #11
Sarmat89
Addict
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: 237
Karma: 2134102
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, 12:09 PM   #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: 8,790
Karma: 95022867
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 online now   Reply With Quote
Old 09-22-2020, 12:41 PM   #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: 60,353
Karma: 58876985
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, PRS-650, PRS-T1, nook STR, iPad 4, iPhone SE 2020, 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 online now   Reply With Quote
Old 09-22-2020, 12:48 PM   #14
Sarmat89
Addict
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: 237
Karma: 2134102
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, 12:52 PM   #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: 8,790
Karma: 95022867
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 online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:34 PM
Calibre and FORMATTING how to stop it altering my formatting? nerys Calibre 37 07-23-2010 03:35 AM


All times are GMT -4. The time now is 07:05 PM.


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