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

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 06-23-2009, 01:25 PM   #271
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: 2530531
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 nrapallo View Post
Any ideas about an optimal Kindle DX profile...
Per the Kindle Formatting blog (Sunday, June 14, 2009 - Kindle DX Image Test):
Quote:
The DX screen is 824 pixels wide by 1200 pixels high, and the viewable book area on the DX is 744px wide by 1022px high.
Can anyone verifiy this size, 744x1022, works best with PDFRead and the Kindle DX?
nrapallo is offline   Reply With Quote
Old 07-18-2009, 10:20 PM   #272
hw360
Member
hw360 doesn't litterhw360 doesn't litter
 
Posts: 10
Karma: 196
Join Date: Jul 2009
Device: Kindle 2
Great software. NR!

The 'Optimize PNG' parameter is supposed to shrink file size, right?
I tried to convert a pdf file, one is on, one is off. The final .prc files are same size, although the temp .png file sizes are different.

Is it because the final .prc file re-encode the png files to jpg?
Is there a software can inspect .prc file?
hw360 is offline   Reply With Quote
Old 07-18-2009, 10:45 PM   #273
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: 2530531
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 hw360 View Post
Great software. NR!
Thanks, it was well written by Ashish Kulkarni and a pleasure to maintain!

Quote:
The 'Optimize PNG' parameter is supposed to shrink file size, right?
I tried to convert a pdf file, one is on, one is off. The final .prc files are same size, although the temp .png file sizes are different.
Yes, the .pngs get processed differently, but then, I think, the html2mobi code (from MobiPerl) converts them to .jpg for inclusion in the .prc. So the 'optimize png' refers to the temporay .png files created. However, if I create a REB1200 .imp ebook from those .png (my ebook reader uses this format), then the .pngs are stored "as is" and then you would notice a betterment in the resulting ebook filesize.

Quote:
Is it because the final .prc file re-encode the png files to jpg?
Is there a software can inspect .prc file?
I believe it is. Check the MobiPerl suite of programs, namely mobi2html, or calibre. Even my Mobi2IMP program will explode a .prc into .html and images (just don't fix anything when using Mobi2IMP).
nrapallo is offline   Reply With Quote
Old 07-19-2009, 09:15 PM   #274
hw360
Member
hw360 doesn't litterhw360 doesn't litter
 
Posts: 10
Karma: 196
Join Date: Jul 2009
Device: Kindle 2
Nick, thanks for your response.

I purchased a Kindle 2 recently, and have read this forum thread through. I too found that Kindle 2 would display a blank page every 2 pages (I used mobi-prc, landscape-half to convert, so every 2 pages means 1 orginal page).
I tried to use Calibre to create .mobi file from the temporary .html and .png files generated by PDFRead, it does NOT have the blank page problem. However, the TOC link does not work: Click any link, it will jump to end of the book.
hw360 is offline   Reply With Quote
Old 07-19-2009, 10:08 PM   #275
hw360
Member
hw360 doesn't litterhw360 doesn't litter
 
Posts: 10
Karma: 196
Join Date: Jul 2009
Device: Kindle 2
More tests about Kindle 2 Blank Page:

According to this thread, Kindle 2 display area is 520x622. 622 is not multiple of 8, so I thought that might be the problem.
Last night, I tried PDFRead to create .prc files with size 520x616, 520x618, 520x622, 520x624. All had blank pages problems except the 520x616. I was excited and thought I found the reason.
But, today, I tried the 520x616 again, the blank page problem shows up too. I swear I saw it work fine yesterday.

Last edited by hw360; 07-19-2009 at 11:34 PM.
hw360 is offline   Reply With Quote
Old 07-23-2009, 10:14 AM   #276
hw360
Member
hw360 doesn't litterhw360 doesn't litter
 
Posts: 10
Karma: 196
Join Date: Jul 2009
Device: Kindle 2
More about the Kindle 2 Blank Page issue:

1. Kindle 2 "line space" setting matters. Press Shift+Alt+1 for best result.
2. In PDFRead, set Width and Height to 480,622. That will solve the blank page issue.
hw360 is offline   Reply With Quote
Old 07-23-2009, 10:19 AM   #277
hw360
Member
hw360 doesn't litterhw360 doesn't litter
 
Posts: 10
Karma: 196
Join Date: Jul 2009
Device: Kindle 2
Hi- Nick,

Is there a way to manually set cropping border? I have a book that has page number printed on the most upper-left corner for each left-hand page, which makes auto-crop think it's a content and stop cropping.

Thanks!
hw360 is offline   Reply With Quote
Old 07-23-2009, 10:21 AM   #278
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: 2530531
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 hw360 View Post
More about the Kindle 2 Blank Page issue:

1. Kindle 2 "line space" setting matters. Press Shift+Alt+1 for best result.
2. In PDFRead, set Width and Height to 480,622. That will solve the blank page issue.

So, if the width (480) is the culprit, then that "blank" page is the right margin going onto the next page and not the bottom margin being exceeded! What a find!

All along we were looking for too long a picture and here it is that it's too wide a picture! That probably means that the Kindle 2 adds to any page left/right margins of 20px (i.e. 20+480+20 = 520).
Any way to disable that using CSS/html code?

At least there the work-around solution that you found!
nrapallo is offline   Reply With Quote
Old 07-23-2009, 02:18 PM   #279
hw360
Member
hw360 doesn't litterhw360 doesn't litter
 
Posts: 10
Karma: 196
Join Date: Jul 2009
Device: Kindle 2
Quote:
Originally Posted by nrapallo View Post
So, if the width (480) is the culprit, then that "blank" page is the right margin going onto the next page and not the bottom margin being exceeded! What a find!
It seems not the margin, it's the <a> HTML tag causing the blank page. Or, the first line indent of <p> paragraph.

The .prc books that I created by Calibre do not have TOC(table of content), so image 520x622 works fine.
PDFRead created .prc file has TOC and <a> tags. It looks like Kindle 2 renders some space for <a> which causing a blank page before the first half image. The 2nd half image is usually smaller than 480 width, so no blank page.

It could also be the first line indent of <p> tag.

Last edited by hw360; 07-23-2009 at 02:31 PM.
hw360 is offline   Reply With Quote
Old 07-27-2009, 02:44 PM   #280
diazlaz
Member
diazlaz began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Dec 2003
Device: Toshiba E755
Deleting Blank Pages

Great program!! - One request, when saving, it seems pdfread will evaluate the page, and if the page is blank (empty), it discards the page and never saves it. Is it possible to have pdfread save the page as an image regardless if the page is empty? I have a process that is trying to match the PNG file to the page number, when pdfread deletes a page, my pages don't align.

Thanks for the consideration and assistance in advance.
Laz.
diazlaz is offline   Reply With Quote
Old 07-27-2009, 03:50 PM   #281
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: 2530531
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 diazlaz View Post
Great program!! - One request, when saving, it seems pdfread will evaluate the page, and if the page is blank (empty), it discards the page and never saves it. Is it possible to have pdfread save the page as an image regardless if the page is empty? I have a process that is trying to match the PNG file to the page number, when pdfread deletes a page, my pages don't align.

Thanks for the consideration and assistance in advance.
Laz.
Which operating system do you use? Windows or MacOSX or Linux?

The reason I ask is that on non-windows machines, just changing the python scripts can be done locally quite easily (for your own use), whereas for windows you would have to install Active Python 2.5.

I'll check to see if I can find where to patch the code and at the same time will look at fixing a sore spot, in my eyes, when the zooming in the remaining cropped text and it gets expanded more than double. It looks like a big blob when left in PDFRead and I've always wanted to fix that. However, my python skills have gotten rusty so this may take me more time than usual.

Unless, someone who knows what to do steps up to the plate...
nrapallo is offline   Reply With Quote
Old 07-27-2009, 04:57 PM   #282
diazlaz
Member
diazlaz began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Dec 2003
Device: Toshiba E755
Quote:
Originally Posted by nrapallo View Post
Which operating system do you use? Windows or MacOSX or Linux?

The reason I ask is that on non-windows machines, just changing the python scripts can be done locally quite easily (for your own use), whereas for windows you would have to install Active Python 2.5.

I'll check to see if I can find where to patch the code and at the same time will look at fixing a sore spot, in my eyes, when the zooming in the remaining cropped text and it gets expanded more than double. It looks like a big blob when left in PDFRead and I've always wanted to fix that. However, my python skills have gotten rusty so this may take me more time than usual.

Unless, someone who knows what to do steps up to the plate...
Thanks for the quick response. Using Windows. Appreciate your help!

Thanks,
Laz.
diazlaz is offline   Reply With Quote
Old 07-27-2009, 06:23 PM   #283
diazlaz
Member
diazlaz began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Dec 2003
Device: Toshiba E755
Quote:
Originally Posted by nrapallo View Post
Which operating system do you use? Windows or MacOSX or Linux?

The reason I ask is that on non-windows machines, just changing the python scripts can be done locally quite easily (for your own use), whereas for windows you would have to install Active Python 2.5.

I'll check to see if I can find where to patch the code and at the same time will look at fixing a sore spot, in my eyes, when the zooming in the remaining cropped text and it gets expanded more than double. It looks like a big blob when left in PDFRead and I've always wanted to fix that. However, my python skills have gotten rusty so this may take me more time than usual.

Unless, someone who knows what to do steps up to the plate...
i believe i found the source that prevents the saving of the image in process.py.

if sum(hist[:32]) < 10 or sum(hist[224:]) < 10:
continue

i think if i remove these, it will work.

Installed ActiveState Phython 2.6.2.2, the next question, is how do i recompile ? can i run the patched version directly using the Phython

Thanks,
Laz.
diazlaz is offline   Reply With Quote
Old 07-27-2009, 07:32 PM   #284
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: 2530531
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 diazlaz View Post
i believe i found the source that prevents the saving of the image in process.py.

if sum(hist[:32]) < 10 or sum(hist[224:]) < 10:
continue

i think if i remove these, it will work.

Installed ActiveState Phython 2.6.2.2, the next question, is how do i recompile ? can i run the patched version directly using the Phython

Thanks,
Laz.
OK, thanks for the pointer!

I removed those two lines and recompiled it. Just place the contents of dist.zip (two files) into the 'bin' folder in the PDFRead install directory overwriting the existing ones.

If it works, then just retain those new files. If it doesn't just re-install.

As for re-compiling the program to create a revised pdfread.exe, just place the below batch file (remove the .txt suffix) in the 'bin' directory along with a copy of the python scripts from the 'src' directory. Then double click the .bat file and after reviewing the errors messages, press any key to continue and the new pdfread.exe and library.zip will be copied there! I think you will need some dependent libs, but at the moment I can't recall. Ask for some assistance here, if you can't figure it out.

Good luck!

p.s. you can run the python scripts natively without compiling them (but there's no GUI); just follow the syntax displayed in the dos windows when you run the windows GUI and append those parameters to 'pdfread.py ', I think. It's been so long since I've had to do this...
Attached Files
File Type: zip dist.zip (2.39 MB, 301 views)
File Type: txt remake.bat.txt (118 Bytes, 194 views)

Last edited by nrapallo; 07-27-2009 at 07:38 PM.
nrapallo is offline   Reply With Quote
Old 07-27-2009, 08:38 PM   #285
diazlaz
Member
diazlaz began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Dec 2003
Device: Toshiba E755
Quote:
Originally Posted by nrapallo View Post
OK, thanks for the pointer!

I removed those two lines and recompiled it. Just place the contents of dist.zip (two files) into the 'bin' folder in the PDFRead install directory overwriting the existing ones.

If it works, then just retain those new files. If it doesn't just re-install.

As for re-compiling the program to create a revised pdfread.exe, just place the below batch file (remove the .txt suffix) in the 'bin' directory along with a copy of the python scripts from the 'src' directory. Then double click the .bat file and after reviewing the errors messages, press any key to continue and the new pdfread.exe and library.zip will be copied there! I think you will need some dependent libs, but at the moment I can't recall. Ask for some assistance here, if you can't figure it out.

Good luck!

p.s. you can run the python scripts natively without compiling them (but there's no GUI); just follow the syntax displayed in the dos windows when you run the windows GUI and append those parameters to 'pdfread.py ', I think. It's been so long since I've had to do this...
Nick - thanks! awesome! - your build worked perfectly. thanks again. This build no longer removes blank pages and keeps the page count consistent with the PDF file.
diazlaz 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
Need help using PDFRead daithi81 Workshop 8 10-16-2009 09:33 AM
Need help with PDFRead pfisterfarm PDF 8 03-23-2009 09:19 AM
pdfread cybook x3oo Cybook 2 03-09-2009 11:49 AM
PDFRead 1.7 released ashkulz PDF 87 03-12-2008 10:29 AM
PDFRead v5 available on Sourceforge Alexander Turcic PDF 3 04-08-2007 06:31 AM


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


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