Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 10-15-2025, 12:22 PM   #1
shizen
Member
shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'
 
Posts: 15
Karma: 39654
Join Date: Oct 2025
Device: android
Post [plugin][convert pdf to cbz] in menu bar

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.
Attached Files
File Type: zip PDFtoCBZ.zip (1.69 MB, 140 views)

Last edited by shizen; 11-02-2025 at 11:17 AM.
shizen is offline   Reply With Quote
Old 10-15-2025, 12:23 PM   #2
shizen
Member
shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'
 
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
Attached Files
File Type: zip PDFtoCBZ_v1.zip (37.68 MB, 6 views)
File Type: zip PDFtoCBZ_v3.zip (1.69 MB, 5 views)

Last edited by shizen; 11-02-2025 at 11:18 AM. Reason: add history
shizen is offline   Reply With Quote
Old 10-15-2025, 12:33 PM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
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.
theducks is offline   Reply With Quote
Old 10-15-2025, 12:42 PM   #4
shizen
Member
shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'
 
Posts: 15
Karma: 39654
Join Date: Oct 2025
Device: android
Quote:
Originally Posted by theducks View Post
Plugins is the correct place for this. Relocated.
thanks, i have post in plugin but i have read, i must post in development but i have right, the first time !

all good !
shizen is offline   Reply With Quote
Old 10-26-2025, 05:41 AM   #5
halifax28
Junior Member
halifax28 began at the beginning.
 
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
What are your thoughts?
halifax28 is offline   Reply With Quote
Old 10-27-2025, 01:42 PM   #6
shizen
Member
shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'
 
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
shizen is offline   Reply With Quote
Old 10-28-2025, 01:39 PM   #7
shizen
Member
shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'shizen can spell AND pronounce 'liseuse.'
 
Posts: 15
Karma: 39654
Join Date: Oct 2025
Device: android
Quote:
Originally Posted by halifax28 View Post
Hi shizen,

I'd love to use your plugin, however I get the following error:

What are your thoughts?
I make a V2 with more compatibility
link v2 here
shizen is offline   Reply With Quote
Old 11-03-2025, 07:36 AM   #8
halifax28
Junior Member
halifax28 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2025
Device: Kobo Libra Colour
It works great, thanks!
halifax28 is offline   Reply With Quote
Reply

Tags
cbz, comics, pdf


Forum Jump

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


All times are GMT -4. The time now is 08:53 AM.


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