View Single Post
Old Yesterday, 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