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 03-26-2019, 04:50 PM   #1
Momaiz
Junior Member
Momaiz began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2019
Device: none
Exclamation pdf to epub with arabic letters not in current position

Hello Bro ,

Thank you for calibre it's very good addons for ebooks and developers

I have small problem in arabic

I'm using Calibre ebook to extract pdf files to epub ebook but the text after convert , [ and reveresed again because it was auto reversed ] , not same as in the main pdf text

Lets say the pdf text is

لمياء السعيد

the calibre result after i reversed it was

ملياء السعيد

Here's the different in word

لمياء

ملياء

This Happened in many text in pdf

I used calibre to convert like

exec('ebook-convert '.$pdffile.' '.$new_epub_file ) ;

the wrong letters placement is in this step the result here is like

ءايلم (wrong and reversed)

after reversed with php the result is

ملياء ( wrong letters placement )

I tried to use

--disable-font-rescaling --mono-family --keep-ligatures --change-justification

All failed

after some search i see some answers say embed font support arabic but it failed too

also in the browser when reading the pdf

the word apper fine "لمياء"

but if i tried to copy it to clipboard it copied as "ملياء"

How to fix this problem with arabic letters
Momaiz is offline   Reply With Quote
Old 03-26-2019, 06:27 PM   #2
Momaiz
Junior Member
Momaiz began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2019
Device: none
Here's image from the main pdf file

https://f.top4top.net/p_1180dw23n1.jpg

i think the problem is in font style it self and how calibre readed it

I mean the error here is

ملياء

the true string

لمياء

لمياء is the true string in arabic

but if you check this image you will find that the font style make

م
apper before
ل

please check the image

and when calibre readed it readed it wrong ?? is that true


there's many examples like

المسيحية true string but it apper in calibre as
املسيحية

also

في true string but it apper in calibre as

يف

any suggestions please ??
Momaiz is offline   Reply With Quote
Advert
Old 03-26-2019, 11:49 PM   #3
Sarmat89
Fanatic
Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.Sarmat89 ought to be getting tired of karma fortunes by now.
 
Posts: 515
Karma: 2268308
Join Date: Nov 2015
Device: none
Did you mean
ةيحيسلما
instead of
املسيحية?

In that case you need to convert the PDF yourself, with some advanced PDF converter that support Arabic reordering.
Sarmat89 is offline   Reply With Quote
Old 03-27-2019, 07:46 PM   #4
Momaiz
Junior Member
Momaiz began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2019
Device: none
Not same word

i mean the pdf word is
المسيحية

the calibre output is

ةيحيسلما

after i reverse every word the result become

املسيحية

this is not the main pdf word

----------

after some work i think the reason was the font of the pdf

some arabic fonts draw letters not in same position "please check the draw of word لمياء in the picture link"


---------

I tried to edit one pdf on my pc example word was :"لمياء"

when i changed the font of paragraph the word changed to " ملياء "

it's wrong before convert from calibre i think ??

i used this apps to edit in my pc

foxit advanced pdf editor

pdf element 6 pro

what's your opinion ??
Momaiz is offline   Reply With Quote
Old 03-27-2019, 10:34 PM   #5
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,267
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://manual.calibre-ebook.com/con...-pdf-documents
kovidgoyal is offline   Reply With Quote
Advert
Old 03-28-2019, 03:05 PM   #6
Momaiz
Junior Member
Momaiz began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2019
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Thank you for answer Kovidgoyal "Owner of Calibre"

But i should tell you that my idea was true and finally i got perfect example after changing the font .

Basically . in PHP there was a library called "TCPDF" it support creating PDF from html

https://tcpdf.org/examples/example_018/

in this link this library make ability to create PDF from Arabic and Persian text

I Used this library in previous wordpress project to create pdf from arabic text in wordpress editor

please check attached images and pdf

used font like in tcpdf example was "aefurat" font

-----------

That was Cool
Attached Thumbnails
Click image for larger version

Name:	arabic-text-in-wordpress-editor-before-export-to-pdf.png
Views:	405
Size:	178.5 KB
ID:	170455   Click image for larger version

Name:	arabic-pdf.png
Views:	392
Size:	162.8 KB
ID:	170456  
Attached Files
File Type: pdf arab-book.pdf (75.7 KB, 271 views)
Momaiz is offline   Reply With Quote
Old 03-28-2019, 10:34 PM   #7
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,267
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Sure if your PDF uses a unicode font, then text extraction from it will succeed. The point is, it wil not succeed for arbitrary PDF files.
kovidgoyal is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sync reading position (current page) from reader to calibre? gingerbeardman Library Management 6 11-24-2017 03:14 PM
Reopening CC loses position, and reader app doesn't reopen at current position iatheia Calibre Companion 9 11-13-2015 08:20 PM
Glo Sleep with cover mess the current position ploum Kobo Reader 10 05-06-2013 07:49 AM
[Old Thread] PDF to Epub conversion (spaces between letters) mastroalex Conversion 8 10-09-2011 10:39 PM
your current position regarding the 505 hello Sony Reader 1 10-06-2007 05:37 AM


All times are GMT -4. The time now is 05:03 PM.


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