Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-26-2025, 03:38 PM   #1
lonly
Member
lonly began at the beginning.
 
Posts: 20
Karma: 10
Join Date: Nov 2012
Location: Bellow the Sky
Device: Laptop
pdf to epub

i am trying to convert pdf to epub file using calibre
first i tried calibre gui which is taking hours but cannot convert that pdf to epub then i use python script with calibre ebook-convert.exe and that is converting pdf to epub but missing a lot of setting i am sharing you screenshot of pdf text and converted epub same area.
check attached files (First image is original PDF and second image is converted epub and see text and diagram is broken in epub)

here is my script code

import subprocess
import os

# Path to your input PDF
pdf_path = r"C:\Users\samsam\Downloads\Analysis of Fork.pdf" # <-- Change 'mybook.pdf' to your actual file name

# Output EPUB path (same folder)
epub_path = os.path.splitext(pdf_path)[0] + ".epub"

# Full path to ebook-convert.exe
calibre_convert_exe = r"C:\Program Files\Calibre2\ebook-convert.exe"

# Command to run conversion
command = [
calibre_convert_exe,
pdf_path,
epub_path,
"--disable-font-rescaling",
"--no-default-epub-cover",
"--preserve-cover-aspect-ratio"

]

try:
subprocess.run(command, check=True)
print(f"✅ EPUB created: {epub_path}")
except subprocess.CalledProcessError as e:
print("❌ Conversion failed:", e)
Attached Thumbnails
Click image for larger version

Name:	pdf ss.jpg
Views:	54
Size:	101.6 KB
ID:	216513   Click image for larger version

Name:	epub ss.jpg
Views:	44
Size:	150.9 KB
ID:	216514  

Last edited by lonly; 06-26-2025 at 03:56 PM.
lonly is offline   Reply With Quote
Old 06-26-2025, 03:59 PM   #2
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,162
Karma: 60406498
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Did you read this stickey (at the top of conversion)?
https://www.mobileread.com/forums/sh...d.php?t=118605

PDF is a page paste up format. The pieces can be in any order.
Convert only handle the simplest Top -> Bottom text decently.
Toss in images or multi column : good luck
theducks is online now   Reply With Quote
Old 06-26-2025, 06:52 PM   #3
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,881
Karma: 30277270
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Looks like a professionally created PDF, I suggest you open the PDF in Word (or Acrobat) and save as DOCX, and then have calibre convert the DOCX to EPUB.

This is an instance of a two step conversion being better than one step.

BR
BetterRed is offline   Reply With Quote
Old 09-05-2025, 04:45 AM   #4
GevorgPirenyan
Junior Member
GevorgPirenyan began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2025
Device: Amazon Kindle Paperwhite 11th Gen (PW5, 2021)
Question

Hello, forum members. I've one question. I want to convert pdf book on Armenian language to epub, but after converting the armenian text becomes latin text and it is not readable. Is here anyone who known how to solve this problem?

My ebook is Kindle PaperWhite 11th Gen (PW5, 2021).

GevorgPirenyan is offline   Reply With Quote
Old 09-05-2025, 05:24 AM   #5
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 80,190
Karma: 148951761
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
The solution is Don't do it. It won't work properly and the time to fix it is not worth it.
JSWolf is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert a pdf to epub for edit back to pdf increased page numbers. Construct Conversion 4 07-18-2023 12:56 PM
ePub->pdf conversion doesn't allow to add watermark with third-party pdf editor EbokJunkie Conversion 8 04-16-2023 08:38 PM
When i add a pdf in caliber and open it with E-book viewer the pdf turns into a epub. sourov Library Management 1 08-23-2021 05:05 AM
EPUB to PDF Failure (Error msg & pdf attached) Iamgoodlol Conversion 2 05-27-2017 05:22 AM


All times are GMT -4. The time now is 04:51 AM.


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