View Full Version : TIP: Attention: All Book Designer users creating .IMP books...


nrapallo
02-15-2008, 01:47 AM
First, thank-you for supporting this "end" format, especially if you don't own the ebookwise 1150.

I just discovered a fix (tip/trick) that will greatly enhance the enjoyment of the ebookwise (.IMP) community: A WAY TO CHANGE TO A LARGER FONT SIZE.

Any .IMP ebook created with Book Designer uses only 'x-small' font for the main text, but not because it is explicitly forced to by BD.

The story goes like this ...

I was tinkering with BD recently and noticed that in the imp directory (in the default install directory) while it is making the ebook, it saves an intermediary/temporary file ending with .oeb. I was fast enough to grab this file and discovered that NO FONT SIZE was being used. I opened and unpacked the .oeb in eBook Publisher and produced a .IMP ebook that had a larger font size than the one BD produced. Hmmm...

I knew that recent versions of eBook Publisher adopted the 'small' font size as its default; whereas, the BD used 'x-small' font size as its default. But BD doesn't set this default, so it must come from the 'PubUtil21.dll' (version 2.1.4.5) in the BD install directory.

The eBook Publisher uses two similar files, namely 'PubUtil21.dll' (version 2.1.4.6) and 'PubUtil22.dll' (version 2.2.4.1) located in the directory C:\Program Files\Common Files\eBook Technologies . First, I tried just replacing the BD 'PubUtil21.dll' with the same (but newer version) .dll, but it didn't adopt the 'small' font size. Second, I renamed the 'PubUtil22.dll' to 'PubUtil21.dll' and replaced the BD one with that one. Eureka! BD can now produce .IMP ebooks with a (one size) larger font with this fix.

FIX #1: Below I include this renamed 'PubUtil21.dll' (really 'PubUtil22.dll' version 2.2.4.1) that needs to be placed in the BD directory, overwriting the older one. Just unzip it there and you have installed this fix!

As my test sample, I used Patricia's ebook, (Pseudo)Aristotle_ The Works.prc. I attach the temporary .oeb file and the .imp version produced by BD before this 'fix' and after.

Judge for yourself. Which book would you rather read?

This 'fix' may have to be applied again when BD is updated/re-installed, but it is a small price to pay.

Enjoy!

EDIT 20 Feb 2008: for TIP #2: BD now allows true margins in resulting .IMP files... see post #6 (http://www.mobileread.com/forums/showpost.php?p=149882&postcount=6) below

-Nick

DaleDe
02-15-2008, 11:16 AM
Fantastic fix. Thanks for finding it.

Dale

DaleDe
02-15-2008, 12:03 PM
Fantastic fix. Thanks for finding it.

Dale

Please add the tip to the Best Practice section of the wiki for Book Designer. This will help people find it later.

http://wiki.mobileread.com/wiki/Book_Designer

If you need help in doing this let me know.

Dale

JSWolf
02-15-2008, 12:32 PM
Just stuck the thread for easier finding and I'll make the fix before I make any more IMP eBooks.

nrapallo
02-15-2008, 12:41 PM
Has anyone independently tried this fix and made it work as advertised?

Just wanted to know as I don't use BD to make ebooks and tried this on only one test sample.
If there are any issues, please post here.

-Nick

nrapallo
02-15-2008, 03:37 PM
Now, another fix (tip/trick) for those who labouriously churn out these .IMP books for all to benefit...

My three biggest gripes with BD are (were :)):

1. default font size too small for enjoyable reading (FIXED see 1st Tip above)
2. Unlike other formats, no margins come out in the resulting .IMP books (FIXED here with Tip #2)
3. Black & white (1-bit) images despite the fact that the EBW 1150 can display 16 5grayscale (4-bit) images and REB 1200 can display 32,768 (15-bit) colour images (Still working on this one...)

FIX #2: All you need is a text editor and to follow these steps:

1. Ensure you have checked the 'load last book at startup' in Configuration/Settings/program settings menu item for this to work better.
2. Finish your ebook, save it and exit BD.
3. Now with your text editor, open the .html0 file in the 'LastFile' directory (in the BD install directory).
4. Just AFTER the <BODY ...> tag, insert the following: <span style="margin-left: 2%; margin-right: 2%;"> and save the .html0. You can change the % to suit your own preferences (including 0%, but that would be pointless).
5. Restart BD, have it load the last book you were just working with (and inserted that <span ...> line) and 'make ebook' as usual.

Viola, hello margins!

Anyone want to add any other previously unavailable fixes in the <span ...>?

-Nick

p.s. I first tried to place the 'margin-left/right' settings in the <BODY ... > tag as I usually do, but I noticed that BD strips out the <HTML> to <BODY> tags inclusive, when creating that .oeb temporary file. Oh well the above works just as good!

DaleDe
02-16-2008, 10:20 PM
Please add the tip to the Best Practice section of the wiki for Book Designer. This will help people find it later.

http://wiki.mobileread.com/wiki/Book_Designer

If you need help in doing this let me know.

Dale

I updated the wiki with this and other data on making IMP files.

Dale

JSWolf
02-16-2008, 10:28 PM
Question, what is a good set of margins?

As I prefer no margins with my 505, I'd prefer no margins with whatever eBook reader I had.

nrapallo
02-16-2008, 11:21 PM
I updated the wiki with this and other data on making IMP files.

Dale

Thanks Dale for doing this!

Nice and compact, unlike some of my posts. :D

-Nick

nrapallo
02-16-2008, 11:46 PM
Question, what is a good set of margins?

As I prefer no margins with my 505, I'd prefer no margins with whatever eBook reader I had.

I will add a switch '--nomargins' to mobi2imp.exe (version 5) to accomodate this preference.

Sometimes on the REB 1200, when I use no margins, text can bleed into the side of the screen. I, personally, don't find this visually appealing, so I prefer at least a small margin, say 2% (of the screen width). On the REB 1200 with screen size of 480x680, this results in 9 to 10 pixels or 1 character on each side.

In addition to the default 2% left and right margins, I will probably add the just the following margins settings (switches) to mobi2imp:

--nomargins = 0% left and right margins
--largemargins = 5% left and right margins
--hugemargins = 8% left and right margins

I feel it is best to deal with margins in terms percentages (%) so to accomodate varying screen size proportionally.

Any other thoughts?

-Nick

DaleDe
02-17-2008, 12:24 AM
I will add a switch '--nomargins' to mobi2imp.exe (version 5) to accomodate this preference.

Sometimes on the REB 1200, when I use no margins, text can bleed into the side of the screen. I, personally, don't find this visually appealing, so I prefer at least a small margin, say 2% (of the screen width). On the REB 1200 with screen size of 480x680, this results in 9 to 10 pixels or 1 character on each side.

In addition to the default 2% left and right margins, I will probably add the just the following margins settings (switches) to mobi2imp:

--nomargins = 0% left and right margins
--largemargins = 5% left and right margins
--hugemargins = 8% left and right margins

I feel it is best to deal with margins in terms percentages (%) so to accomodate varying screen size proportionally.

Any other thoughts?

-Nick

For my eb1150 I usually set 2 pixels margin for the same bleeding problem. Certain letters push into the right margin, particularly with justified text (due to fixed kerning) and a little margin on the left side provides just enough distance to be comfortable to read. I usually set fixed pixels in this case because the amount needed does not change with zoom factors. It is just fonts at the edge. Otherwise I want the maximum width possible.

Dale

DaleDe
02-17-2008, 12:29 AM
Thanks Dale for doing this!

Nice and compact, unlike some of my posts. :D

-Nick

By the way you don't need to shutdown BookDesigner before editing the text as there is a reload function on the file menu. I left it your way for now but will probably change it.

You asked what else a user might want to change, people with vision problem might want to set the default text even larger. Medium/X-Large is a big as you can go. (XX-Large is no bigger). I occasionally do other things but I am not sure they will be accepted by BD. Got to experiment a bit one of these days.

Dale

nrapallo
02-17-2008, 01:47 AM
By the way you don't need to shutdown BookDesigner before editing the text as there is a reload function on the file menu. I left it your way for now but will probably change it.

You asked what else a user might want to change, people with vision problem might want to set the default text even larger. Medium/X-Large is a big as you can go. (XX-Large is no bigger). I occasionally do other things but I am not sure they will be accepted by BD. Got to experiment a bit one of these days.

Dale

I couldn't make the 'reload book' shortcut work. How did you do this exactly? I like your way better.

By the way, I just finished version 5 of mobi2imp and will post it shortly. Now that I am able to compile it into a windows executable, I thought I should allow more options to be selected as switches on the command-line.

In line with your request, I now allow you to change the text one font size larger ('medium') and one font size smaller (back to 'x-small'). Also, per JSWolf's request, you can now change margins from the default (2%) to largemargins (5%), hugemargins (8%) and even nomargins (0%)! In addition, you can change the default text-align from justify to nojustify (left aligned).

Oh yeah, I saw Kovidgoyal's recent post about 'mobi2oeb' and realized that I had that code already in 'mobi2imp', but just commented out. I now allow the output to be 1150 .IMP, 1200 .IMP, 1100 .rb and .oeb (any and all at once!)

Any other thoughts?

-Nick

p.s. Next, I would like to implement 'lit2imp' and finish my batch convert of the Blackmask DVD v1 into all output formats listed above. Basically, this is 'zip2imp' (over 10,000 of them).

Also, I finally got PDFRead v1.7 to convert up to 65536 color for the REB 1200, but couldn't compile the python code error-free, so that too is on my list...

alvinj88
03-01-2008, 02:39 PM
I've been tinkering with magazine/comic book type pdfs for awhile, It would be awesome if there was a workable format for my REB1200. I found that Adobe 8.1
using the save as .doc feature is the best and fastest way to make .pdf to .doc
the problem I encountered was the .doc to imp using book designer. you guys have any good tips for converting? :chinscratch:

nrapallo
03-01-2008, 03:52 PM
I've been tinkering with magazine/comic book type pdfs for awhile, It would be awesome if there was a workable format for my REB1200. I found that Adobe 8.1
using the save as .doc feature is the best and fastest way to make .pdf to .doc
the problem I encountered was the .doc to imp using book designer. you guys have any good tips for converting? :chinscratch:

I usually save the output from Acrobat to a HTML v3.2 file and start from there converting to .IMP using eBook Publisher.

However, the best route I've found for reading magazine/technical type .pdfs on the REB 1200 is using PDFRead v1.7 (see Content forum sticky here (http://www.mobileread.com/forums/showthread.php?t=10558)). Unfortunately, until now, the output has been in 16 grayscale. :(

However, Ashish Kulkarni (author of PDFRead) had previously implemented 16 (4-bit) colors for the REB 1200 :thumbsup: and I had modified his code to allow 256 (8-bit) colors for the REB 1200 :2thumbsup. Any higher color depth would just increase the resulting .IMP file's size GREATLY without any corresponding betterment!

These modifications have not yet been finalized, but will be part of the next release, v1.8. I have been granted developer status by Ashish and intend on finalizing these changes soon ... :rolleyes:

p.s. by the way, I got my inspiration for my mobi2imp from Ashish's .IMP creating module (ImpOutput) in PDFRead and mobi2html in MobiPerl from tompe on mobileread.com.

rpresser
03-08-2008, 01:10 AM
Here's how to do running headers in IMP books, entirely with HTML:

1. Add this to the <STYLE> section in the <HEAD> element:


.header {display:none; display:oeb-page-head; margin-left:2.0em; margin-right:2.0em}
.headleft {height:3.0ex; vertical-align:top; text-align:left; font-family:smallfont}
.headright {height:3.0ex; vertical-align:top; text-align:right; font-family:smallfont}

2. Add this text on the page where you want the running header to start -- i.e., if you have a title page, put this after the <HR> that ends the title page:


<!-- Running Header -->
<table class="header" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td class="headleft">book title</td>
<td class="headright">book author</td>
</tr>
<tr>
<td colspan="2" height="10"><hr /></td>
</tr>
</table>


This is (almost) straight out of the Gemstar OEB Formatting guide. Note that you could do almost anything instead of this rather plain header. Any block-level element (table, div, P, etc.) that has the style display:oeb-page-head can be your running header.

Cool, huh?

My apologies if this is already well known. I just couldn't find it explicitly mentioned anywhere, and the mobi2imp thread explicitly says that running headers aren't implemented. Maybe it could be incorporated into the perl script?

nrapallo
03-08-2008, 11:50 AM
Here's how to do running headers in IMP books, entirely with HTML:
...
My apologies if this is already well known. I just couldn't find it explicitly mentioned anywhere, and the mobi2imp thread explicitly says that running headers aren't implemented. Maybe it could be incorporated into the perl script?

It is good to see example coding put into practical use. Thanks for sharing this.

The next release of mobi2imp should have this 'Running Headers' feature. I wanted to lessen the impact of loosing that space at the top, so I devised a way to elimante the following <hr> and use color to differentiate the header from the text

I will implement in mobi2imp, this additional style:<style>
header {display:none; display:oeb-page-head; oeb-column-number:1}
</style>

Then will place this code after <body>, for the header to appear:<header>
<table border="0" cellspacing="0" width="100%">
<tr>
<td align="left" bgcolor="#B0C4DE" style="font-family:smallfont">PUT_TITLE_HERE</td>
<td align="right" bgcolor="#B0C4DE" style="font-family:smallfont">PUT_AUTHOR_HERE</td>
</tr>
</table>
</header>


Please note that by placing this AFTER <body>, the margin settings are inherited and properly displayed. The 'smallfont' use may be optional.

It adds a bit of color (grayscale for 1150 owners :)).

By the way, bgcolor="#B0C4DE" is LightSteelBlue, but I also like, bgcolor="#FFDAB9" (PeachPuff) and bgcolor="#F5DEB3" (Wheat) as being non-obtrusive.

DaleDe
03-08-2008, 02:00 PM
It is good to see example coding put into practical use. Thanks for sharing this.

The next release of mobi2imp should have this 'Running Headers' feature. I wanted to lessen the impact of loosing that space at the top, so I devised a way to elimante the following <hr> and use color to differentiate the header from the text

I will implement in mobi2imp, this additional style:<style>
header {display:none; display:oeb-page-head; oeb-column-number:1}
</style>

Then will place this code after <body>, for the header to appear:<header>
<table border="0" cellspacing="0" width="100%">
<tr>
<td align="left" bgcolor="#B0C4DE" style="font-family:smallfont">PUT_TITLE_HERE</td>
<td align="right" bgcolor="#B0C4DE" style="font-family:smallfont">PUT_AUTHOR_HERE</td>
</tr>
</table>
</header>


Please note that by placing this AFTER <body>, the margin settings are inherited and properly displayed. The 'smallfont' use may be optional.

It adds a bit of color (grayscale for 1150 owners :)).

By the way, bgcolor="#B0C4DE" is LightSteelBlue, but I also like, bgcolor="#FFDAB9" (PeachPuff) and bgcolor="#F5DEB3" (Wheat) as being non-obtrusive.

I hope this will be an option. I prefer the extra screen real estate for text.

Dale

nrapallo
03-08-2008, 05:24 PM
I hope this will be an option. I prefer the extra screen real estate for text.

Dale

As do I. Yes, it will be an option.

I wrestled with incorporating this in mobi2imp, because, personally I think its cute, but wears on you. I know it serves a purpose, so I will be adding this ability to the next release of mobi2imp.

p.s. On a related note, I was so happy when I found out that the running headers used by GEBLibrarian could be turned off with a registry change.

DaleDe
03-08-2008, 07:32 PM
As do I. Yes, it will be an option.

I wrestled with incorporating this in mobi2imp, because, personally I think its cute, but wears on you. I know it serves a purpose, so I will be adding this ability to the next release of mobi2imp.

p.s. On a related note, I was so happy when I found out that the running headers used by GEBLibrarian could be turned off with a registry change.

Yea, I noticed that in the wiki where you added it. Great find. When I want running headers I want more than a static entry such as chapter titles. It can also be done but it requires some manual intervention.

Dale