Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 09-23-2018, 02:06 PM   #1591
Fedex15
Junior Member
Fedex15 My eyes! My eyes! The light is just too bright!Fedex15 My eyes! My eyes! The light is just too bright!Fedex15 My eyes! My eyes! The light is just too bright!Fedex15 My eyes! My eyes! The light is just too bright!Fedex15 My eyes! My eyes! The light is just too bright!Fedex15 My eyes! My eyes! The light is just too bright!Fedex15 My eyes! My eyes! The light is just too bright!Fedex15 My eyes! My eyes! The light is just too bright!Fedex15 My eyes! My eyes! The light is just too bright!Fedex15 My eyes! My eyes! The light is just too bright!Fedex15 My eyes! My eyes! The light is just too bright!
 
Posts: 2
Karma: 80132
Join Date: Sep 2018
Device: Kindle Paperwhite
Quote:
Originally Posted by willus View Post
Thanks for the PM. The page breaks are happening because you have a bookmark pointing to almost every page. Add -bp-- to your "additional options" box.

It Worked! Thank you so much!
Fedex15 is offline   Reply With Quote
Old 10-13-2018, 06:36 AM   #1592
isaacbh
Connoisseur
isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.isaacbh makes omelettes without breaking eggs.
 
Posts: 57
Karma: 98196
Join Date: Mar 2015
Location: Israel
Device: Kobo Aura H20
Hello, is there a way to darken the text without affecting the images? Currently I use -g 0.3 which is great for the text but not for the images...
isaacbh is offline   Reply With Quote
Old 10-13-2018, 07:41 PM   #1593
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 isaacbh View Post
Hello, is there a way to darken the text without affecting the images? Currently I use -g 0.3 which is great for the text but not for the images...
Sorry--there is no present way to treat the image differently from the text with regards to darkening.
willus is offline   Reply With Quote
Old 10-22-2018, 10:32 AM   #1594
MarjaE
Guru
MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.MarjaE ought to be getting tired of karma fortunes by now.
 
Posts: 924
Karma: 53902736
Join Date: Jun 2015
Device: multiple
Is there a way to run k2pdfopt without chopping text up?

Sorry if someone else has already asked this. But I've found k2pdf makes it much harder to select text from some pdfs. Sentences end up out of order, and some words end up impossible to select.
MarjaE is offline   Reply With Quote
Old 10-29-2018, 08:24 PM   #1595
msh2050
Enthusiast
msh2050 is often consulted by the I Ching.msh2050 is often consulted by the I Ching.msh2050 is often consulted by the I Ching.msh2050 is often consulted by the I Ching.msh2050 is often consulted by the I Ching.msh2050 is often consulted by the I Ching.msh2050 is often consulted by the I Ching.msh2050 is often consulted by the I Ching.msh2050 is often consulted by the I Ching.msh2050 is often consulted by the I Ching.msh2050 is often consulted by the I Ching.
 
Posts: 27
Karma: 122330
Join Date: Sep 2017
Device: ipad , Kindle PW3
Quote:
Originally Posted by willus View Post
I haven't tested that feature in quite a while. It looks like it is not working correctly now. I have logged it as a bug.
any update?
msh2050 is offline   Reply With Quote
Old 10-30-2018, 08:39 AM   #1596
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 msh2050 View Post
any update?
No--sorry. I do not have as much time to update k2pdfopt these days.
willus is offline   Reply With Quote
Old 10-30-2018, 10:44 PM   #1597
Russell.z
Junior Member
Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'
 
Posts: 3
Karma: 42206
Join Date: Oct 2018
Device: Kindle oasis 2
Hi I have a problem with reflow text where the text is reshaped but the lines are not arranged as they overlap with each other as in the pictures

Click image for larger version

Name:	sketch-1540952832894.jpg
Views:	174
Size:	274.6 KB
ID:	167336

Click image for larger version

Name:	sketch-1540952891213.jpg
Views:	162
Size:	204.9 KB
ID:	167337

Click image for larger version

Name:	sketch-1540952924878.jpg
Views:	208
Size:	214.2 KB
ID:	167338
Russell.z is offline   Reply With Quote
Old 10-31-2018, 08:12 AM   #1598
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 Russell.z View Post
Hi I have a problem with reflow text where the text is reshaped but the lines are not arranged as they overlap with each other as in the pictures
Can you post or PM to me the source PDF? It is hard to tell what is going on from the posted photos.
willus is offline   Reply With Quote
Old 10-31-2018, 09:56 AM   #1599
Russell.z
Junior Member
Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'
 
Posts: 3
Karma: 42206
Join Date: Oct 2018
Device: Kindle oasis 2
this is ch 6 pdf
the line is overlap i cant use reflow text
please can you give me setting
can used to convert pdf with large font
Attached Thumbnails
Click image for larger version

Name:	Screenshot (1).png
Views:	189
Size:	120.2 KB
ID:	167360  
Attached Files
File Type: pdf ch 6.pdf (157.0 KB, 181 views)
File Type: pdf ch 6_k2opt.pdf (81.7 KB, 184 views)
Russell.z is offline   Reply With Quote
Old 11-01-2018, 11:29 PM   #1600
Russell.z
Junior Member
Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'Russell.z understands when you whisper 'The dog barks at midnight.'
 
Posts: 3
Karma: 42206
Join Date: Oct 2018
Device: Kindle oasis 2
Unhappy

Quote:
Originally Posted by willus View Post
Can you post or PM to me the source PDF? It is hard to tell what is going on from the posted photos.
😢☹
Russell.z is offline   Reply With Quote
Old 11-02-2018, 09:36 AM   #1601
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 Russell.z View Post
this is ch 6 pdf
the line is overlap i cant use reflow text
please can you give me setting
can used to convert pdf with large font
Russell--try the command below (settings also in attached screen shot).

k2pdfopt -as -de 2 -dev kv -col 1 -bpc 1 -vls -3 -vb 1.25 -fc- -mag 2 ch6.pdf

I've attached the result. Some comment about your conversions:
1. I don't think the _k2opt file you posted was converted with the options shown in your previous post. When I tried using your exact same options, I got a very different result. You were clearly using a higher output DPI than 300 or a higher -mag value than 1.
2. Do not use -r for English left-to-right text. It is intended for use with Arabic and other languages that are read from right to left. This is the main reason you were seeing the strange word breaks.
3. I added -as to auto-straighten (de-skew) your text. It was slightly skewed, which makes breaking the lines less reliable.
4. I added -de to try and remove speckles / small artifacts since your scan quality is not very good.
5. You don't need to use -ac (autocrop), at least in the example you sent. It's really more for when you have dark edges at the very edge of your PDF due to poor copying of the original.
6. I removed several options you specified that I felt either weren't necessary or were using the default values anyway.
7. You can adjust the value of the -mag option to change the font size in the output.
8. Not sure you really needed the -vls, -vb, or -bpc options, but I left them in. -bpc 1 will make the output file size smaller if that's what you want--it does 1-bit color resolution. Each pixel can therefore be only black or white--no grayscale. The -vls and -vb options don't really impact this particular conversion.
Attached Thumbnails
Click image for larger version

Name:	screenshot.png
Views:	164
Size:	201.7 KB
ID:	167394  
Attached Files
File Type: pdf ch6_k2opt.pdf (417.4 KB, 186 views)

Last edited by willus; 11-02-2018 at 09:39 AM. Reason: Added #8.
willus is offline   Reply With Quote
Old 11-04-2018, 01:15 PM   #1602
polarisrising
Junior Member
polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'
 
Posts: 5
Karma: 42206
Join Date: Nov 2018
Device: kindle paperwhite 3
No sure what I'm missing

I'm having some trouble converting a pdf and I was hoping I could get some advice. My goal is to turn a pdf with varying 2-column and 1-column text blocks, into a single column .epub. My thought process was to first run the pdf through k2pdfopt to generate the ocr correctly, in a single column, then run it through calibre.

I'm using k2pdfopt in terminal, on Arch Linux and I have Tesseract setup correctly. Here are my arguments:

Code:
-m 0.1in,0.8in,0.1in,0.2in -ocr t -ocrhmax .4 -ocrvis t -n- -wrap- -ws -.5 inmemoriarichar00kirk.pdf
Attached is the original pdf and the output that I'm getting.

Basically, the ocr font looks very squished and distorted, and when I run it through calibre, it's treating the work gaps as new <p>.

Thanks!
Attached Files
File Type: pdf inmemoriamrichar00kirk.pdf (6.61 MB, 393 views)
File Type: pdf inmemoriamrichar00kirk_k2opt.pdf (122.0 KB, 185 views)
polarisrising is offline   Reply With Quote
Old 11-04-2018, 08:05 PM   #1603
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 polarisrising View Post
I'm having some trouble converting a pdf and I was hoping I could get some advice. My goal is to turn a pdf with varying 2-column and 1-column text blocks, into a single column .epub. My thought process was to first run the pdf through k2pdfopt to generate the ocr correctly, in a single column, then run it through calibre.

I'm using k2pdfopt in terminal, on Arch Linux and I have Tesseract setup correctly. Here are my arguments:

Code:
-m 0.1in,0.8in,0.1in,0.2in -ocr t -ocrhmax .4 -ocrvis t -n- -wrap- -ws -.5 inmemoriarichar00kirk.pdf
Attached is the original pdf and the output that I'm getting.

Basically, the ocr font looks very squished and distorted, and when I run it through calibre, it's treating the work gaps as new <p>.
You don't need to use Tesseract OCR. Your PDF already has an OCR layer. I'd do something like this:

k2pdfopt -m 0.1in,0.34in,0.05in,0.25in -mode 2col inmemoriamrichar00kirk.pdf

Because the page isn't always in the same place, the -m selection is difficult if you want to crop off the page numbers and horizontal lines. You might add -ehl to erase horizontal lines.
willus is offline   Reply With Quote
Old 11-05-2018, 11:36 AM   #1604
polarisrising
Junior Member
polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'polarisrising understands when you whisper 'The dog barks at midnight.'
 
Posts: 5
Karma: 42206
Join Date: Nov 2018
Device: kindle paperwhite 3
Thanks a bunch! Those settings seem to be working, but when I go to import it into Calibre, it's a complete mess. None text is showing up and the pdf is only full of images that are distorted. I figure that's just a Calibre problem, which I'll tinker with, but i wondered if it had to do with how the OCR is being handled.

Last edited by polarisrising; 11-05-2018 at 11:48 AM.
polarisrising is offline   Reply With Quote
Old 11-05-2018, 09:13 PM   #1605
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 polarisrising View Post
Thanks a bunch! Those settings seem to be working, but when I go to import it into Calibre, it's a complete mess. None text is showing up and the pdf is only full of images that are distorted. I figure that's just a Calibre problem, which I'll tinker with, but i wondered if it had to do with how the OCR is being handled.
You might try adding -n- to turn off native mode and see if that works any better moving it into calibre. You can try it on just a few pages as a test, e.g. -p 10-20. I suggest this just because when you turn off native mode, k2pdfopt saves the PDF very differently--using bitmaps and its own k2pdfopt-generated OCR layer (extracted from the original OCR layer) rather than just "crop instructions" applied to the original source PDF.

Last edited by willus; 11-05-2018 at 09:16 PM. Reason: Added more explanation
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 09:36 AM.


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