![]() |
#1 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jun 2025
Device: None
|
![]()
I was using calibre's awesome CLI to make this script to generate PDF files out of a few dictionaries I needed (unfortunately I need to use the PDF file format to import them in Zotero, a popular cross-platform annotation tool).
Code:
p="$HOME/Downloads/tmp/" mkdir $p; cd $p #rm -rf * list=" https://archive.org/details/anelementarylat01lewigoog/page/58/mode/2up?ref=ol&view=theater https://archive.org/details/latindictionaryf00andr?ref=ol&view=theater https://archive.org/details/intermediategree00lidd?ref=ol&view=theater https://archive.org/details/homericdictionar00auteiala?ref=ol&view=theater " for i in $list; do echo $i | grep -o -P "https://[^)]*" | grep -o -P "/details/[^?\/]*" | sed -e 's/^\/details\///' | xargs -I {} wget "https://archive.org/download/{}/{}.epub" # | grep -o -P "\(https://.*?\)" done for i in ./*.epub; do #w x for i in "*.epub"; do ebook-convert $i $i.pdf #--txt-output-formatting plain #--txt-output-encoding utf-32 # --embed-all-fonts #pandoc $i -f epub -t pdf -s -o "$i.pdf" done Unfortunately what happens in the end is that the PDF doesn't have proper greek characters, but seems to reproduce the UTF-8 format, part of the XHTML of the starting epub! It's strange as Calibre's GUI previews everything fine... Any ideas? Thank you so much in advance! |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,307
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
post a link to an actual epub file causing issues.
|
![]() |
![]() |
![]() |
#3 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jun 2025
Device: None
|
Link
Sure, here is one with the greek characters: https://ia902203.us.archive.org/2/it...ree00lidd.epub
|
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,307
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Converted fine for me, see attached, with
ebook-convert file.epub .pdf |
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jun 2025
Device: None
|
Interesting, your
Code:
Code:
epub Code:
Well done, problem solved ![]() |
![]() |
![]() |
![]() |
Tags |
conversion, encoding, epub, greek, pdf |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
When converting AZW3 to PDF, the resulting book shows gibberish characters. | luigi rovatti | Conversion | 1 | 10-01-2021 03:59 PM |
Fonts with Greek characters | pbw | Conversion | 4 | 02-13-2012 06:07 PM |
Spanish characters dissapear after converting to EPUB | zephyrot | Calibre | 7 | 11-28-2010 03:37 PM |
after converting to epub, it shows as strange characters? | mhmohamadi | Calibre | 1 | 05-23-2010 03:03 PM |
Converting PDF to MOBI, weird characters in story | cloudyvisions | Calibre | 12 | 05-23-2009 11:45 AM |