Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 12-18-2015, 07:35 PM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Java504 and odt

Hi

I get a conversion mistake (Java 504) when I try to convert to EPUB an odt file which has an image with an out-of-range (or to say it better an unexisting path) src attribute. Once you know it, it's easy to solve. But it's really, reallly not easy to spot.

Calibre does not bother with such trifles and converts straightaway. Other converters don't.

The problem I'm facing is that LibreOffice does not offer you the possibility to check the src attribute of the images within the odt file.

Suppose you have a very big odt file with about 100 images: how can you check (and correct if need be) quickly the src attributes of these images ?

Last edited by roger64; 12-18-2015 at 07:52 PM. Reason: Improving typo
roger64 is offline   Reply With Quote
Old 12-18-2015, 09:04 PM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,329
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
If the problem is the path to a common folder, then you can just use search and replace:

search: "../oldpics/" (or whatever the wrong information is)
replace: "../Images/" (or whatever the new/correct info is)
Turtle91 is offline   Reply With Quote
Advert
Old 12-18-2015, 11:02 PM   #3
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
by the way I am a Linux user.

Thanks for your proposal, however I have no idea which could be the name of the external folder.

Is there not a practical way to list all the src attributes contained in an odt file? (with their content)
roger64 is offline   Reply With Quote
Old 12-19-2015, 04:27 AM   #4
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,700
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by roger64 View Post
Is there not a practical way to list all the src attributes contained in an odt file? (with their content)
Why don't you save the .odt file as a filtered .html file, add it to a new e book in Sigil or Calibre Editor and then validate it?
This should flag missing files.
Doitsu is offline   Reply With Quote
Old 12-19-2015, 05:31 AM   #5
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Indeed, I also can use my usual converter to save in html5 (with images in a separate folder) and then use Calibre to create an EPUB. I did try it. But then, as the EPUB is not exactly built up to my taste, I still have a lot of customisation to add (not only fonts).

I manually found the solution for this book (after some splitting). One image (out of 35) had a faulty src, a leftover from the "original" scanned html. But a preview of the src tags would have saved me the day and I would appreciate to have it handy for the next time.

I find strange that there seems to be not obvious solution for this kind of search. A parser of some kind?

Last edited by roger64; 12-19-2015 at 05:34 AM.
roger64 is offline   Reply With Quote
Advert
Old 12-22-2015, 07:47 PM   #6
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,624
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
Hi

I correct my previous message since I have the answer by now.

To find the culprit, I had to unzip the odt file and open the content.xml file. It's not about any unexisting src tags as I -wrongly- supposed. What was wrong was the definition of a text paragraph in the xml file (including unholy arguments like font-weight-asian and font-weight-complex) which was a left-over from the scan.

To solve the bug I just had to change the paragraph style in the odt.
roger64 is offline   Reply With Quote
Old 12-31-2015, 10:47 AM   #7
crankypants
Hmm.
crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.crankypants ought to be getting tired of karma fortunes by now.
 
Posts: 124
Karma: 2016606
Join Date: Oct 2015
Device: Android 4.2 Google Play Reader
Quote:
Originally Posted by roger64 View Post
Hi

Suppose you have a very big odt file with about 100 images: how can you check (and correct if need be) quickly the src attributes of these images ?
If this converts to an XHTML file inside the EPUB that is too big people may not be able to read this EPUB on certain ereaders with limited memory. Usually, each chapter should be under 300kb in length. I assume that means including images.
crankypants is offline   Reply With Quote
Old 01-02-2016, 12:11 PM   #8
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by crankypants View Post
If this converts to an XHTML file inside the EPUB that is too big people may not be able to read this EPUB on certain ereaders with limited memory. Usually, each chapter should be under 300kb in length. I assume that means including images.
Images are not included in the size.

Dale
DaleDe is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ODT output KarelAuthor Conversion 0 05-02-2013 08:11 AM
Loading an ODT document RossK Calibre 1 07-11-2012 01:42 AM
The problem of ODT in ePub Linwood Calibre 0 08-24-2010 09:08 AM
ODT Files? ThomasMcKean Astak EZReader 2 02-26-2010 08:01 PM
.odt 2 .epub renareto Calibre 4 02-11-2010 03:26 PM


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


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