View Full Version : Illustrations in mobipocket


andym
09-17-2007, 07:05 PM
I hope this is helpful. A couple of people recently have uploaded prc format books with illustrations. Unfortunately the illustrations are very small (at least on a 600x480 PDA - I guess on a low resolution device they'd be fine).

I don't know whether this is a quirk of BookDesigner (and maybe the illustrations look fine in BBeB), but there is a useful page in the mobipocket content development reference pages (http://www.mobipocket.com/dev/article.asp?BaseFolder=prcgen&File=images.htm).

It's worth checking out the page itself, but the nub is that you can create links to 3 different versions of the image and mobipocket will pick the right one for the screen resolution of the user device. An example of the HTML to do this is:

<img hisrc="cover480x640.gif" src="cover220x300.gif" losrc="cover140x140.gif"/>

As I say - I hope this is useful.

RWood
09-17-2007, 07:20 PM
Thanks for the reference andym. We are always looking for ways to make our ebooks better.

The method most of us who post for both the Sony Reader and in Mobi/PRC format use is to develop the basic book in BookDesigner and then generate both LRF and PRC files from of same text. Several other older formats are also available but there is not a great demand for those formats at the moment within the MobileRead community.

After experimenting with the multiple options available in BookDesigner for PRC files, we all use the same settings to ensure a consistent product; among these settings is "Keep picture sizes." This is set to ensure that there is not automatic scaling or rotation of the images included in the source file. Is it the best for every device, no. Is it the best we can do now, yes.

vvv, the designer and programmer of BookDesigner, has updating the PRC portion of the program on his list of action items. No date has been announced for the completion of that phase.

Perhaps as more migrate to libprs500 (as some have already done) and we discover other tools for creating MobiPocket books things will get better.

JSWolf
09-17-2007, 09:32 PM
It's not any better if we turn off keep picture sizes.

wallcraft
09-18-2007, 11:02 AM
Anyone know of a freely available example .prc file with multiple image sizes? Baen .prc files appear to only include the ~240 pixel size. This is also the case (I think) with JB Universe and Grantville Gazette (volumes 10-13) - both of which are heavily illustrated.

A possible work around for illustrated BookDesigner generated .prc files might be to produce two versions, one with ~240x240 pixel images and the other with ~400x400 (?) pixel images. This would not be necessary for standard e-books (e.g. those with at most just a cover illustration).

HarryT
09-18-2007, 12:02 PM
Perhaps as more migrate to libprs500 (as some have already done) and we discover other tools for creating MobiPocket books things will get better.

You've slightly lost me. "libprs500" is a tool specifically for creating Sony Reader books. How will people migrating to that help MobiPocket books?

HarryT
09-18-2007, 12:04 PM
A possible work around for illustrated BookDesigner generated .prc files might be to produce two versions, one with ~240x240 pixel images and the other with ~400x400 (?) pixel images. This would not be necessary for standard e-books (e.g. those with at most just a cover illustration).

Doesn't seem to make any difference, Jon. The "Dr Thorndyke" books I created, for example, have full page (400x600 pixels or so) illustrations which come out really small in the MobiPocket version, regardless of whether one checks the "keep picture size" box. Try it for yourself with a large picture and you'll see what I mean.

kovidgoyal
09-18-2007, 12:15 PM
You've slightly lost me. "libprs500" is a tool specifically for creating Sony Reader books. How will people migrating to that help MobiPocket books?

By keeping their original files in HTML and then using some other tool to convert the HTML to mobi (very likely a tool that supports far more features).

andym
09-18-2007, 04:22 PM
From what Harry says it sounds like this is a BookDesigner issue.

Is the basic input for BookDesigner very different from the input for mobipocket's BookCreator? Would it be possible, at least for books with illustrations, to pass the text/source over to someone who could produce the Mobipocket version (I'm very conscious that most of the people who upload books are Sony users who produce the prc version as good citizens).

JSWolf
09-18-2007, 11:58 PM
From what Harry says it sounds like this is a BookDesigner issue.

Is the basic input for BookDesigner very different from the input for mobipocket's BookCreator? Would it be possible, at least for books with illustrations, to pass the text/source over to someone who could produce the Mobipocket version (I'm very conscious that most of the people who upload books are Sony users who produce the prc version as good citizens).
Andy, do you have the MobiPocket Creator on your computer? If you do, PM with an email address and I'll pop out an HTML of Peter rabbit from Book Designer to see what you can do with it and how easy it is.

andym
09-19-2007, 03:54 AM
Andy, do you have the MobiPocket Creator on your computer? If you do, PM with an email address and I'll pop out an HTML of Peter rabbit from Book Designer to see what you can do with it and how easy it is.

Not yet (my Windows PC is in a box at the m,oment - long story but I'm hoping to have it up and running in the next couple of weeks). I'll PM you then. Thanks for the offer.

DaleDe
09-19-2007, 10:49 AM
Andy, do you have the MobiPocket Creator on your computer? If you do, PM with an email address and I'll pop out an HTML of Peter rabbit from Book Designer to see what you can do with it and how easy it is.

mobiPocket Creator is now a free download so there is no particular reason for everyone not to have it that needs it. It used to be that you had to buy it but this is no longer the case which I think was a smart move for the MobiPocket company. It does have a small learning curve but is actually fairly easy to use so long as you remember to save all the cover image, toc, and other add ons (meta data) within the screen used to display them. Sometimes you have to scroll the screen to find the save button.

Dale

JSWolf
09-19-2007, 11:18 AM
mobiPocket Creator is now a free download so there is no particular reason for everyone not to have it that needs it. It used to be that you had to buy it but this is no longer the case which I think was a smart move for the MobiPocket company. It does have a small learning curve but is actually fairly easy to use so long as you remember to save all the cover image, toc, and other add ons (meta data) within the screen used to display them. Sometimes you have to scroll the screen to find the save button.

Dale
So does anyone here have MobiPocket Creator installed? I still want to test HTML saves from Book designer and see how they come out with little or no extra work.

DaleDe
09-19-2007, 11:24 AM
So does anyone here have MobiPocket Creator installed? I still want to test HTML saves from Book designer and see how they come out with little or no extra work.

I can give you a quick look. I do have it installed. I have the pc version installed of the Reader. I do not have a Sony reader so I cannot check that part. But for long term I suggest you install it yourself. It is not hard to install.

Dale

JSWolf
09-19-2007, 11:48 AM
I'm attaching Tom Corbett #1 since it does have a ToC and Peter Rabbit does not. It also have varying sizes of illustrations. It is saved as HTML from within Book Designer.

DaleDe
09-19-2007, 12:39 PM
I'm attaching Tom Corbett #1 since it does have a ToC and Peter Rabbit does not. It also have varying sizes of illustrations. It is saved as HTML from within Book Designer.
Got it. I will let you know the results.

Dale

JSWolf
09-19-2007, 12:44 PM
Got it. I will let you know the results.

Dale

Thanks! Hope it's going to be a load and save effort.

DaleDe
09-19-2007, 12:53 PM
I'm attaching Tom Corbett #1 since it does have a ToC and Peter Rabbit does not. It also have varying sizes of illustrations. It is saved as HTML from within Book Designer.
Got it. I will let you know the results.

Dale

DaleDe
09-19-2007, 01:12 PM
Here are the results.

I just ran it through without any editing. To make a real book I would add meta data and redo the TOC. The links all work in the book but mobipocket will fail to recognize it as a toc.

Metadata means fixing the title, author, genre, description of the book.

Dale

JSWolf
09-19-2007, 01:30 PM
Here are the results.

I just ran it through without any editing. To make a real book I would add meta data and redo the TOC. The links all work in the book but mobipocket will fail to recognize it as a toc.

Metadata means fixing the title, author, genre, description of the book.

Dale
So all you'd need do is redo the ToC, add in the medadata info and paginate right?

DaleDe
09-19-2007, 01:57 PM
So all you'd need do is redo the ToC, add in the medadata info and paginate right?

I have been studying the results. Did you want the pictures at the end of the chapter to actually be at the start of the chapter? If so then the links are wrong.

Did you want the chapters to start on new pages? If so this is not happening.

There is no paginate on MobiPocket. They paginate on the fly which is why they can't tell you how many pages are in the book. They only provide a progress bar based on the file size (I believe). Thus they have some problems with pagination if you jump around and then backup. This is a result of giving the user full control of the font sizes.

The TOC depends on tags to generate and it is usually best just to let it do it. It all depends on what you want the book to look like.

There is also an issue with the cover page. It needs special treatment to appear on the library page on a pc. So far none of the other mobipocket devices support images on the library listing but the pc does so it is likely the rest will get them at some point. It is best to select the coverpage image separately in creator. Thus it should be missing from the html.

The best bet is to remove the cover image and toc from the html and let the creator program build them. Then add the meta data and you are done. When I tried the result on my Palm (A Garmin device) it would display the images but when I tapped down it would reverse the image (black for white) and then a second tap would move to the next page. I am not sure what is causing this but it is likely a mobipocket bug. I'll try this on my Windows Mobile device and see what happens.

Dale

delphidb96
09-19-2007, 04:24 PM
According to their own Mobipocket Creator documentation, there is a page-break tag <mbp:pagebreak/>

Hope this helps.

Derek

I have been studying the results. Did you want the pictures at the end of the chapter to actually be at the start of the chapter? If so then the links are wrong.

Did you want the chapters to start on new pages? If so this is not happening.

There is no paginate on MobiPocket. They paginate on the fly which is why they can't tell you how many pages are in the book. They only provide a progress bar based on the file size (I believe). Thus they have some problems with pagination if you jump around and then backup. This is a result of giving the user full control of the font sizes.

The TOC depends on tags to generate and it is usually best just to let it do it. It all depends on what you want the book to look like.

There is also an issue with the cover page. It needs special treatment to appear on the library page on a pc. So far none of the other mobipocket devices support images on the library listing but the pc does so it is likely the rest will get them at some point. It is best to select the coverpage image separately in creator. Thus it should be missing from the html.

The best bet is to remove the cover image and toc from the html and let the creator program build them. Then add the meta data and you are done. When I tried the result on my Palm (A Garmin device) it would display the images but when I tapped down it would reverse the image (black for white) and then a second tap would move to the next page. I am not sure what is causing this but it is likely a mobipocket bug. I'll try this on my Windows Mobile device and see what happens.

Dale

andym
09-19-2007, 04:28 PM
Can i just make a geeky comment? I know I'm being an html snob, but the html produced by BookDesigner is truly truly horrible. It breaks just about all of the rules for writing valid html (no paragraph tags! no heading tags!).

I don't think this is entirely an issue of snobbery. Future ebook formats will be based on xhtml and while i suspect they will need to work with non-valid xhtml it's got to be an advantage to start with a properly marked-up reference source text as the basis.

OK flame me now.

andym
09-19-2007, 04:37 PM
According to their own Mobipocket Creator documentation, there is a page-break tag <mbp:pagebreak/>

Hope this helps.

Derek

In case anyone is confused:-

<mbp:pagebreak/>

Your version is more fun though.

The TOC depends on tags to generate and it is usually best just to let it do it. It all depends on what you want the book to look like

You would need to go through and replace

<A name=Page_15></A></DIV><HR>
<SPAN id=title><A name=BdToc_2>
<DIV align=center><FONT color=#001950><B>CHAPTER 2</B></FONT></DIV> </A>
</SPAN>

with

<h3>....</h3>

which should be relatively straightforward with a text editor that supports regular expressions.

delphidb96
09-19-2007, 05:11 PM
I've got a *bunch* of .txt files which have - for some silly reason - *SHORT* lines, maybe 40-45 characters before hitting a hard line-break. Is there a simple executable or a Word 2002 script which will take out all the excess line-breaks within a paragraph. Most of these files have two line-breaks between paragraphs.

I have, on my system Atlantis Word Processor and Word 2002 if anyone has a script for one of those.

Derek

DaleDe
09-19-2007, 05:29 PM
Can i just make a geeky comment? I know I'm being an html snob, but the html produced by BookDesigner is truly truly horrible. It breaks just about all of the rules for writing valid html (no paragraph tags! no heading tags!).

I don't think this is entirely an issue of snobbery. Future ebook formats will be based on xhtml and while i suspect they will need to work with non-valid xhtml it's got to be an advantage to start with a properly marked-up reference source text as the basis.

OK flame me now.

I believe you are correct. <DIV> is used a lot without a <p> tag which messes with lots of generation programs. I know I fed the results into
ebook publisher and it had to auto add a bunch of <p> tags.

Dale

DaleDe
09-19-2007, 05:37 PM
I've got a *bunch* of .txt files which have - for some silly reason - *SHORT* lines, maybe 40-45 characters before hitting a hard line-break. Is there a simple executable or a Word 2002 script which will take out all the excess line-breaks within a paragraph. Most of these files have two line-breaks between paragraphs.

I have, on my system Atlantis Word Processor and Word 2002 if anyone has a script for one of those.

Derek
http://www.simtel.net/product.php%5Burl_fb_product_page%5D76296
can be used to do this task. This is very common for many text files. The program is called e-Book Tidy.

Dale

DaleDe
09-19-2007, 05:51 PM
According to their own Mobipocket Creator documentation, there is a page-break tag <mbp:pagebreak/>

Hope this helps.

Derek

Yes, I am aware of the break page tag but you don't want to use it on every page thus I didn't think it applied to pagination. You will likely want to use it for chapter boundaries, hence my question to the original poster about chapters and images.

Dale

andym
09-19-2007, 06:14 PM
JSWolf

I hope it's helpful (I'm conscious that the end result is you may decide that producing prc versions is too much hassle!). I've done a quick reformat of your file - so that it should be possible to generate a TOC automatically. Hopefully someone can run it through Mobipocket Creator to see what results it produces.

I have found one weirdness, which is that at least on a PDA with Windows Mobile MBP will only display gifs in html. I don't think this is a problem with prc files.

In the v3 version I replaced some of the pngs with gifs.

andym
09-19-2007, 06:20 PM
I've got a *bunch* of .txt files which have - for some silly reason - *SHORT* lines, maybe 40-45 characters before hitting a hard line-break. Is there a simple executable or a Word 2002 script which will take out all the excess line-breaks within a paragraph. Most of these files have two line-breaks between paragraphs.

I have, on my system Atlantis Word Processor and Word 2002 if anyone has a script for one of those.

Derek

You might find it worth getting a text editor (such as e-texteditor (http://www.e-texteditor.com/index.html) that supports regular expressions. These allow you to do very clever search and replace operations - eg select all returns that follow a letter rather than a punctuation mark and delete them (or replace with a space). There's a bit of a learning curve but they offer a very flexible way of dealing with problem texts.

Have a look at the tutorial here (http://www.e-texteditor.com/blog/2007/regular_expressions_tutorial).

JSWolf
09-19-2007, 07:33 PM
You might find it worth getting a text editor (such as e-texteditor (http://www.e-texteditor.com/index.html) that supports regular expressions. These allow you to do very clever search and replace operations - eg select all returns that follow a letter rather than a punctuation mark and delete them (or replace with a space). There's a bit of a learning curve but they offer a very flexible way of dealing with problem texts.

Have a look at the tutorial here (http://www.e-texteditor.com/blog/2007/regular_expressions_tutorial).

Got a good text editor that doesn't cost & doesn't need cygwin (hate it)?

delphidb96
09-19-2007, 07:38 PM
Thank you to both AndyM and DaleDe. For what I need, I'm finding Ebook Tidy does a smash-up job - and I don't have to learn regular expression programming!

Derek

You might find it worth getting a text editor (such as e-texteditor (http://www.e-texteditor.com/index.html) that supports regular expressions. These allow you to do very clever search and replace operations - eg select all returns that follow a letter rather than a punctuation mark and delete them (or replace with a space). There's a bit of a learning curve but they offer a very flexible way of dealing with problem texts.

Have a look at the tutorial here (http://www.e-texteditor.com/blog/2007/regular_expressions_tutorial).

RWood
09-19-2007, 08:04 PM
I've got a *bunch* of .txt files which have - for some silly reason - *SHORT* lines, maybe 40-45 characters before hitting a hard line-break. Is there a simple executable or a Word 2002 script which will take out all the excess line-breaks within a paragraph. Most of these files have two line-breaks between paragraphs.

I have, on my system Atlantis Word Processor and Word 2002 if anyone has a script for one of those.

Derek
In the MobileaRead Wiki on the conversion page is a link to Stingo's Word Macro. I use it a lot and it turns hard returns into great text. If you already have Word then the total cost is $0.

jasonkchapman
09-19-2007, 09:01 PM
Got a good text editor that doesn't cost & doesn't need cygwin (hate it)?
Try the AEdiX Suite (http://software.kirys.it/downloads.php). It's a very flexible editor and the search/replace has RE support. I use it for coding, but it's fine for generic text editing as well.

andym
09-20-2007, 05:19 PM
In the MobileaRead Wiki on the conversion page is a link to Stingo's Word Macro. I use it a lot and it turns hard returns into great text. If you already have Word then the total cost is $0.

Just don't use word to create HTML files from text the results are pretty awful.