02-01-2024, 12:48 PM | #1 |
Wizard
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
[GUI Plugin] K2pdfopt Plugin
This plugin used k2pdfopt program to convert PDFs to an optimized version that can be read on ereaders
How the plugin works
Modifying metadata of added books
Notes
Running the plugin outside calibre
Warning
Credits:
Installation Notes:
Special Notes:
Paypal Donations: Version History: Spoiler:
Last edited by capink; 05-05-2024 at 12:22 PM. Reason: version 0.5.4 |
02-04-2024, 07:36 AM | #2 |
Wizard
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
reserved.
|
Advert | |
|
02-05-2024, 08:40 AM | #3 |
Wizard
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Version 0.2.0
Version 0.2.0
Notes:
|
02-14-2024, 06:45 PM | #4 |
Wizard
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Version 0.2.0
Version 0.2.0
|
02-17-2024, 01:08 AM | #5 |
Enthusiast
Posts: 38
Karma: 10
Join Date: Nov 2023
Device: Kindle Oasis
|
hi, i'm having problems.
i don't the binary part. i downloaded the .exe form the web and put it in "Choose binary". Now every time i click the plugin icon it opens 2 windows |
Advert | |
|
02-17-2024, 02:43 AM | #6 | ||
Connoisseur
Posts: 57
Karma: 2378
Join Date: Jul 2018
Location: CA, USA.
Device: Kindle Paperwhite Signature Edition and Samsung 10.1 tablet
|
Quote:
its missing the plugin does seem to be missing settings that the program has like that OCR (Tesseract) feature it has within the program itself the plugin is missing that and its missing Fixed output font size, which I am not sure that even works or not, I don't really know if it affects pdf fonts in the images at all, but without OCR on the pdf files cannot use in edge and read aloud feature doesn't work for pdf without having OCRing the pdf , which does work well with pdf and text to speech, for me, it's one of the few OCR apps that seem to work well, it's a nice idea this plugin but I do think it needs work I guess. I have x64 version of Calibre 7.5.1 and the 32x bit version calibre-5.44.0 for the text to speech voices that don't show up in Calibre's Ebook Viewer on the x64 app, both seem to work fine together, this plugin was added in 7.5.1 build of Calibre software, I am guessing the person who also has it installed is using the current version too on their pc. I had to manually setup a save for Presets: Default profile, as it didn't come with a save value and each time I open k2pdfopt Plugin I have to reopen the Default profile, otherwise it doesn't remember my settings when the plugin is opened, that might need to be fixed in future builds, again I like the idea of this plugin it just needs some updates, looking forward to seeing its progress, and thanks for the plugin https://www.willus.com/k2pdfopt/ https://www.willus.com/k2pdfopt/download/?-1 https://willus.com/k2pdfopt/contrib/ So, I tried that k2pdfoptgui 2.0 from k2pdfoptgui2_1_0_0,zip from contrib website it seems to get this message with the official 64bit downloads, it doesn't seem to want to output a pdf from that software? ok I think it doesn't work since it was last updated Last update: v2.1.0.0, Jan 2014 which is older than k2pdfopt.exe 2.55 version, I guess that makes sense why it doesn't work anymore, not sure why there is still a link to it on that page? Quote:
https://www.mobileread.com/forums/sh...d.php?t=144711 v2.55 (December 26, 2023) windows 64bit app, and it has the gui in it, not sure if their a console only version as I don't see it on Willus.com's K2pdfopt Download Page, I am pretty sure this is the correct homepage for K2pdfopt app, I don't see a console only version, I am not sure if this plugin is looking for a console only version, is their a github page for K2pdfopt that might have a console only version of it? anyway again thanks for the plugin Also, this is a good read below on OCR and tesseract, which might be helpful. https://www.willus.com/blog.shtml?tesseract_accuracy one thing I am not sure about when it comes to tesseract is done k2pdfopt 2.55 default to using Tesseract v5.3 "best" or is there a setting somewhere you need to tell it to use, also is the newest version the best when converting pdf files that don't have OCR in them? since the click on box doesn't have much of the way of settings for OCR besides 50% CPUs and Fast button, I noticed that clicking on Fast button seems to make it better for pdf files and edge's read aloud feature, otherwise if Fast is not clicked on its not better at reading back words, I am not sure why this is, since I would think Fast is a lower quality but it seems to help it to read some words in some pdfs files, for me at least I had noticed that. I am running this software on a 12th Gen Intel® Core™ i9-12900K processor, that what's in my pc if that info helps at all. The latest installer can be downloaded here: for this I just found this windows installer, I don't know if k2pdfop will use the tesseract if installed or if it only uses its own built in one, since I didn't have it installed when using the OCR option in the app, ok I might of installed it but I forgot that I did already have a version installed does k2pdfop use this directly or does it use its own version? tesseract-ocr-w64-setup-5.3.3.20231005.exe (64 bit) https://digi.bib.uni-mannheim.de/tes...3.20231005.exe https://github.com/UB-Mannheim/tesseract/wiki https://valid.x86.fr/sgnydq Last edited by KindleAZWorKFX; 02-17-2024 at 05:26 AM. Reason: added more details & links. good plugin and added features from the original app, that it accessing like OCR. links |
||
02-17-2024, 09:44 AM | #7 | ||||||
Wizard
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Quote:
Quote:
Code:
-ocr m -ocrlan eng You can use any other command line option you wish in the same way. I explained in another thread why I did not include the OCR option, so instead of repeating myself here, I quote what I said there: Quote:
Quote:
Quote:
I can give you a couple of pointers, regarding the fast option here is the relevant part from k2pdfopt help page: Quote:
Code:
-nt -50 Finally note, that as of now, the plugin is not tied to any particular version of k2pdfopt. You can use whatever version you want and it will be called by the plugin. Any missing options you want, just add as illustrated above in the OCR bit. Last edited by capink; 02-17-2024 at 12:02 PM. |
||||||
03-13-2024, 01:40 PM | #8 |
Junior Member
Posts: 3
Karma: 10
Join Date: Mar 2024
Device: Kindle Scribe
|
Does this plugin work on Mac OS? I am trying to use it on my 2020 Macbook Pro running Sonoma 14.2.1 and Calibre 6.15.1 (I haven't updated for fear of breaking other important plugins, ha).
I downloaded the MacOSX x86 64-bit file from the K2pdfopt webpage. When I get the initial dialogue on running the plugin where it asks me to choose binary, I select that file, and then receive the following error. Any support would be greatly appreciated as this seems very useful. calibre, version 6.15.1 ERROR: Unhandled exception: <b>NameError</b>:name 'iswindows' is not defined calibre 6.15.1 embedded-python: True macOS-14.2.1-x86_64-i386-64bit Darwin ('64bit', '') ('Darwin', '23.2.0', 'Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:10 PST 2023; root:xnu-10002.61.3~2/RELEASE_X86_64') Python 3.10.1 OSX: ('14.2.1', ('', '', ''), 'x86_64') Interface language: None Successfully initialized third party plugins: Gather KFX-ZIP (from KFX Input) (2, 9, 0) && DeDRM (10, 0, 3) && Package KFX (from KFX Input) (2, 9, 0) && K2pdfopt Plugin (0, 5, 2) && KFX metadata reader (from KFX Input) (2, 9, 0) && From KFX (2, 9, 0) && KFX Input (2, 9, 0) && Obok DeDRM (10, 0, 3) Traceback (most recent call last): File "calibre_plugins.k2pdfopt_plugin.gui.config", line 101, in _choose_file if iswindows: NameError: name 'iswindows' is not defined |
03-13-2024, 02:16 PM | #9 | |
Wizard
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Quote:
|
|
03-13-2024, 04:51 PM | #10 | |
Junior Member
Posts: 3
Karma: 10
Join Date: Mar 2024
Device: Kindle Scribe
|
Quote:
calibre, version 7.6.0 ERROR: Path not found: Unable to run k2pdfopt from specified location. Make sure you enter the right path and that the file has execution permissions |
|
03-13-2024, 05:21 PM | #11 | ||
Wizard
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Quote:
Quote:
Code:
chmod +x /path/to/k2pdfopt/binary Edit: An alternative approach is to copy the binary to any directory in your system $PATH, in which case you do not need to specify its location. You can know the directories in you system $PATH using the following command: Code:
echo $PATH Last edited by capink; 03-13-2024 at 05:36 PM. |
||
03-13-2024, 08:38 PM | #12 |
Junior Member
Posts: 3
Karma: 10
Join Date: Mar 2024
Device: Kindle Scribe
|
Thank you, that information was super helpful and it let me get it up and running. I hope all of this helps other users too!
I ran a test job and noticed a few things. One is that I couldn't check some of the options boxes, specifically Rotate output to landscape, Native PDF output, and color output. Another is that I tried adding "-om 0.2" in the additional options box to get a little bit of a margin, and in the preview it didn't change anything at all. I then ran the file through the plugin, and it correctly took the old file and changed its extension and created a new PDF file, but when I tried to open the new file I got the "could not be opened" error from Preview. "It may be damaged or use a file format that Preview doesn’t recognize." |
03-13-2024, 10:03 PM | #13 | |||
Wizard
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
Quote:
Quote:
Quote:
If there is anything related to the original program, you can ask in the k2pdfopt thread, but I recommend you first consult the k2pdfopt help page before posting there. |
|||
03-18-2024, 10:05 PM | #14 |
Preferred pronouns: We/Us
Posts: 157
Karma: 282162
Join Date: Jun 2014
Location: <--- Over There, USA
Device: Kindle PW 2
|
I haven't installed this yet because it looks a little technical. Will it help give a better result when converting the finished PDF file to epub?
|
03-19-2024, 01:21 AM | #15 |
Wizard
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 495 | 10-19-2024 07:06 AM |
[GUI Plugin] Noosfere_util, a companion plugin to noosfere DB | lrpirlet | Plugins | 2 | 08-18-2022 04:15 PM |
[GUI Plugin] Manga plugin | mastertea | Plugins | 6 | 01-06-2022 03:43 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 01:27 PM |