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 01-03-2017, 10:24 PM   #1336
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,272
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by killout View Post
Hello, Willus.

So this is what I executed:
./k2pdfopt -mode fitwidth -ls- -w 2048 -h 1536 -dpi 264 ansible-for-devops-sample.pdf

And in the attach is what I got. They output does has proportions,what I want, width: 2048, height: 1536, so I can read on ipad in landscape mode.The thing is large white margins, which I would like to get rid of, by enlarging content to the size of ipad screen, so desired output pdf is 2048*1534, but with no margins. Is it possible to do?
Yes, you can eliminate the margins. Just make the -dpi value larger, e.g. -dpi 400. At -dpi 264, you are telling k2pdfopt that your device screen is 2048/264 = 7.75 inches wide, whereas your source PDF is only 7 inches wide, so k2pdfopt does not magnify it. It displays it on your iPad so that the page width will physically be 7 inches if you measure it with a ruler--to match the source document size. By specifying -dpi 400, you essentially tell k2pdfopt to magnify the source file. I.e. you are telling k2pdfopt that your device is 2048/400 = about 5 inches wide (even though in reality it is 7.75 inches wide). Now that the "width" of your device (5 inches) is less than the source text width, k2pdfopt will fit the text to your screen, with no margins (assuming you specify -mode fitwidth).
willus is offline   Reply With Quote
Old 01-04-2017, 01:15 AM   #1337
killout
Junior Member
killout is faster than slow light.killout is faster than slow light.killout is faster than slow light.killout is faster than slow light.killout is faster than slow light.killout is faster than slow light.killout is faster than slow light.killout is faster than slow light.killout is faster than slow light.killout is faster than slow light.killout is faster than slow light.
 
Posts: 4
Karma: 29000
Join Date: Dec 2016
Device: Ipad Air 2, Onyx Boox Aurora
Quote:
Originally Posted by willus View Post
Yes, you can eliminate the margins. Just make the -dpi value larger, e.g. -dpi 400. At -dpi 264, you are telling k2pdfopt that your device screen is 2048/264 = 7.75 inches wide, whereas your source PDF is only 7 inches wide, so k2pdfopt does not magnify it. It displays it on your iPad so that the page width will physically be 7 inches if you measure it with a ruler--to match the source document size. By specifying -dpi 400, you essentially tell k2pdfopt to magnify the source file. I.e. you are telling k2pdfopt that your device is 2048/400 = about 5 inches wide (even though in reality it is 7.75 inches wide). Now that the "width" of your device (5 inches) is less than the source text width, k2pdfopt will fit the text to your screen, with no margins (assuming you specify -mode fitwidth).
Oh, thank you very much for the explanation!
Now I will be slice all my pdf perfectly to read on ipad, just need to adjust dpi depending on input pdf size.
Thanks again for such a great tool
killout is offline   Reply With Quote
Advert
Old 01-04-2017, 08:33 AM   #1338
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,272
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by killout View Post
Oh, thank you very much for the explanation!
Now I will be slice all my pdf perfectly to read on ipad, just need to adjust dpi depending on input pdf size.
Thanks again for such a great tool
You can generally err on the side of a larger dpi. If the dpi is too large, the "-mode fitwidth" will still fit the source contents to the device width (effectively reducing the dpi).
willus is offline   Reply With Quote
Old 01-07-2017, 04:00 PM   #1339
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,272
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
k2pdfopt v2.40 released

K2pdfopt v2.40 is released. Tesseract OCR processing is now multi-threaded and so runs significantly faster on modern, multi-threaded CPUs like Intel's Core-i7. See details at the web site.
willus is offline   Reply With Quote
Old 01-11-2017, 11:01 AM   #1340
Chen Megatroon
Junior Member
Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.
 
Posts: 3
Karma: 61000
Join Date: Jan 2017
Device: New Kindle
Hi, I meet some problem with the command -col. In the converted file, a paragraph is dived into 2 column, which I don't want. But It seems I can't set -col 1 because there are some 2-column pages in the PDF. So I wonder if I can set diffierent value of max column to diffierent pages (I remember -cbox has this function) or is there any other solution to my problem? Can anyone help me? Thanks a lot.
Chen Megatroon is offline   Reply With Quote
Advert
Old 01-11-2017, 06:00 PM   #1341
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,272
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by Chen Megatroon View Post
Hi, I meet some problem with the command -col. In the converted file, a paragraph is dived into 2 column, which I don't want. But It seems I can't set -col 1 because there are some 2-column pages in the PDF. So I wonder if I can set diffierent value of max column to diffierent pages (I remember -cbox has this function) or is there any other solution to my problem? Can anyone help me? Thanks a lot.
Can you post an example from the source file--both the page that has the paragraph that you don't want divided and a page or two with legitimate 2-column text? There is probably a setting you can adjust. Maybe look through the -c... options, e.g. -cg, -cgmax, -ch.
willus is offline   Reply With Quote
Old 01-12-2017, 12:27 AM   #1342
Chen Megatroon
Junior Member
Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.Chen Megatroon has a propeller beanie that spins backward.
 
Posts: 3
Karma: 61000
Join Date: Jan 2017
Device: New Kindle
Quote:
Originally Posted by willus View Post
Can you post an example from the source file--both the page that has the paragraph that you don't want divided and a page or two with legitimate 2-column text? There is probably a setting you can adjust. Maybe look through the -c... options, e.g. -cg, -cgmax, -ch.
Thanks for your help! I have fixed it using -cg.
Chen Megatroon is offline   Reply With Quote
Old 01-21-2017, 04:17 AM   #1343
fortea
Junior Member
fortea is faster than slow light.fortea is faster than slow light.fortea is faster than slow light.fortea is faster than slow light.fortea is faster than slow light.fortea is faster than slow light.fortea is faster than slow light.fortea is faster than slow light.fortea is faster than slow light.fortea is faster than slow light.fortea is faster than slow light.
 
Posts: 8
Karma: 29174
Join Date: Nov 2015
Location: Italy
Device: Kindle 2014 7th generation 5.6.5
Hi all!
I would like to use k2pdfopt to get a pdf with one slide per page from a document with 6 slides per page.

I tried to use the option "-comax -1" but it doesn't seems to work. I'm using k2pdfopt version 2.34a on Manjaro (Linux Arch based).

I attach a sample pdf.

Thanks in advance!

-------------------------------------------------------------------------------------

I managed to crop correctly the document using "-grid" option, so take this post as an issue segnalation and not as a help request
Attached Files
File Type: pdf k2pdfopt_printed_ev.pdf (413.7 KB, 169 views)
File Type: pdf k2pdfopt_printed_ev_k2opt.pdf (100.6 KB, 188 views)

Last edited by fortea; 01-21-2017 at 05:32 AM.
fortea is offline   Reply With Quote
Old 01-21-2017, 10:35 AM   #1344
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,272
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by fortea View Post
Hi all!
I would like to use k2pdfopt to get a pdf with one slide per page from a document with 6 slides per page.

I tried to use the option "-comax -1" but it doesn't seems to work. I'm using k2pdfopt version 2.34a on Manjaro (Linux Arch based).

I attach a sample pdf.

Thanks in advance!

-------------------------------------------------------------------------------------

I managed to crop correctly the document using "-grid" option, so take this post as an issue segnalation and not as a help request
You have to use the -grid or -cbox options, as you correctly figured out. The "-comax -1" option only works when the column divider changes positions, which it does not in your case. See the help page on it.
willus is offline   Reply With Quote
Old 01-30-2017, 08:13 AM   #1345
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
landscape mode suggestion

First, thanks for your great tool. I have a feature suggestion for landscape mode.

Currently, "fitwidth" mode is implemented by rotating the output content 90 degree. While the user can rotate his device to landscape orientation to read the book, the device still think it is in portrait orientation. This posed UI problems. (see fitwidth.png)
1. The page count, menu, and any UI elements are still in portrait orientation.
2. The page-flip virtual buttons are on top and bottom instead of left and right.

My feature suggestion: add a new landscape mode, which rotating page size instead of rotating content. In this mode, I can use the "landscape mode" feature of my device.
Conceptually, this feature could be done by swapping the value of -w and -h.
For example, the original size of my device, paperwhite2, is -w 718 -h 965, so use -w 965 -h 718 instead.

However, "-w 965 -h 718" doesn't work well for me. Because the visible area size in device's landscape mode is different to the size in device's portrait mode, the result page looks distortion due to scaling.

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

From my test, "-w 931 -h 690" is good value for paperwhite2.
My test pdf and result are attached.
test_native_landscape.pdf is my source pdf.
k2pdfopt command is -dev kpw -wrap- -bp -h 690 -w 931 -ws 0.2
test_native_landscape_k2opt.png is the result screenshot.

p.s. there are small dark pixels on the right side. I guess they are due to the size of my source pdf is not perfect aligned with k2pdfopt's expectation. (they already exist in test_native_landscape_k2opt.pdf)
Attached Thumbnails
Click image for larger version

Name:	fitwidth.png
Views:	177
Size:	167.3 KB
ID:	154635   Click image for larger version

Name:	test_native_landscape_k2opt.png
Views:	199
Size:	13.1 KB
ID:	154638  
Attached Files
File Type: pdf test_native_landscape.pdf (12.3 KB, 189 views)
File Type: pdf test_native_landscape_k2opt.pdf (11.1 KB, 186 views)

Last edited by Kuang-che Wu; 01-30-2017 at 08:21 AM.
Kuang-che Wu is offline   Reply With Quote
Old 01-31-2017, 06:19 AM   #1346
G400S
Junior Member
G400S began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2017
Device: Pocketbook Touch Lux 2
I want to optimize a PDF book to use on my Pocketbook Touch Lux 2.

Native mode seems to be the way to go, but whatever I do, it only resizes the titles and the rest of the text remains unchanged (see screenshots). I want to use a 0.5" bottom margin because reasons. I also want to set fixed output font size because the font is too small without it. Is there anything I can do?

Non-native mode works fine and after some experimentation I was able to make the output look decent.


If the full size image doesn't show at first, just refresh the page.


Last edited by G400S; 01-31-2017 at 06:23 AM.
G400S is offline   Reply With Quote
Old 01-31-2017, 08:52 AM   #1347
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,272
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by Kuang-che Wu View Post
First, thanks for your great tool. I have a feature suggestion for landscape mode...
...
p.s. there are small dark pixels on the right side. I guess they are due to the size of my source pdf is not perfect aligned with k2pdfopt's expectation. (they already exist in test_native_landscape_k2opt.pdf)
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-.
willus is offline   Reply With Quote
Old 01-31-2017, 08:54 AM   #1348
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,272
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by G400S View Post
I want to optimize a PDF book to use on my Pocketbook Touch Lux 2.

Native mode seems to be the way to go, but whatever I do, it only resizes the titles and the rest of the text remains unchanged (see screenshots). I want to use a 0.5" bottom margin because reasons. I also want to set fixed output font size because the font is too small without it. Is there anything I can do?

Non-native mode works fine and after some experimentation I was able to make the output look decent.
Text cannot be re-flowed in native output, so that is why it can't be displayed any larger than it is. You can either rotate the display to landscape mode so that you have more display width (which you have probably already tried), or do what you did and not use native mode.
willus is offline   Reply With Quote
Old 01-31-2017, 11:06 AM   #1349
G400S
Junior Member
G400S began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2017
Device: Pocketbook Touch Lux 2
Question

Quote:
Originally Posted by willus View Post
Text cannot be re-flowed in native output, so that is why it can't be displayed any larger than it is. You can either rotate the display to landscape mode so that you have more display width (which you have probably already tried), or do what you did and not use native mode.
I see, but why does JUST the title get enlarged? Could it be a different kind of... object or whatever it's called?
G400S is offline   Reply With Quote
Old 01-31-2017, 10:21 PM   #1350
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,272
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by G400S View Post
I see, but why does JUST the title get enlarged? Could it be a different kind of... object or whatever it's called?
k2pdfopt is trying to accomodate your request to have a uniform font size within the constraint of native mode output, which means it cannot re-flow text. That means it can only size up the main body of text until it fits the width of your device, and no larger. The titles, because they aren't as wide as the main body of text, can be sized larger and more closely to your desired font size, and still fit completely within the width of your device.

You might try clicking the "Generate marked up source" check box and clicking the preview button. It will show you how k2pdfopt is parsing your source document.
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 12:15 PM.


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