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

Go Back   MobileRead Forums > E-Book Readers > PocketBook > PocketBook Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-01-2015, 01:22 PM   #1
Skeeve
Connoisseur
Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.
 
Skeeve's Avatar
 
Posts: 83
Karma: 666666
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
text formats supporting TOC and tables?

Hi!

While epub supports TOC and tables, I can't use this format for my purpose as it requires ZIP to create it. As there is just unzip and no zip on the PocketBook, my application can't create epub.

Is there any ebook format, supported by the pocketbook which can display (and format) tables and supports a ToC?
Skeeve is offline   Reply With Quote
Old 03-01-2015, 01:32 PM   #2
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 1,936
Karma: 5903044
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840
If it helps, you can get zip for your PocketBook from here: http://www3.telus.net/rkomar/zip/
rkomar is offline   Reply With Quote
 
Advertisement
Old 03-01-2015, 02:03 PM   #3
Skeeve
Connoisseur
Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.
 
Skeeve's Avatar
 
Posts: 83
Karma: 666666
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
Thanks for that. But then I would need to provide the zip binary together with my "app".

So if there's a format not requiring zip, I'd prefer that.
Skeeve is offline   Reply With Quote
Old 03-01-2015, 02:29 PM   #4
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 1,936
Karma: 5903044
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840
What about straight HTML then? fbreader.app will display those. I believe that the other formats are stored in binary files, and would need some other program to generate them.
rkomar is offline   Reply With Quote
Old 03-01-2015, 03:12 PM   #5
Skeeve
Connoisseur
Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.
 
Skeeve's Avatar
 
Posts: 83
Karma: 666666
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
I tried HTML but unfortunately it wasn't displayed as intended. All the CSS was ignored. Maybe I did something wrong - not sure.

Code:
 <?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <title>Sudoku Statistik</title>
    <style type="text/css">
    	h1.inhalt  {page-break-before: avoid; }
    	h1 { page-break-before: allways; }
    	table { 	border-collapse: collapse;; }
    	td { width: 1.5em; height: 1.5em; text-align: center; 	vertical-align: middle; }
    	td { border: 0.1em solid; }
    	td.t { border-top: 0.2em solid; }
    	td.r { border-right: 0.2em solid; }
    	td.b { border-bottom: 0.2em solid; }
    	td.l { border-left: 0.2em solid; }
    </style>
  </head>
  <body>
  	<a id="Inhalt:">Inhalt</a>
    <ul>
    	<li><a href="#Mag 2013 Heft_19 4_Extreme">Mag 2013 Heft_19 4_Extreme</a></li>
    	<li><a href="#Mag 2013 Heft_22 3_Hard">Mag 2013 Heft_22 3_Hard</a></li>
    </ul>
    <h1><a id="Mag 2013 Heft_19 4_Extreme">Mag 2013 Heft_19 4_Extreme</a></h1>
    <table><caption><a href="#Inhalt:">Zurück zum Inhalt</a></caption>
			<tr><td class="t l">3</td><td class="t  "> </td><td class="t r"> </td><td class="t l"> </td><td class="t  "> </td><td class="t r"> </td><td class="t l"> </td><td class="t  "> </td><td class="t r">7</td></tr>
			<tr><td class="  l"> </td><td class="   ">2</td><td class="  r"> </td><td class="  l">8</td><td class="   "> </td><td class="  r">1</td><td class="  l"> </td><td class="   ">9</td><td class="  r"> </td></tr>
			<tr><td class="b l"> </td><td class="b  "> </td><td class="b r">1</td><td class="b l"> </td><td class="b  "> </td><td class="b r"> </td><td class="b l">5</td><td class="b  "> </td><td class="b r"> </td></tr>
			<tr><td class="t l"> </td><td class="t  ">7</td><td class="t r"> </td><td class="t l">4</td><td class="t  ">6</td><td class="t r">5</td><td class="t l"> </td><td class="t  ">2</td><td class="t r"> </td></tr>
			<tr><td class="  l"> </td><td class="   "> </td><td class="  r"> </td><td class="  l">7</td><td class="   "> </td><td class="  r">3</td><td class="  l"> </td><td class="   "> </td><td class="  r"> </td></tr>
			<tr><td class="b l"> </td><td class="b  ">3</td><td class="b r"> </td><td class="b l">1</td><td class="b  ">9</td><td class="b r">8</td><td class="b l"> </td><td class="b  ">6</td><td class="b r"> </td></tr>
			<tr><td class="t l"> </td><td class="t  "> </td><td class="t r">6</td><td class="t l"> </td><td class="t  "> </td><td class="t r"> </td><td class="t l">3</td><td class="t  "> </td><td class="t r"> </td></tr>
			<tr><td class="  l"> </td><td class="   ">4</td><td class="  r"> </td><td class="  l">6</td><td class="   "> </td><td class="  r">2</td><td class="  l"> </td><td class="   ">7</td><td class="  r"> </td></tr>
			<tr><td class="b l">1</td><td class="b  "> </td><td class="b r"> </td><td class="b l"> </td><td class="b  "> </td><td class="b r"> </td><td class="b l"> </td><td class="b  "> </td><td class="b r">2</td></tr>
		</table>
    <h1><a id="Mag 2013 Heft_22 3_Hard">Mag 2013 Heft_22 3_Hard</a></h1>
    <table><caption><a href="#Inhalt:">Zurück zum Inhalt</a></caption>
			<tr><td class="t l">3</td><td class="t  "> </td><td class="t r"> </td><td class="t l"> </td><td class="t  "> </td><td class="t r"> </td><td class="t l"> </td><td class="t  "> </td><td class="t r">8</td></tr>
			<tr><td class="  l"> </td><td class="   "> </td><td class="  r">4</td><td class="  l">8</td><td class="   "> </td><td class="  r">2</td><td class="  l">1</td><td class="   "> </td><td class="  r"> </td></tr>
			<tr><td class="b l"> </td><td class="b  "> </td><td class="b r">5</td><td class="b l"> </td><td class="b  ">1</td><td class="b r"> </td><td class="b l">7</td><td class="b  "> </td><td class="b r"> </td></tr>
			<tr><td class="t l"> </td><td class="t  "> </td><td class="t r">2</td><td class="t l">6</td><td class="t  "> </td><td class="t r">9</td><td class="t l">4</td><td class="t  "> </td><td class="t r"> </td></tr>
			<tr><td class="  l">1</td><td class="   "> </td><td class="  r"> </td><td class="  l"> </td><td class="   "> </td><td class="  r"> </td><td class="  l"> </td><td class="   "> </td><td class="  r">6</td></tr>
			<tr><td class="b l"> </td><td class="b  "> </td><td class="b r">6</td><td class="b l">1</td><td class="b  "> </td><td class="b r">3</td><td class="b l">8</td><td class="b  "> </td><td class="b r"> </td></tr>
			<tr><td class="t l"> </td><td class="t  "> </td><td class="t r">7</td><td class="t l"> </td><td class="t  ">4</td><td class="t r"> </td><td class="t l">9</td><td class="t  "> </td><td class="t r"> </td></tr>
			<tr><td class="  l"> </td><td class="   "> </td><td class="  r">1</td><td class="  l">2</td><td class="   "> </td><td class="  r">8</td><td class="  l">6</td><td class="   "> </td><td class="  r"> </td></tr>
			<tr><td class="b l">5</td><td class="b  "> </td><td class="b r"> </td><td class="b l"> </td><td class="b  "> </td><td class="b r"> </td><td class="b l"> </td><td class="b  "> </td><td class="b r">1</td></tr>
		</table>
  </body>
</html>
Skeeve is offline   Reply With Quote
Old 03-01-2015, 04:10 PM   #6
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 1,936
Karma: 5903044
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840
I guess fbreader doesn't handle the HTML very well. I tried displaying your HTML in the browser on the device, and it seemed to look okay to me. I used the "Open with..." dialog in the library, and chose the browser from the list rather than fbreader. Perhaps you could launch the browser yourself from a script.
rkomar is offline   Reply With Quote
Old 03-03-2015, 05:44 AM   #7
brucelee
Zealot
brucelee has learned how to read e-booksbrucelee has learned how to read e-booksbrucelee has learned how to read e-booksbrucelee has learned how to read e-booksbrucelee has learned how to read e-booksbrucelee has learned how to read e-booksbrucelee has learned how to read e-books
 
Posts: 115
Karma: 898
Join Date: Jan 2015
Location: Romania
Device: PB626
If you're compiling your app you could use libzip.
You can get rkomar's prebuilt libraries from here: http://www3.telus.net/rkomar/pbimageviewer/libs/
brucelee is offline   Reply With Quote
Old 03-03-2015, 06:04 AM   #8
jbacelar
Interested in the matter
jbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud of
 
jbacelar's Avatar
 
Posts: 140
Karma: 27692
Join Date: Dec 2011
Location: Spain, south coast
Device: PocketBook 622
Quote:
Originally Posted by Skeeve View Post
Is there any ebook format, supported by the pocketbook which can display (and format) tables and supports a ToC?
Yes: fb2, with <section> and <table>
jbacelar is offline   Reply With Quote
Old 03-03-2015, 05:30 PM   #9
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 1,936
Karma: 5903044
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840
Quote:
Originally Posted by brucelee View Post
If you're compiling your app you could use libzip.
You can get rkomar's prebuilt libraries from here: http://www3.telus.net/rkomar/pbimageviewer/libs/
I can't believe I didn't think of that. It's good that someone else is on the ball.
rkomar is offline   Reply With Quote
Old 03-04-2015, 11:31 AM   #10
Skeeve
Connoisseur
Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.
 
Skeeve's Avatar
 
Posts: 83
Karma: 666666
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
Okay then:

Compiling - No. My "Application" is simply a shell script.

Browser - Tried it, but it's simply displaying unformatted text Looks completely broken.

fb2 - thought of that too but couldn't yet find a good explanation in a language I understand how to create a correct fb2 file.
Skeeve is offline   Reply With Quote
Old 03-04-2015, 12:06 PM   #11
jbacelar
Interested in the matter
jbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud ofjbacelar has much to be proud of
 
jbacelar's Avatar
 
Posts: 140
Karma: 27692
Join Date: Dec 2011
Location: Spain, south coast
Device: PocketBook 622
For starters: http://wiki.mobileread.com/wiki/FB2

I attached an example that I found out there.

Note: You must remove the .txt to read on the PB, with FBReader or CoolReader.
Attached Files
File Type: txt Little Women. Stage 4.fb2.txt (561.3 KB, 10 views)
jbacelar is offline   Reply With Quote
Old 03-04-2015, 12:07 PM   #12
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 1,936
Karma: 5903044
Join Date: Oct 2010
Location: Vancouver, BC, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840
It worked for me if I stripped out the first two lines (so that the file starts with <html>), and then ran:

Code:
/ebrmain/bin/browser.app /mnt/ext1/t.html
where /mnt/ext1/t.html is the full path to the HTML file.
rkomar is offline   Reply With Quote
Old 03-04-2015, 01:04 PM   #13
Skeeve
Connoisseur
Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.Skeeve ought to be getting tired of karma fortunes by now.
 
Skeeve's Avatar
 
Posts: 83
Karma: 666666
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
I think I fixed the HTML by changing it to

Code:
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
P.S. Thanks for your help to both of you.
Skeeve is offline   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
Mobi - Text justification in Tables verydeepwater Kindle Formats 5 09-21-2014 05:22 PM
TOC links inside tables in epub don't translate in mobi wannabee Calibre 1 01-20-2011 01:13 AM
pocketbook 360...access epub toc and zoom tables? extendedping PocketBook 3 07-28-2010 12:18 PM
pocketbook 360...access epub toc and zoom tables? extendedping PocketBook 8 07-27-2010 01:47 PM
convert plain text to other formats ? Joebill Other formats 6 05-10-2010 11:10 PM


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


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