Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 03-25-2008, 06:48 PM   #451
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by mateo View Post
I have a problem with html2mobi. the created mobi file has all of my text centered, but the original html file (checked with firefox and internet explorer) does not have the text centered. I think maybe it is because certain sections (such as chapter headings) are centered using this:

<p align="center">

could it be that html2mobi doesn't handle that tag, yet? if i replace all of those instances with the <center> tag, would that fix my problem?
Well, html2mobi does not do anything with the html concerning that so I would suspect that the html code is broken and the mobiPocket reader and firefox renders the broken code differently. If you give a short example is is possible to say more.
tompe is offline   Reply With Quote
Old 03-25-2008, 07:04 PM   #452
mateo
Enthusiast
mateo began at the beginning.
 
Posts: 45
Karma: 10
Join Date: May 2005
Device: Palm Zire71
hmm, not sure what to show you... Well, here's one part.

Code:
<p align="center">C&nbsp;H&nbsp;A&nbsp;P&nbsp;T&nbsp;E&nbsp;R&nbsp;&nbsp;&nbsp;O&nbsp;N&nbsp;E<br>

<img src="ornament.png"><br>
<font size="+2">A Mandate of Salt</font><br>
<br>
</p><font size="+2">O</font>NCE I STOOD on the bank of a rice paddy in rural Sichuan Province, and a lean and aging Chinese peasant, wearing a faded forty-year-old blue jacket issued by the Mao government in the early years of the Revolution, stood knee deep in water and apropos of absolutely nothing shouted defiantly at me, “We Chinese invented many things!”<br>
Now, according to the rules of html the part in between <p> and </p> should be centered, the other text should not. But it is. Not in firefox, but on the kindle it is (indeed, the entire book is centered). i don't know about mobipocket reader, i don't have that.
mateo is offline   Reply With Quote
Advert
Old 03-25-2008, 07:50 PM   #453
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by mateo View Post
hmm, not sure what to show you... Well, here's one part.

Code:
<p align="center">C&nbsp;H&nbsp;A&nbsp;P&nbsp;T&nbsp;E&nbsp;R&nbsp;&nbsp;&nbsp;O&nbsp;N&nbsp;E<br>

<img src="ornament.png"><br>
<font size="+2">A Mandate of Salt</font><br>
<br>
</p><font size="+2">O</font>NCE I STOOD on the bank of a rice paddy in rural Sichuan Province, and a lean and aging Chinese peasant, wearing a faded forty-year-old blue jacket issued by the Mao government in the early years of the Revolution, stood knee deep in water and apropos of absolutely nothing shouted defiantly at me, “We Chinese invented many things!”<br>
Now, according to the rules of html the part in between <p> and </p> should be centered, the other text should not. But it is. Not in firefox, but on the kindle it is (indeed, the entire book is centered). i don't know about mobipocket reader, i don't have that.
This is not correct html. You have text outside <p></p>. And I assume <br> is not allowed in recent html. The centered text probably occur because the render ignores the </p> tag and assumed that the text belongs to the paragraph.
tompe is offline   Reply With Quote
Old 03-25-2008, 07:52 PM   #454
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
There are some flags to html2mobi which might fix this. Test --fixhtmlbr or --fixhtml.
tompe is offline   Reply With Quote
Old 03-25-2008, 08:33 PM   #455
mateo
Enthusiast
mateo began at the beginning.
 
Posts: 45
Karma: 10
Join Date: May 2005
Device: Palm Zire71
fixhtml makes everything left aligned, even the parts that are supposed to be centered. which i guess is preferrable to everything being center aligned. but i think i'll try some find and replace find. if what you are saying is that </p> is being ignored because it is on the same line as a new paragraph that's not supposed to be inside the p tag, i might be able to fix this.
mateo is offline   Reply With Quote
Advert
Old 03-25-2008, 08:39 PM   #456
mateo
Enthusiast
mateo began at the beginning.
 
Posts: 45
Karma: 10
Join Date: May 2005
Device: Palm Zire71
putting a new line after the </p> tag does not fix the problem. going to try some other things.

i bet i know what's going on. the kindle is assuming that everything is center aligned because the text outside of the <p> never explicitly declares it's alignment.
mateo is offline   Reply With Quote
Old 03-25-2008, 08:42 PM   #457
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by mateo View Post
fixhtml makes everything left aligned, even the parts that are supposed to be centered. which i guess is preferrable to everything being center aligned. but i think i'll try some find and replace find. if what you are saying is that </p> is being ignored because it is on the same line as a new paragraph that's not supposed to be inside the p tag, i might be able to fix this.
No, I am saying that maybe the parser is simple so it looks for the next <p> to see were the paragraph ends. The error is the that body text is not inside <p> </p>.
tompe is offline   Reply With Quote
Old 03-25-2008, 08:45 PM   #458
mateo
Enthusiast
mateo began at the beginning.
 
Posts: 45
Karma: 10
Join Date: May 2005
Device: Palm Zire71
right, came to the same conclusion myself. going to try inserting <p> in the body (if that can be done with find/replace. if not, i'll simply replace the existing <p> with <center> tags instead. that should fix the problem once and for all.
mateo is offline   Reply With Quote
Old 03-29-2008, 11:51 PM   #459
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: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
How does the Mobipocket file look in Mobipocket Reader for Windows?
JSWolf is offline   Reply With Quote
Old 04-01-2008, 12:56 PM   #460
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
tompe:

I added your recent mobi2html UTF-8 improvements to my mobi2imp.pl; thank-you very much!

I did notice that there was no access to 'longtitle' yet in mobi2html, even though mobi2mobi and mobils have it. Also, I like what you did in mobi2mobi/mobi2ls to retrieve record_0.

I had an issue with the (old) 'mobi2htmi' base code in mobi2imp that a .prc failed to have an id==0 record and hence was not parsed properly. I just replaced it with your improvements in mobi2mobi/mobi2ls and it works now.

Again, thanks for the great support you have provided here!

Last edited by nrapallo; 04-01-2008 at 01:58 PM. Reason: fixed typos
nrapallo is offline   Reply With Quote
Old 04-01-2008, 05:37 PM   #461
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by nrapallo View Post
I did notice that there was no access to 'longtitle' yet in mobi2html, even though mobi2mobi and mobils have it.
How do you want to use this? The longtitle could not be added to the html code so I do not see how to use it.
tompe is offline   Reply With Quote
Old 04-01-2008, 05:53 PM   #462
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
Quote:
Originally Posted by tompe View Post
How do you want to use this? The longtitle could not be added to the html code so I do not see how to use it.
Just as further info printed to STDERR, I guess.
nrapallo is offline   Reply With Quote
Old 04-03-2008, 12:18 AM   #463
nrapallo
GuteBook/Mobi2IMP Creator
nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.nrapallo ought to be getting tired of karma fortunes by now.
 
nrapallo's Avatar
 
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
tompe:

I need you advice and help understanding what this poster's solution could be trying to display images on his Cybook based on this post.

He is responding to my request for max. image size to display .cbz/.cbr comic books on the Cybook, in particular.

Just a note, I use your 'opf2mobi' to convert .html with images of default size 520 x 640 (in a .opf) to .prc as output from my PDFRead 1.8.1 conversion software.

I think the images are being limited in size somehow and result in a large white border (wasted space!).

Any inights/solutions you may have?
nrapallo is offline   Reply With Quote
Old 04-03-2008, 06:00 AM   #464
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by nrapallo View Post
tompe:

I need you advice and help understanding what this poster's solution could be trying to display images on his Cybook based on this post.

He is responding to my request for max. image size to display .cbz/.cbr comic books on the Cybook, in particular.

Just a note, I use your 'opf2mobi' to convert .html with images of default size 520 x 640 (in a .opf) to .prc as output from my PDFRead 1.8.1 conversion software.

I think the images are being limit$rescale_large_imagesed in size somehow and result in a large white border (wasted space!).

Any inights/solutions you may have?
Due to a bug in the Cybook the images are rescaled. I will remove the rescaling when there is an official fix for this bug from Bookeen. To avoid rescaling set $rescale_large_images in Util.pm to 0.
tompe is offline   Reply With Quote
Old 04-03-2008, 09:05 AM   #465
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: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by tompe View Post
Due to a bug in the Cybook the images are rescaled. I will remove the rescaling when there is an official fix for this bug from Bookeen. To avoid rescaling set $rescale_large_images in Util.pm to 0.
Burt for those of us using your software so we can do a conversion from Mobipocket format or not using a Gen3, the rescaling is not needed. Can you make an option to not rescale?
JSWolf is offline   Reply With Quote
Reply

Tags
mobi2mobi, mobils


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mobi2Mobi Mobi2Mobi v0.13 - GUI for Mobiperl tools Jad Kindle Formats 476 03-15-2015 05:51 PM
Tools for Editing Kindle .mobi Files? GJN Kindle Formats 33 12-26-2013 02:05 PM
Handy Perl Script to convert HTML0 files to smartquotes maggotb0y Sony Reader 0 04-12-2007 11:49 AM
PRS-500 Perl tools to generate Reader content TadW Sony Reader Dev Corner 0 01-08-2007 05:55 AM
gmail copy (gmcp) - Perl script to copy files to/from Gmail Colin Dunstan Lounge 0 09-04-2004 01:24 PM


All times are GMT -4. The time now is 10:09 AM.


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