Coder Social home page Coder Social logo

pdf2fxl's Introduction

pdf2fxl – A PDF to Fixed Layout EPUB Converter

Prerequisites

  1. Poppler, in particular poppler’s pdftohtml binary
  2. ImageMagick

Poppler and ImageMagick are available for many package managers, including Cygwin’s. We made sure that the Bash front-end script runs on the Oracle Java for Windows / Cygwin combo. We have also tried to avoid utilities/options such as readlink -f that are known to not work on vanilla Mac OS X / BSD systems. However, we didn’t try it yet on a Mac and we’d like to hear from you whether it’s woking there.

The other prerequisites are Java 1.7 (or newer) and bash.

Clone the repository

It's necessary to clone the repository with the --recursive option to include the Git submodules.

git clone http://github.com/transpect/pdf2fxl --recursive

Invocation

./pdf2fxl -d -e sample/demojam.pdf

pdf2fxl {PDF}

switch options
-z zoom factor
-o custom output directory
-r raster text as image
-e create epub
-p omit poppler
-d turn debug mode on

pdf2fxl's People

Contributors

mkraetke avatar tirex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pdf2fxl's Issues

EPUB File

Shouldn't you have an option that gives an EPUB File directly, packaged with NCX toc etc ?

Unable to open the Epub file

I was able to run the file and generate the Epub file but i was not able to open the file on any of the ebook readers(tried with Microsoft edge and calibre).
Error message:

calibre, version 3.42.0
ERROR: Could not open e-book: Failed to read book, /home/liferay172/Documents/Sundeep/book.epub click "Show Details" for more information

Traceback (most recent call last):
  File "site-packages/calibre/utils/ipc/simple_worker.py", line 291, in main
  File "site-packages/calibre/ebooks/oeb/iterator/book.py", line 65, in extract_book
  File "site-packages/calibre/customize/conversion.py", line 245, in __call__
  File "site-packages/calibre/ebooks/conversion/plugins/epub_input.py", line 268, in convert
  File "site-packages/calibre/utils/localunzip.py", line 233, in extractall
  File "site-packages/calibre/utils/localunzip.py", line 220, in _extractall
ValueError: Not a ZIP file

How do i fix this.

This github is out of sync with the svn

I ran this under cygwin from a git clone of this project. But the calabash script will error due to files that are missing from this github (but present in the svn). For example, the "./conf/*" directory is not in this project, but it is in the svn.

For anyone looking to use this library:

svn export https://subversion.le-tex.de/common/pdf2fxl/ ~/local_svn_path

Edit ./pdf2fxl.sh to correct the poppler path (it should be "POPPLER=/usr/bin/pdftohtml"). I had to comment out the line "POPPLER=/usr/local/poppler/bin/pdftohtml".

Also, note to the reader: make sure that you're using a 1.x version of java, i.e.:

export PATH="/cygdrive/C/Program Files/Java/jdk1.8.0_131/bin:$PATH"
export JAVA_HOME="/cygdrive/C/Program Files/Java/jdk1.8.0_131"

Error (I think converting html to epub?) I'm not sure what this is about

I ran ./pdf2fxl nameofmyfile.pdf -e
It's extracting pages and creating a folder which has the page's html files. But then I get this:

PDF extraction finished  
Convert single page HTML to wrapped HTML  
ERROR: http://transpect.github.io/../index.html:1:107:Not a pipeline or library: html  
ERROR: err:XS0044:Unexpected step name: tr:simple-progress-msg  
ERROR: It is a static error if any element in the XProc namespace or any step has element children  
other than those specified for it by this specification. In particular, the presence of atomic steps for  
which there is no visible declaration may raise this error.   

Edit: Also (I think unrelated) for some reason when I cloned your repository calabash was empty, I navigated inside calabash in your directory, cloned it from there and then did the same for calabash/distro as that was empty as well even when cloning from inside /claabash.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.