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

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 02-28-2013, 08:24 AM   #331
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: 548
Karma: 2526455
Join Date: Jun 2011
Location: California
Device: Kindle 2, iPad
Quote:
Originally Posted by dgvirtual View Post
Thanks, it did work, but also it broke both graphs ant tables in the paper... Oh well, one cannot have it all...

I guess, there is no easy way to make the program treat different pages using different settings, unless I want to do conversion page by page, joining the document afterwards?
Correct--there is no way to use different options on different source pages with k2pdfopt at this time unless you run them separately and join the results together afterwards. I'll consider a way to do that in a future release.
willus is offline   Reply With Quote
Old 02-28-2013, 08:36 AM   #332
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: 548
Karma: 2526455
Join Date: Jun 2011
Location: California
Device: Kindle 2, iPad
Quote:
Originally Posted by dgvirtual View Post
What could optimization settings for Kobo Glo look like?

it has screen of 122mm x 90,3mm, screen size in pixels is 1024x768. I tried kindle paperwhite settings (-dev kpw) but those do not procude an image that could be used without further fitting (I use vertical fitting, and then I can see the whole page and turn it without scrolling).

Besides, Kobo Glo has the page count bar at the bottom which is 9,3 mm high.

Would it be possible to add Kobo Glo as a -dev preset?
I've never used a Kobo Glo and don't have access to one. I'm not sure what you mean by "vertical fitting." Is this an option on the Glo? It sounds like the page is too tall--wrong aspect ratio. It seems like the dots per inch of the display is about 220 (25.4*768/90.3). Can you experiment with the -w, -h, and -odpi settings? E.g.

k2pdfopt -w 9cm -h 11.3cm -odpi 220 ...

Adjust the values above until you get something you like. Alternatively, you can use pixels for the width and height:

k2pdfopt -w 768 -h 1024 -odpi 220 ...

Let me know and I can add it as a device preset. See also my help page on the topic.
willus is offline   Reply With Quote
Old 03-01-2013, 04:52 AM   #333
dgvirtual
Enthusiast
dgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with others
 
dgvirtual's Avatar
 
Posts: 30
Karma: 2848
Join Date: Feb 2013
Location: Lithuania
Device: Kobo Glo
Quote:
Originally Posted by willus View Post
I've never used a Kobo Glo and don't have access to one. I'm not sure what you mean by "vertical fitting." Is this an option on the Glo? It sounds like the page is too tall--wrong aspect ratio. It seems like the dots per inch of the display is about 220 (25.4*768/90.3). Can you experiment with the -w, -h, and -odpi settings? E.g.

k2pdfopt -w 9cm -h 11.3cm -odpi 220 ...

Adjust the values above until you get something you like. Alternatively, you can use pixels for the width and height:

k2pdfopt -w 768 -h 1024 -odpi 220 ...

Let me know and I can add it as a device preset. See also my help page on the topic.
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
dgvirtual is offline   Reply With Quote
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: 548
Karma: 2526455
Join Date: Jun 2011
Location: California
Device: Kindle 2, 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
Old 03-01-2013, 10:13 AM   #335
dgvirtual
Enthusiast
dgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with others
 
dgvirtual's Avatar
 
Posts: 30
Karma: 2848
Join Date: Feb 2013
Location: Lithuania
Device: Kobo Glo
Lightbulb Regarding Kobo Touch preset

Thank you willus, I think those dots at the corners are ok with me

Your program is amazingly useful for me, and I am glad I can help at least a little - nice to cooperate!

As for Kobo touch: the real resolution is as advertised, 800x600, the bottom widget strip takes 60 px but for the document to fit perfectly (so as not to be affected with vertical stretch/fit and horizontal stretch/fit functions) you have to take away the total of 70px; and dpi seems to be 167 - both by my count and by the counts I found in reviews.

So, the perfect document for Kobo Touch is produced using:

k2pdfopt -w 600 -h 730 -odpi 167 book.pdf

As far as I understand, the code you pasted in the previous post is part of source code, not part of some configuration file that I could use without compiling the program by myself?
dgvirtual is offline   Reply With Quote
Old 03-01-2013, 02:01 PM   #336
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: 548
Karma: 2526455
Join Date: Jun 2011
Location: California
Device: Kindle 2, iPad
Quote:
Originally Posted by dgvirtual View Post
...
So, the perfect document for Kobo Touch is produced using:

k2pdfopt -w 600 -h 730 -odpi 167 book.pdf

As far as I understand, the code you pasted in the previous post is part of source code, not part of some configuration file that I could use without compiling the program by myself?
I will fix the parameters for the Kobo Touch. Yes, I just pasted the part of the source code that has the device settings. It is not part of a configuration file (that would be too easy!). There are easy ways to customize k2pdfopt, though. See my help pages.
willus is offline   Reply With Quote
Old 03-01-2013, 02:05 PM   #337
voyageusejvzc
Member
voyageusejvzc began at the beginning.
 
Posts: 21
Karma: 10
Join Date: Dec 2012
Device: kindle 3, onyx boox m92
After using k2pdfopt reformatting, the text is much easier to read, but the instant dictionary and the highlighting don't work anymore for the text on my kindle 3.
Even though it worked before for the same pdf article before formatting.
Is that the case for others, too?
voyageusejvzc is offline   Reply With Quote
Old 03-01-2013, 04:31 PM   #338
markom
Addict
markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.markom ought to be getting tired of karma fortunes by now.
 
Posts: 304
Karma: 407774
Join Date: Sep 2012
Device: sony prs t1 kindle dx ipad
Quote:
Originally Posted by voyageusejvzc View Post
After using k2pdfopt reformatting, the text is much easier to read, but the instant dictionary and the highlighting don't work anymore for the text on my kindle 3.
Even though it worked before for the same pdf article before formatting.
Is that the case for others, too?
After k2pdfopt, if there is need for highlighting, I would usually do quick OCR in Adobe or Abbyy Finereader, because there is really no need for precise OCR behind exact pdf image and it will take me a less time i.e. 20 minutes instead of 50 for an average book.

You can of course try k2pdfopt's own OCR engine and see for yourself which one suits you better.

Last edited by markom; 03-01-2013 at 05:22 PM.
markom is offline   Reply With Quote
Old 03-02-2013, 01:10 AM   #339
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: 548
Karma: 2526455
Join Date: Jun 2011
Location: California
Device: Kindle 2, iPad
Quote:
Originally Posted by voyageusejvzc View Post
After using k2pdfopt reformatting, the text is much easier to read, but the instant dictionary and the highlighting don't work anymore for the text on my kindle 3.
Even though it worked before for the same pdf article before formatting.
Is that the case for others, too?
You may want to look at the k2pdfopt OCR help page and/or the "getting started" video.
willus is offline   Reply With Quote
Old 03-02-2013, 12:11 PM   #340
dgvirtual
Enthusiast
dgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with othersdgvirtual plays well with others
 
dgvirtual's Avatar
 
Posts: 30
Karma: 2848
Join Date: Feb 2013
Location: Lithuania
Device: Kobo Glo
Use k2pdfopt just for ocr text embedding?

Quote:
Originally Posted by willus View Post
You may want to look at the k2pdfopt OCR help page and/or the "getting started" video.
Is it possible to use k2pdfopt just to get ocr text embedded into a normal (not optimized for ereader) scanned pdf?

I know there is a free Linux command line program for that - pdfsandwitch - but somehow it does not work on Lithuanian text (the embedded text misses all Lithuanian characters afterwards) while k2pdfopt seems to do lithuanian character recognition fine.
dgvirtual is offline   Reply With Quote
Old 03-02-2013, 01:59 PM   #341
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: 548
Karma: 2526455
Join Date: Jun 2011
Location: California
Device: Kindle 2, iPad
Quote:
Originally Posted by dgvirtual View Post
Is it possible to use k2pdfopt just to get ocr text embedded into a normal (not optimized for ereader) scanned pdf?

I know there is a free Linux command line program for that - pdfsandwitch - but somehow it does not work on Lithuanian text (the embedded text misses all Lithuanian characters afterwards) while k2pdfopt seems to do lithuanian character recognition fine.
It's really the Tesseract engine that does the OCR (I assume you're using Tesseract if you're successfully OCR'ing Lithuanian text)--I can't take much credit it for it, but yes, you can do OCR without optimizing for an e-reader-sized screen:

k2pdfopt -mode copy -ocr t mydoc.pdf

You can tweak the display resolution with the -dr option, e.g. -dr 2 will double the display resolution. You can see what "-mode copy" does on my command-line usage help page.

Edit: Actually, this doesn't work for complicated (multi-column) layouts. I'll have to think about a way to do that...

Last edited by willus; 03-02-2013 at 03:21 PM.
willus is offline   Reply With Quote
Old 03-12-2013, 05:46 AM   #342
brainvision
Enthusiast
brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.
 
brainvision's Avatar
 
Posts: 47
Karma: 603120
Join Date: Aug 2012
Location: Monte Los Angeles (Califoggia)
Device: Android Smartphone
hi boys..
I just discovered this software and I'm very curious about it!

So I did a few experiments with a newspaper and a magazine, but the results are not so great.. Indeed I gain speed when moving into the page, but I cannot understand how to enable the reflow text..
Could you please just suggest me some options I should use to obtain the better conversion possible for such documents?

Thanks you very very much for all that, we really appreciate it!!
brainvision is offline   Reply With Quote
Old 03-12-2013, 08:47 AM   #343
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: 548
Karma: 2526455
Join Date: Jun 2011
Location: California
Device: Kindle 2, iPad
Quote:
Originally Posted by brainvision View Post
hi boys..
I just discovered this software and I'm very curious about it!

So I did a few experiments with a newspaper and a magazine, but the results are not so great.. Indeed I gain speed when moving into the page, but I cannot understand how to enable the reflow text..
Could you please just suggest me some options I should use to obtain the better conversion possible for such documents?

Thanks you very very much for all that, we really appreciate it!!
The best options depend on what your source document(s) look like. Can you post attach a couple examples of your newspaper and magazine articles (the source documents--not the converted ones)?
willus is offline   Reply With Quote
Old 03-12-2013, 01:06 PM   #344
brainvision
Enthusiast
brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.brainvision ought to be getting tired of karma fortunes by now.
 
brainvision's Avatar
 
Posts: 47
Karma: 603120
Join Date: Aug 2012
Location: Monte Los Angeles (Califoggia)
Device: Android Smartphone
yes sure, naturally!

http://www.mediafire.com/?4hgd0zh46teebpq - 10,24 MB

http://www.mediafire.com/?udiqajxa78czjij - 13,77 MB

This first one is a newspaper and the second a magazine, both italian.. I think that they could be considered 2 standards for their categories..

thanks you again!
brainvision is offline   Reply With Quote
Old 03-13-2013, 12:34 AM   #345
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: 548
Karma: 2526455
Join Date: Jun 2011
Location: California
Device: Kindle 2, iPad
Quote:
Originally Posted by brainvision View Post
yes sure, naturally!

http://www.mediafire.com/?4hgd0zh46teebpq - 10,24 MB

http://www.mediafire.com/?udiqajxa78czjij - 13,77 MB

This first one is a newspaper and the second a magazine, both italian.. I think that they could be considered 2 standards for their categories..

thanks you again!
In general, I don't think you're going to be happy using k2pdfopt to convert these kinds of PDF files. K2pdfopt isn't designed to handle such complicated layouts well. You might try something called PDF Masher, but it's more involved--you have to manually specify the layout. If you want to try them, these are the best options I could come up with, but, again, I don't think you'll find the results very readable:

k2pdfopt -mode 2col -evl 2 -col 4 -cg .03 -ch .5 -crgh .01 -m 0 -cgr .5 -sm file.pdf

The -sm option will create a ..._marked.pdf file which shows how your document is being flowed so you can see if it is flowing correctly. Use -p to limit the page range so you can try things out on just a few pages, e.g. -p 10-20.

You can see what all these options do on the command-line usage page. Unfortunately, the options above don't work as well as they should because the -evl 2 option is buggy with your magazine document because the vertical lines are so thin (I have fixed this just now for the next release).

You might also see if these periodicals are available in e-book or tablet form.

Last edited by willus; 03-13-2013 at 09:11 PM. Reason: typo fix
willus is offline   Reply With Quote
Reply

Tags
ebook apps, k5 tools, kindle tools, kindle touch, tools

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Viewing PDFs with another font Font PocketBook 4 11-12-2010 08:27 AM
Viewing Textbook PDFs... NJReader enTourage Archive 4 08-17-2010 05:17 PM
PRS-600 Restart bug while viewing PDFs? conundrum Sony Reader 2 03-04-2010 08:46 PM
More on viewing pdfs dso371 Bookeen 8 03-11-2008 07:15 PM
Viewing Untagged PDFs on Palm T|X Eroica Reading and Management 3 12-10-2007 01:44 PM


All times are GMT -4. The time now is 10:13 PM.


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