dodeeric / pdf2epubex Goto Github PK
View Code? Open in Web Editor NEWTool to convert a PDF file (myfile.pdf) to a fixed layout ePub file (myfile.epub). The layout is perfectly retained and all the fonts are embedded.
License: Other
Tool to convert a PDF file (myfile.pdf) to a fixed layout ePub file (myfile.epub). The layout is perfectly retained and all the fonts are embedded.
License: Other
I don't know whether it is already a feature or not so i made this request. Is there any settings options so that the output EPUB file can have a Table of Contents based on the input PDF file. If there is not, are you planning to implement any feature or setting option like that in future. Thanks for you sharing this wonderful piece of code. It is literally a lifesaver. THANKS
is it possible to use converted PDFs from https://www.willus.com/k2pdfopt/ and make reflowable layout epubs ?
Hello Eric!
I came across your program while searching for a converter from pdf to epub. However, despite my several attempts to convert my file with all available options to run the code, I haven't managed to do this.
sudo apt install pdf2epubex
Unfortunately, when converting, I got the same error about something being missing.
I tried to install pdf2epubEX from the deb package, but it failed due to two missing dependencies, namely libfontforge1 and libpoppler58. These packages are absent in the Ubuntu repository. Installing Font Forge and Poppler from other sources didn't help either, apparently because of the difference in package names. I guess that was also the reason for my failures with the first option.
~/Desktop sudo docker run -ti --rm -v `pwd`:/pdf dodeeric/pdf2epubex pdf2epubEX.sh test.pdf
Unable to find image 'dodeeric/pdf2epubex:latest' locally
latest: Pulling from dodeeric/pdf2epubex
7b1a6ab2e44d: Pull complete
7f937bafbd1b: Pull complete
62c28fc93ed9: Pull complete
1f68659c9c03: Pull complete
c742b8d6bbbc: Pull complete
30d0de691ff0: Pull complete
c29d2e948a49: Pull complete
Digest: sha256:52054bb4f365c498f184673414e17db09145e5d28f2d30cb247e1877c1a6e73d
Status: Downloaded newer image for dodeeric/pdf2epubex:latest
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "pdf2epubEX.sh": executable file not found in $PATH: unknown.
Please assist me in this matter. I am very much looking forward to your help.
Here are my specs.
Overwriting does not work properly with option -i
of BSD sed (on MacOS).
I think adding option -e
will give the desired behavior.
sed -i -e 's/;unicode-bidi:bidi-override//g' base.min.css
Syntax Warning: Invalid Font Weight
Hi, after trying docker run -ti --rm -v
pwd:/temp dodeeric/pdf2epubex pdf2epubEX myfile.pdf
on mac M1 I got:
docker: invalid reference format: repository name must be lowercase.
Add the left side menu (ToC) from the pdf2htmlEX browser reader into the nav.xhtml file (ToC of the ePub book).
Isn't the option you give to pdf2htmlEX, not ---dpi
but ---hdpi
and ---vdpi
?
cf. https://github.com/pdf2htmlEX/pdf2htmlEX/wiki/Command-Line-Options
My PDF (produced in LaTex) has a TOC and many internal crossref links. Is there anyway to import/enable these in the converted epub? I know Kindle Create has such an option. It would be great if we can create epubs like Kindle ebooks.
Please check the sample pdf and outpur epub file. It didnt convert properly.
$ sh pdf2epubEX.sh Explanation_of_a_Summary_of_Aqeedat_Hamawiyyah.pdf
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 1: parse error
(standard_in) 1: parse error
-------------------------------------------------------------------------------------------------
Book/PDF Width: 0.00 inches / 0.0 cm
Book/PDF Height: 0.00 inches / 0.0 cm
Factor ratio (Height / Width): 0.00
ePub Viewport (Width x Height): 900 pixels x pixels
-------------------------------------------------------------------------------------------------
Do you want to see more information on the PDF file? (y or n) [default: n]:
pdf2epubEX.sh: line 58: pdffonts: command not found
======================
Caution:
- if you chose png or jpg (bitmap formats), the vector images will be converted in bitmap images (rasterized).
- if you chose svg (vector and bitmap format), the vector images will remain in vector format, but: a) you cannot chose the resolution of the bitmap images (it is the one from the PDF); b) the bitmap images will be included in the svg files (Base64 coded); c) this format is not always correctly rendered by eBook readers; d) the generated epub file is not always passing the epub check.
======================
If you want, you can hit <ENTER> to all the next questions.
Format of the images in the epub (png, jpg or svg) [default: jpg]:
Resolution of the images in the epub in dpi (e.g.: 150 or 300) [default: 150]:
Title [Default: None]:
Author [Default: None]:
Publisher [Default: None]:
Year [Default: 1900]:
Language (e.g.: fr) [Default: en]:
ISBN number [Default: None]:
Subject (e.g.: history) [Default: None]:
Wait...
pdf2htmlEX: unrecognized option `--dpi'
cat: *.page: No such file or directory
mv: rename *.css to ./bookroot/OEBPS/*.css: No such file or directory
mv: rename *.woff to ./bookroot/OEBPS/*.woff: No such file or directory
mv: rename *.jpg to ./bookroot/OEBPS/*.jpg: No such file or directory
pdf2epubEX.sh: line 219: pdftoppm: command not found
mv: rename cover.png to ./bookroot/OEBPS/cover.png: No such file or directory
sed: 1: "base.min.css": undefined label 'ase.min.css'
Done
Hi,
I think it would benefit the publishing community which requires read-aloud fixed layout epub files where each word gets highlighted as it is spoken in its audio file. In the SMIL file of the read-aloud ePub 3.0 file we have to give the ID of each word to be highlighted.
So, as a feature enhancement, could your tool output the XHTML file in such a way that each word appears in a span with a unique ID. Currently your tool outputs the XHTML file with the text sentence/Line format.
Thanks
Hi
I went through all the steps and got these error messages:
pdf2htmlEX version: 0.18.8.rc2
Error when parsing the arguments:
Invalid argument: --page-filename
cat: '.page': No such file or directory
mv: cannot stat '.css': No such file or directory
mv: cannot stat '.woff': No such file or directory
mv: cannot stat '.jpg': No such file or directory
I/O Error: Couldn't open file 'mybook.pdf': No such file or directory.
mv: cannot stat 'cover.png': No such file or directory
sed: can't read base.min.css: No such file or directory
mv: target 'filename-150dpi-jpg.epub' is not a directory
Done
I have correctly specified the path to my file and mapped it to the /temp directory inside the Docker container.
Kindly advise. Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.