Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 02-01-2017, 12:06 AM   #1351
Kuang-che Wu
Junior Member
Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.
 
Posts: 4
Karma: 29176
Join Date: Jan 2017
Device: kindle paperwhite2
Quote:
Originally Posted by willus View Post
Thanks for the suggestion. The small dots are there to force the kindle to fit them in it's view area, otherwise, at least on my old kindle 2, it would try to auto-scale the visible part of the PDF page to its screen. You can try turning them off with -mc-.
I don't mean the dot in the corner. What I am referring is, there are some grey cells in the middle of my grids.
Kuang-che Wu is offline   Reply With Quote
Old 02-01-2017, 08:55 AM   #1352
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 Kuang-che Wu View Post
I don't mean the dot in the corner. What I am referring is, there are some grey cells in the middle of my grids.
By default, k2pdfopt does some image processing (contrast adjust, gamma adjust, sharpening). The sharpening is probably resulting in those pixel aberrations. To turn off all image processing:
-cmax 1.0 -g 1.0 -s-
willus is offline   Reply With Quote
Advert
Old 02-02-2017, 10:41 PM   #1353
Kuang-che Wu
Junior Member
Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.
 
Posts: 4
Karma: 29176
Join Date: Jan 2017
Device: kindle paperwhite2
Feature request: vertical text

Feature request for vertical Chinese text.

I know k2pdfopt has option -r (right-to-left), but it is slightly different to what I need.
The default text ordering (for English-like languages) is
Code:
1 2 3
4 5 6
7 8 9
What -r can handle is character right-to-left, line top-to-down
Code:
3 2 1
6 5 4
9 8 7
But for vertical Chinese, the text ordering is character top-to-down, line right to left,
Code:
7 4 1
8 5 2
9 6 3
If applying -r to vertical Chinese text, it may cut text incorrectly. For example,
Code:
7 4 1
8 5 2
Currently, my workaround is -rt 90 -ls. That is, use "-rt 90" to preserve correct text layout analysis and use "-ls" for correct page size. But after k2pdfopt finish, I have to use other utility to rotate the result pdf 180 degree.

p.s. Vertical and horizontal Chinese writing systems are both in use. Usually books with many English text use horizontal Chinese (characters left-to-right, line top-to-down). Literature and novel use vertical Chinese (character top-to-down, line right-to-left).
Kuang-che Wu is offline   Reply With Quote
Old 02-02-2017, 11:04 PM   #1354
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 Kuang-che Wu View Post
Feature request for vertical Chinese text.

I know k2pdfopt has option -r (right-to-left), but it is slightly different to what I need.
The default text ordering (for English-like languages) is ...
...
Currently, my workaround is -rt 90 -ls. That is, use "-rt 90" to preserve correct text layout analysis and use "-ls" for correct page size. But after k2pdfopt finish, I have to use other utility to rotate the result pdf 180 degree.

p.s. Vertical and horizontal Chinese writing systems are both in use. Usually books with many English text use horizontal Chinese (characters left-to-right, line top-to-down). Literature and novel use vertical Chinese (character top-to-down, line right-to-left).
Actually, I prefer your solution rather than put in special processing for vertical Chinese. Perhaps it could be automated a bit more. I'll think on it. You shouldn't have to use a different utility, though, for the final rotation. k2pdfopt should be able to do all the rotating that you need (-rt option), even if you have to run it in two passes.
willus is offline   Reply With Quote
Old 02-03-2017, 01:50 AM   #1355
Kuang-che Wu
Junior Member
Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.Kuang-che Wu is faster than slow light.
 
Posts: 4
Karma: 29176
Join Date: Jan 2017
Device: kindle paperwhite2
Quote:
Originally Posted by willus View Post
Actually, I prefer your solution rather than put in special processing for vertical Chinese. Perhaps it could be automated a bit more. I'll think on it. You shouldn't have to use a different utility, though, for the final rotation. k2pdfopt should be able to do all the rotating that you need (-rt option), even if you have to run it in two passes.
FYI, my solution is a little inconvenient
  • the preview is upside-down.
  • if used with -cbox/-ibox options, k2pdfopt's GUI let me select the region at 0 degree and I have to swap the values due to -rt 90. I guess other options have similar problems.
Hope this could convince you to modify k2pdfopt
Kuang-che Wu is offline   Reply With Quote
Advert
Old 02-04-2017, 12:26 PM   #1356
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 Kuang-che Wu View Post
FYI, my solution is a little inconvenient
  • the preview is upside-down.
  • if used with -cbox/-ibox options, k2pdfopt's GUI let me select the region at 0 degree and I have to swap the values due to -rt 90. I guess other options have similar problems.
Hope this could convince you to modify k2pdfopt
I'd rotate the whole thing before and after you process it, e.g.
Code:
k2pdfopt -mode copy -n -rt 90 srcfile.pdf
... before processing, and ...
Code:
k2pdfopt -mode copy -n -rt -90 processed_file.pdf
... after processing.
willus is offline   Reply With Quote
Old 02-10-2017, 11:44 AM   #1357
dhdurgee
Guru
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 831
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
Is there a way to use the OCR engine in k2pdfopt to produce a text file from a PDF? I would like to create an epub from a PDF and the text file would be a good start. I would also need to use -as to rotate a few pages that are tilted.

Thanks for a great tool.

Dave
dhdurgee is offline   Reply With Quote
Old 02-10-2017, 05:17 PM   #1358
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 dhdurgee View Post
Is there a way to use the OCR engine in k2pdfopt to produce a text file from a PDF? I would like to create an epub from a PDF and the text file would be a good start. I would also need to use -as to rotate a few pages that are tilted...
Yes, you can use the -ocrout command-line option:
Code:
k2pdfopt -ocrout outfile.txt myfile.pdf
Check my OCR help page. Also be sure to get the latest version (v2.40) which does OCR faster using multi-threading. Finally, you might want to read through my page on PDF conversions for e-books.
willus is offline   Reply With Quote
Old 02-10-2017, 10:59 PM   #1359
dhdurgee
Guru
dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.dhdurgee ought to be getting tired of karma fortunes by now.
 
Posts: 831
Karma: 2525050
Join Date: Jun 2010
Device: K3W, PW4
I gave it a shot with not so great results. First it seg faulted before finishing. Second the output in the text file was garbled.

Looking at your PDF conversions I don't have the new Word and thus have no access to its features. Does Microsoft offer this service online? Could I attach the PDF here and you or someone else could attempt to use word on it? It is a bit over 1MB and I have cropped the article already.

Dave
dhdurgee is offline   Reply With Quote
Old 02-11-2017, 08:35 AM   #1360
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 dhdurgee View Post
I gave it a shot with not so great results. First it seg faulted before finishing. Second the output in the text file was garbled.

Looking at your PDF conversions I don't have the new Word and thus have no access to its features. Does Microsoft offer this service online? Could I attach the PDF here and you or someone else could attempt to use word on it? It is a bit over 1MB and I have cropped the article already.

Dave
What system are you running? You can post your PDF if it is not copyrighted. I sent you a PM. Also, there is a very recent thread on the PDF forum (just had a new post) discussing PDF to epub conversion.

Last edited by willus; 02-11-2017 at 08:38 AM.
willus is offline   Reply With Quote
Old 02-11-2017, 11:48 AM   #1361
Bennu
Junior Member
Bennu began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2017
Device: kobo aura one
Howto rescale page without changing the resolution of embedded images?

Thank you for this great software!
If I use

Code:
k2pdfopt -n -wrap- -mode tm
or

Code:
k2pdfopt -wrap- -mode tm
is it possible to rescale the pages to a common width without changing the resolution of the embedded images?
For example I would like the above options plus rescale all pages to a common width of 7 inch.
Right now the unscaled pages look in my pdfreader like in the attachment.
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	233
Size:	85.9 KB
ID:	154918  
Bennu is offline   Reply With Quote
Old 02-11-2017, 04:43 PM   #1362
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 Bennu View Post
Thank you for this great software!
If I use

Code:
k2pdfopt -n -wrap- -mode tm
or

Code:
k2pdfopt -wrap- -mode tm
is it possible to rescale the pages to a common width without changing the resolution of the embedded images?
For example I would like the above options plus rescale all pages to a common width of 7 inch.
Right now the unscaled pages look in my pdfreader like in the attachment.
This should be possible. You want to keep the output in native mode so as not to change the resolution of your embedded PDF images. I would simply set your device output to 7 inches x XX inches and use -mode fitwidth. I'm not sure if that's exactly what you want. E.g. maybe
Code:
k2pdfopt -h 10in -w 7in -mode fw -ls- mysource.pdf
You could also try it with -mode trim or -mode fitpage instead.
Edit: On second thought, don't use -mode trim--it resets the page size of each page to be whatever the trimmed source content size is.
willus is offline   Reply With Quote
Old 02-12-2017, 11:49 AM   #1363
headshok2002
Junior Member
headshok2002 is faster than slow light.headshok2002 is faster than slow light.headshok2002 is faster than slow light.headshok2002 is faster than slow light.headshok2002 is faster than slow light.headshok2002 is faster than slow light.headshok2002 is faster than slow light.headshok2002 is faster than slow light.headshok2002 is faster than slow light.headshok2002 is faster than slow light.headshok2002 is faster than slow light.
 
Posts: 1
Karma: 29176
Join Date: Feb 2017
Device: Kobo Aura One
I've just installed this on my MacBook and it's working perfectly. I've been able to convert an 800p book that was previously not readable on an e-reader to something easy and comfortable to read.

Well, on my 6" Kobo Glo.

I do not see the Kobo Aura One in the device menu, though. Is this something that may be added in the future? Or are their known custom settings that work well on the KA1?

Thanks!
headshok2002 is offline   Reply With Quote
Old 02-12-2017, 03:58 PM   #1364
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 headshok2002 View Post
I've just installed this on my MacBook and it's working perfectly. I've been able to convert an 800p book that was previously not readable on an e-reader to something easy and comfortable to read.

Well, on my 6" Kobo Glo.

I do not see the Kobo Aura One in the device menu, though. Is this something that may be added in the future? Or are their known custom settings that work well on the KA1?

Thanks!
If you can post a couple screen shots from your Kobo Aura 1 in this thread, I can tell you what settings to use (and add the KA1 to the built-in device list).

Last edited by willus; 02-12-2017 at 04:00 PM.
willus is offline   Reply With Quote
Old 02-15-2017, 08:33 AM   #1365
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 Kuang-che Wu View Post
...I have a feature suggestion for landscape mode.

...
So if you want to add this mode, you have to collect again the size for device's landscape mode like https://www.mobileread.com/forums/sh....php?p=3013298

...
Kuang-che--can you post your paperwhite screenshots in landscape mode to that thread, using my two PDF files?
willus is offline   Reply With Quote
Reply

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


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:47 PM.


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