View Single Post
Old 03-01-2013, 08:16 AM   #334
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 1,273
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by dgvirtual View Post
So I edited a picture on my Kobo Glo using the Sketch program included, and found out that the width of the screen is actually 758 px (that is how wide the pictures are). So, the actual dpi is 213. However, the picture does not take all of the screen vertically (a strip on top and a strip on the bottom are left for widgets, etc), so I had to experiment a little more - made jpg pictures of 758px horizontal, and different vertical sizes and tried them on on the screen, as images on Kobo Glo are displayed fullscreen. The result, surprisingly, was that the height is actually 1024px...

Then I measured more or less the bottom strip that is used for illumination widget and page count while reading pdf's, and made some pdf's that use different vertical dimensions.

The best result I got was with these settings:

k2pdfopt -w 758 -h 942 -odpi 213 book.pdf

On Kobo Glo (and Touch - I will do these counts on the Touch later as well) while reading pdf's there is the zoom widget in the bottom panel, but there are also " fit/stretch vertically" and "fit/stretch horizontally" buttons. When using the above mentioned dimensions, pressing any of those widgets does not change the display - that is why I judge that the above parameters make a perfect fit on screen.

Then there is the font size problem - I think that the 12pt Times New Roman in the original document is transformed to look readable on the document, but I do not know what the defaults for your -dev presets usually are. But you can perhaps try it yourself to see by making a document and viewing it on computer screen with a pdf width being 90,4 mm (this seems to be more of an exact measurement if you want to fit all the 658px into 213 dpi - hope I express myself clearly enough
Thank you for figuring that out. Below is the code for the device profiles. The numbers are the width (pixels), height (pixels), dpi, color device (boolean), whether to mark the corners (boolean), and the padding around the corner markers. That is all that is stored for each device setting. As you can see, I've added your settings for the next release.

static DEVPROFILE devprof[7] =
{
{"Kindle 2","k2",560,735,167,0,1,{0,0,3,4}},
{"Nook Simple Touch","nookst",552,725,167,0,1,{0,0,0,0}},
{"Kindle DX","dx",800,1180,167,0,1,{0,0,0,0}},
{"Kindle Paperwhite","kpw",758,1024,212,0,1,{0,0,3,4}},
{"Kobo Touch","kbt",758,942,213,0,1,{0,0,3,4}},
{"Kobo Glo","kbg",758,942,213,0,1,{0,0,3,4}},
{"","",0,0,167,0,1,{0,0,0,0}}
};


If you want to try using -mc- (no markers in the corners) or -pb 0 -pr 0 (set padding to zero) to see if that makes things better or worse, then I can tune the corner marking and padding values. See my command-line usage page.

Last edited by willus; 03-01-2013 at 08:22 AM.
willus is offline   Reply With Quote