|
|
#1 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15
Karma: 39654
Join Date: Oct 2025
Device: android
|
Hello,
i post (but in plugin section, sorry) my plugin to convert pdf to cbz. here : https://www.mobileread.com/forums/sh...d.php?t=370277 V3 : - Button in the user interface with menu for configuration - Select the calibre lines and press the button - Use PyPdf provided in the plugin's zip file - PNG or JPG option (compression for jpg) - add option "size" (comics, manga, european) for choose size if not detected (dimension in pixel is not changed, so it's not so important) - Skips the file if there's no PDF or if a CBR or CBZ file already exists (don't replace) - Extracts each page in image and places them one image per page in a CBZ file (assuming one image per page). - image's name begin with the 30 first letters of the title (without special character) - Adds the CBZ file to the calibre file format in the PDF as another format - if the dimension is higher than 30cm the dpi is adjust to fit in 30 cm without changing resolution. In the options, you can choose the conversion method: - Method 1: Processes each file one after the other in the main process - Method 2: Processes the files in parallel, still in the main process - Method 3 : add each conversion to the calibre tasks (need update). If you have a problem, switch to debugger mode and give me the calibre-debud-log.txt file (entry starting with pdftocbz: ). Be careful, the png version can be very large. test and give me bug or thing to adjust. Last edited by shizen; 11-02-2025 at 11:17 AM. |
|
|
|
|
|
#2 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15
Karma: 39654
Join Date: Oct 2025
Device: android
|
if you have problem (linux or mac, arm or x86), test V3 and v2
V3 : - replace pymupdf by pypdf in pure python so less compatibility problem - add compression option for jpg - add option "size" (comics, manga, european) for choose size if not detected (dimension in pixel is not changed, so it's not so important) - replace some french by english V2 : - put all pymupdf whl in zip for compatibility (win, linux, mac, arm, x86_64 ) but the zip will be bigger. he detect the system and extract the good one link V2 if someone can test before I put in release version ? work in progress : - detect size of pdf (in inch or cm) to fix dpi - better handling task - add translation if someone want V1 - Button in the user interface with menu for configuration - Select the calibre files and press the button - Use pymupdf/fitz provided in the plugin's zip file - PNG or JPG option (compression 95 for jpg) - Skips the file if there's no PDF or if a CBR or CBZ file already exists - Extracts each image from each page and places them one image per page in a CBZ file (assuming one image per page). - image's name begin with the 20 first lettre of the title (without special caracter) - Adds the CBZ file to the calibre file in the PDF as another format - if the dimension is higher than 30cm the dpi is adjust to fit in 30 cm without changing resolution. In the options, you can choose the conversion method: - Method 1: Processes each file one after the other in the main process - Method 2: Processes the files in parallel, still in the main process - Method 3 : add each conversion to the calibre tasks. add v1 in attachment here to keep history Last edited by shizen; 11-02-2025 at 11:18 AM. Reason: add history |
|
|
|
|
|
#3 |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,269
Karma: 61916422
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Moderator Notice
Plugins is the correct place for this. Relocated. |
|
|
|
|
|
#4 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15
Karma: 39654
Join Date: Oct 2025
Device: android
|
|
|
|
|
|
|
#5 |
|
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Oct 2025
Device: Kobo Libra Colour
|
Hi shizen,
I'd love to use your plugin, however I get the following error: Code:
pdftocbz:📦 Plugin zippé détecté : /home/julien/.config/calibre/plugins/PDFtoCBZ.zip pdftocbz:🧩 Extraction de 143 fichiers de 'libs/' vers : /tmp/calibre-7vhze6ri/pymupdf_calibre pdftocbz: ⚠️ Erreur chargement PyMuPDF : cannot import name '_extra' from partially initialized module 'pymupdf' (most likely due to a circular import) (/tmp/calibre-7vhze6ri/pymupdf_calibre/libs/pymupdf/__init__.py) pdftocbz: genesis() — initialisation GUI pdftocbz: convert_pdf_to_cbz called pdftocbz: le livre 258 est BD_PDF_TEST pdftocbz: le livre 258 contient les formats = ['PDF'] pdftocbz:✅ 1 : 258 pdftocbz:✅ 2 : 258 pdftocbz:✅ conversion method : 1 pdftocbz:✅ co1 : 258 pdftocbz:⚠️ Erreur lors de l'ouverture du PDF : name 'fitz' is not defined |
|
|
|
|
|
#6 |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15
Karma: 39654
Join Date: Oct 2025
Device: android
|
hello,
he extracts pymupdf but can't import it. he doesn't extract all. I will look at it |
|
|
|
|
|
#7 | |
|
Member
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 15
Karma: 39654
Join Date: Oct 2025
Device: android
|
Quote:
link v2 here |
|
|
|
|
|
|
#8 |
|
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Oct 2025
Device: Kobo Libra Colour
|
It works great, thanks!
|
|
|
|
![]() |
| Tags |
| cbz, comics, pdf |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to toggle menu bar on | bookfighter | Editor | 3 | 11-19-2024 02:18 PM |
| Menu Bar Not Showing | KyBunnies | Calibre | 22 | 07-10-2018 09:13 PM |
| Oasis 1- no menu bar? No restart either. | badgoodDeb | Amazon Kindle | 2 | 01-13-2018 01:58 PM |
| How to get back my menu bar? | mattsh | Calibre | 1 | 07-12-2017 09:32 AM |
| ezpdf hide menu bar | gorak | Android Devices | 4 | 11-16-2014 09:17 PM |