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 03-20-2020, 09:51 PM   #1771
kmoll
Member
kmoll understands when you whisper 'The dog barks at midnight.'kmoll understands when you whisper 'The dog barks at midnight.'kmoll understands when you whisper 'The dog barks at midnight.'kmoll understands when you whisper 'The dog barks at midnight.'kmoll understands when you whisper 'The dog barks at midnight.'kmoll understands when you whisper 'The dog barks at midnight.'kmoll understands when you whisper 'The dog barks at midnight.'kmoll understands when you whisper 'The dog barks at midnight.'kmoll understands when you whisper 'The dog barks at midnight.'kmoll understands when you whisper 'The dog barks at midnight.'kmoll understands when you whisper 'The dog barks at midnight.'
 
Posts: 13
Karma: 42646
Join Date: Mar 2020
Device: BQ Cervantes 4
Quote:
Originally Posted by willus View Post
I sent you a private message. The highlighting thing is a known bug. I'm working on a bug-fix release, but it's slow. To get the words closer together, you need to turn off full justification:

k2pdfopt -j 0- ... (that's a zero, not an 'O').
Awesome! Both issues solved. Again, thank you very much!!
kmoll is offline   Reply With Quote
Old 03-30-2020, 12:27 PM   #1772
droopy
Evangelist
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 445
Karma: 800008
Join Date: Apr 2009
Device: Kobo Forma
I just learned about this a few days ago and am so excited to get it working on my Linux computer with some GUI.
Willus, just wanted to tell you that the online K2PDFOPT On-line link (http://convert-kindle.com/) on https://www.willus.com/k2pdfopt/contrib/ is dead.
droopy is offline   Reply With Quote
Old 03-30-2020, 11:07 PM   #1773
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,118
Karma: 8504331
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by droopy View Post
I just learned about this a few days ago and am so excited to get it working on my Linux computer with some GUI.
Willus, just wanted to tell you that the online K2PDFOPT On-line link (http://convert-kindle.com/) on https://www.willus.com/k2pdfopt/contrib/ is dead.
Thanks. Fixed. Wallauer's site went away, too.
willus is offline   Reply With Quote
Old 03-31-2020, 05:40 PM   #1774
droopy
Evangelist
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 445
Karma: 800008
Join Date: Apr 2009
Device: Kobo Forma
So glad that the college's computer lab is still open at this time.
So glad that I was able to run both k2pdfopt and k2pdfopt GUI 2.0. (Like when I run k2Updater (in the k2pdfopt GUI 2.0 folder), whech says that the application is blocked)
droopy is offline   Reply With Quote
Old 04-02-2020, 06:47 PM   #1775
droopy
Evangelist
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 445
Karma: 800008
Join Date: Apr 2009
Device: Kobo Forma
Hi Willus,
I've tried k2pdfopt_GUI_2.0 but I stick with your program because of the preview. The GUI_2.0 program doesn't have a preview.

A program called "GUI" should not be removing "pictures" (the preview box) from a program that it's supposed to improve.
droopy is offline   Reply With Quote
Old 04-12-2020, 04:29 PM   #1776
Kule
Member
Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!
 
Kule's Avatar
 
Posts: 10
Karma: 80572
Join Date: Jan 2018
Device: Sony DPT-RP1
PDF conversion

Hello again Willys,

I encountered issue with one book that has white margins every page (placed left on the odd pages, and right on the even pages).

I tried to crop these and to preserve page count, but no luck so far.
Here are the settings I used:
https://ibb.co/hK732gy

I sent you the source file on PM the following:
1) original PDF file (4 pages)
2) my converted result after additional tinkering with crop settings Adobe DC Pro (as it looks on the Sony DPT RP1).

To conclude, which settings should I use in order to stretch pages without any white margins on both sides (preferably to preserve original page count)?

Thanks for help
Kule is offline   Reply With Quote
Old 04-18-2020, 04:37 PM   #1777
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,118
Karma: 8504331
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by Kule View Post
Hello again Willys,

I encountered issue with one book that has white margins every page (placed left on the odd pages, and right on the even pages).

I tried to crop these and to preserve page count, but no luck so far.
Here are the settings I used:
https://ibb.co/hK732gy

I sent you the source file on PM the following:
1) original PDF file (4 pages)
2) my converted result after additional tinkering with crop settings Adobe DC Pro (as it looks on the Sony DPT RP1).

To conclude, which settings should I use in order to stretch pages without any white margins on both sides (preferably to preserve original page count)?

Thanks for help
Sorry for taking so long to get back to you. Best bet is to crop out the footer and side margins of each page so that the cropped page fits your device better. I used one crop rectangle for odd pages and a different one for even pages. Then use the -mode fitpage (as you already figured out) so that you preserve the page count. See attached screenshot, marked source, and conversion file.
Attached Thumbnails
Click image for larger version

Name:	rec_settings.png
Views:	31
Size:	170.9 KB
ID:	178523  
Attached Files
File Type: pdf src_marked.pdf (1.11 MB, 23 views)
File Type: pdf src_k2opt.pdf (547.1 KB, 17 views)
willus is offline   Reply With Quote
Old 04-24-2020, 12:01 PM   #1778
Kule
Member
Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!Kule My eyes! My eyes! The light is just too bright!
 
Kule's Avatar
 
Posts: 10
Karma: 80572
Join Date: Jan 2018
Device: Sony DPT-RP1
Thank you very much it helped and solved the issue!
Kule is offline   Reply With Quote
Old 04-30-2020, 02:22 PM   #1779
nlundberg
Connoisseur
nlundberg herds cats with both ease and gracenlundberg herds cats with both ease and gracenlundberg herds cats with both ease and gracenlundberg herds cats with both ease and gracenlundberg herds cats with both ease and gracenlundberg herds cats with both ease and gracenlundberg herds cats with both ease and gracenlundberg herds cats with both ease and gracenlundberg herds cats with both ease and gracenlundberg herds cats with both ease and gracenlundberg herds cats with both ease and grace
 
Posts: 56
Karma: 43090
Join Date: Jan 2013
Location: Sweden
Device: Cybook Odyssey HD Frontlight, Calibre, Macbook pro, OSX 10.6.8
This is such great piece of application, thanks! Its so nice to be able to read anything I want on my arcane e-reader (cybook odyssey HD frontlight).

Some questions (for command line/osx):

If I want to do another pass with some other options, for example ocr, but not wrap/reflow, what options should I set?

Can K2PDFOPT be used to create a TOC?

I am converting a DJVU book, btw.
nlundberg is offline   Reply With Quote
Old 05-01-2020, 09:52 PM   #1780
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,118
Karma: 8504331
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by nlundberg View Post
If I want to do another pass with some other options, for example ocr, but not wrap/reflow, what options should I set?

Can K2PDFOPT be used to create a TOC?

I am converting a DJVU book, btw.
You can always do multiple passes. Just run k2pdfopt on the file that it just created. You don't have to do a second pass just for OCR. You can just turn on OCR on whatever conversion you do. If you don't want re-flow, use -wrap- as the command-line option to turn it off.

Yes, you can definitely add a TOC. See the the -toclist option in the command-line usage help page. You can supply it with a text file that you can create in a simple text editor (e.g. Notepad in Windows).
willus is offline   Reply With Quote
Old 05-03-2020, 05:29 PM   #1781
Shohreh
Connoisseur
Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'
 
Posts: 52
Karma: 42650
Join Date: Jan 2016
Device: none
Question

Hello,

For enhanced reading of PDFs on an e-reader, I'd like to 1) remove the margins, 2) turn the pages into pictures (PNG), and 3) merge all those pictures back into a PDF file.

For Step 1, I tried cpdf, but I can't figure it out (-mediabox, -cropbox, -hard-box).

Alternatively, it looks like k2pdfopt can do it (-cbox, -grid): Is it correct?

I need a Windows32 application, ideally, a single EXE instead of eg. Java. Hence my not looking at Briss.

Thank you.
Attached Thumbnails
Click image for larger version

Name:	2A474B12-B1A6-4FD0-BDED-71B6A7ECB761.png
Views:	9
Size:	33.0 KB
ID:	179058  
Shohreh is offline   Reply With Quote
Old 05-03-2020, 07:28 PM   #1782
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,118
Karma: 8504331
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by Shohreh View Post
Hello,

For enhanced reading of PDFs on an e-reader, I'd like to 1) remove the margins, 2) turn the pages into pictures (PNG), and 3) merge all those pictures back into a PDF file.

For Step 1, I tried cpdf, but I can't figure it out (-mediabox, -cropbox, -hard-box).

Alternatively, it looks like k2pdfopt can do it (-cbox, -grid): Is it correct?

I need a Windows32 application, ideally, a single EXE instead of eg. Java. Hence my not looking at Briss.

Thank you.
Yes, I think k2pdfopt checks off all of your boxes. Select your source file, then check off the crop areas check box and click "select" to choose your crop region to remove the margins. For conversion mode, select "fitpage", and then uncheck the "Native PDF output" if you want the output to be PNG bitmaps assembled into the PDF (rather than the original PDF content). See attached screen shot. You might want to watch the video(s) from the help pages.
Attached Thumbnails
Click image for larger version

Name:	screenshot.png
Views:	12
Size:	205.8 KB
ID:	179066  
willus is offline   Reply With Quote
Old 05-04-2020, 09:16 AM   #1783
Shohreh
Connoisseur
Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'
 
Posts: 52
Karma: 42650
Join Date: Jan 2016
Device: none
Thanks. I forgot to say I need to call it through the CLI in a batch script to trim a bunch of pages.

Would you have an example?

Code:
C:\k2pdfopt>k2pdfopt.exe /?

k2pdfopt v2.51a (w/MuPDF,DjVuLibre,OCR) (c) 2019, GPLv3, http://willus.com
    Compiled Jan  4 2019 with Gnu C (Mingw32) v7.3.0 for Win32 on i386.

 a. Autostraighten (-as)                 n. Native PDF output (-n)
 b. Bitmap type (-jpg,-png,-bpc)         o. Output name (-o)
bp. Break pages (-bp,-f2p)              oc. OCR (-ocr,-ocrvis,...)
 c. Color/Negative output (-c, -neg)    om. Output margins (-om)
co. Column detection (-col,-ch,...)      p. Page range (-p)
cs. Contrast/Sharpen (-cmax,-g,-s,-wt)  pd. Padding/Marking (-p[lrbt],-mc)
 d. Device selection (-dev,-h,-w,-dpi)   r. Right-to-left page scans (-r)
ds. Document scale factor (-ds)         rt. Rotate source page (-sr)
 f. Fit to single column (-fc)           s. Special (-de,-evl,-gs)
gt. Gap thresholds (-gt...)             sm. Show marked source (-sm)
 j. Justification (-j)                   u. Usage (command line opts)
 l. Landscape mode (-ls)                 v. Vertical spacing (-vb,-vs)
 m. Margin to ignore (-m)                w. Wrap/Reflow text (-wrap,-ws)
mo. Mode (-mode)                         x. Exit on completion (-x)

Selected options:  /?
Shohreh is offline   Reply With Quote
Old 05-04-2020, 09:25 AM   #1784
Shohreh
Connoisseur
Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'Shohreh understands when you whisper 'The dog barks at midnight.'
 
Posts: 52
Karma: 42650
Join Date: Jan 2016
Device: none
The following doesn't do what I want, which is keep the original layout but simply remove the margins and widen the text to fit :

Code:
k2pdfopt input.pdf -m 0.8 -o output.pdf -p 30-40,70-75
Attached Thumbnails
Click image for larger version

Name:	C03EE286-9A8B-4E1D-AAC4-F50A872A7F22.png
Views:	12
Size:	101.8 KB
ID:	179085  
Shohreh is offline   Reply With Quote
Old 05-04-2020, 09:13 PM   #1785
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,118
Karma: 8504331
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by Shohreh View Post
The following doesn't do what I want, which is keep the original layout but simply remove the margins and widen the text to fit :

Code:
k2pdfopt input.pdf -m 0.8 -o output.pdf -p 30-40,70-75
Try this:

k2pdfopt -m 0.8 -mode fw -ls-

You can see what these options do on my command options listing page

PS. If you want to post a few pages from your source PDF file, I can verify what works best.
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 02:32 AM.


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