Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 03-30-2020, 12:27 PM   #1771
droopy
Guru
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: 833
Karma: 2912460
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   #1772
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,274
Karma: 11087488
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
Advert
Old 03-31-2020, 05:40 PM   #1773
droopy
Guru
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: 833
Karma: 2912460
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   #1774
droopy
Guru
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: 833
Karma: 2912460
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   #1775
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
Advert
Old 04-18-2020, 04:37 PM   #1776
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,274
Karma: 11087488
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:	269
Size:	170.9 KB
ID:	178523  
Attached Files
File Type: pdf src_marked.pdf (1.11 MB, 247 views)
File Type: pdf src_k2opt.pdf (547.1 KB, 260 views)
willus is offline   Reply With Quote
Old 04-24-2020, 12:01 PM   #1777
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   #1778
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   #1779
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,274
Karma: 11087488
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   #1780
Shohreh
Zealot
Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.
 
Posts: 148
Karma: 192898
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:	203
Size:	33.0 KB
ID:	179058  
Shohreh is offline   Reply With Quote
Old 05-03-2020, 07:28 PM   #1781
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,274
Karma: 11087488
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:	224
Size:	205.8 KB
ID:	179066  
willus is offline   Reply With Quote
Old 05-04-2020, 09:16 AM   #1782
Shohreh
Zealot
Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.
 
Posts: 148
Karma: 192898
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   #1783
Shohreh
Zealot
Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.
 
Posts: 148
Karma: 192898
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:	216
Size:	101.8 KB
ID:	179085  
Shohreh is offline   Reply With Quote
Old 05-04-2020, 09:13 PM   #1784
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,274
Karma: 11087488
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
Old 05-05-2020, 01:25 PM   #1785
Shohreh
Zealot
Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.Shohreh can program the VCR without an owner's manual.
 
Posts: 148
Karma: 192898
Join Date: Jan 2016
Device: none
Thanks for the offer: https://we.tl/t-KA9InMaCCd

It looks much better. I just need to leave a bit more on the right, before merging the pages back into a single PDF.

k2pdfopt input.pdf -m 0.8 -mode fw -ls- -o output.pdf -p 30-40,70-75

--
Edit: While we're at it: Can k2pdfopt crop such and such page, and then turn them into pictures in place, without having to do this myself?

ie.
1. Use k2 to crop margins and rescale text
2. Export those pages
3. Convert to PNG
4. Convert to PDF
5. Merge all pages into hybrid PDF (text + pics)

Or maybe k2 can massage the PDF in such as way that there's simply no need to turn problematic pages into pictures (eg. tables, insets, etc.)?
Attached Thumbnails
Click image for larger version

Name:	C7C208E7-C147-4ADE-9835-5C0798733AD9.png
Views:	227
Size:	65.7 KB
ID:	179092  

Last edited by Shohreh; 05-05-2020 at 02:26 PM.
Shohreh 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 08:52 PM.


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