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 Today, 04:34 AM   #1
shizen
Junior Member
shizen began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2025
Device: android
[convert] pdf2cbz

hello,

i begin to write a plug in for convert pdf to cbz.
i have tried lot of method but don't find methode to convert pdf to image.

i try
calibre.ebooks.pdf.pdftoimage.pdf_to_images
calibre.ebooks.pdf.render.pdf_to_images
calibre.ebooks.pdf.image_writer.PDFImageWriter
calibre.ebooks.conversion.cli.convert
calibre.ebooks.conversion.plumber.Plumber
calibre.ebooks.pdf.reader.PDFDocument
calibre.ebooks.pdf.render.render_page
Calibre2\app\bin\pdftoppm.exe
fritz

if i convert pdf to zip in calibre, calibre convert to html and image, but the zip is good for cbz (after rename) so , it's possible.

have you idea ? official method ?

thank you
shizen is offline   Reply With Quote
Old Today, 04:51 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,552
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre includes pdftoppm use that.
kovidgoyal is offline   Reply With Quote
Old Today, 04:59 AM   #3
shizen
Junior Member
shizen began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2025
Device: android
Quote:
Originally Posted by kovidgoyal View Post
calibre includes pdftoppm use that.
thank you very much.

i have allway timeout but if you say to use it, i will !

thank you for calibre !
shizen is offline   Reply With Quote
Old Today, 07:45 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,552
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
A timeout where? Obviously pdftoppm will be slow as it actually renders the pdf pages, what you really need is a utility to extract images from the PDF. calibre doesnt ship one however.
kovidgoyal is offline   Reply With Quote
Old Today, 09:08 AM   #5
shizen
Junior Member
shizen began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2025
Device: android
Quote:
Originally Posted by kovidgoyal View Post
A timeout where? Obviously pdftoppm will be slow as it actually renders the pdf pages, what you really need is a utility to extract images from the PDF. calibre doesnt ship one however.
i make a command like ['C:\\Program Files\\Calibre2\\app\\bin\\pdftoppm.exe', '-png', '-r', '200', 'C:\\Users\\Admin\\AppData\\Local\\Temp\\calibre-o1lck1gd\\zd3h92f9pdf2cbz\\tmp.pdf', 'C:\\Users\\Admin\\AppData\\Local\\Temp\\calibre-o1lck1gd\\zd3h92f9pdf2cbz\\page']

and i use it in a subprocess (popen or run)
proc = subprocess.Popen(
cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True
)

the plug in "pdf input" extract image to make a html and a zip, so calibre can do it .

the pdf are just image without text, a comic book and i want to extract image.
shizen is offline   Reply With Quote
Old Today, 09:28 AM   #6
shizen
Junior Member
shizen began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2025
Device: android
i look for a faster tool !
shizen is offline   Reply With Quote
Old Today, 05:06 PM   #7
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,937
Karma: 30277294
Join Date: Mar 2012
Location: Sydney Australia
Device: none
This one has worked for me ==>> GitHub - r45635/pdf-to-cbz-converter

Quote:
An advanced, local and privacy-focused PDF-to-CBZ converter. Includes DPI analysis, batch processing, multithreading, JPEG/PNG export, and CBZ metadata. Designed for comic fans, archivists, and ebook collectors.
BR
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please don't downscale or convert my images, ebook-convert ! nylnook Conversion 3 02-11-2016 06:08 AM
To convert or not to convert - PDF marmistrz Workshop 7 06-20-2013 12:03 PM
How to batch-convert with ebook-convert? cypresstwist Conversion 8 02-22-2011 09:28 AM


All times are GMT -4. The time now is 10:44 PM.


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