2013-01-25 13:11:27 +00:00
# pdf2htmlEX
2013-01-25 18:10:07 +00:00
[![Build Status ](https://travis-ci.org/coolwanglu/pdf2htmlEX.png?branch=master )](https://travis-ci.org/coolwanglu/pdf2htmlEX)
2012-09-26 14:44:50 +00:00
2012-09-07 17:50:18 +00:00
A beautiful demo is worth a thousand words:
2012-08-04 18:25:47 +00:00
2013-05-04 15:39:08 +00:00
- **Typography** (LaTeX): [HTML ](http://coolwanglu.github.com/pdf2htmlEX/demo/geneve.html ) / [PDF ](https://github.com/raphink/geneve_1564/raw/master/geneve_1564.pdf )
- **Cheat Sheet** (math formulas): [HTML ](http://coolwanglu.github.com/pdf2htmlEX/demo/cheat.html ) / [PDF ](http://www.tug.org/texshowcase/cheat.pdf )
- **Scientific Paper** (text and figures): [HTML ](http://coolwanglu.github.com/pdf2htmlEX/demo/demo.html ) / [PDF ](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.148.349&rep=rep1&type=pdf )
- **Full Circle Magazine** (read while downloading): [HTML ](http://coolwanglu.github.com/pdf2htmlEX/demo/issue65_en.html ) / [PDF ](http://dl.fullcirclemagazine.org/issue65_en.pdf )
- **Git Manual** (CJK support): [HTML ](http://coolwanglu.github.com/pdf2htmlEX/demo/chn.html ) / [PDF ](http://files.cnblogs.com/phphuaibei/git%E6%90%AD%E5%BB%BA.pdf )
2013-03-12 13:26:31 +00:00
- [Try your own files ](https://github.com/coolwanglu/pdf2htmlEX/wiki/UploadDemo )
2013-03-19 11:00:40 +00:00
[Browser requirements ](https://github.com/coolwanglu/pdf2htmlEX/wiki/Browser-Requirements )
2013-03-12 13:18:44 +00:00
2012-08-28 09:56:37 +00:00
## Introduction
2012-08-28 09:54:27 +00:00
2013-01-31 11:25:53 +00:00
pdf2htmlEX renders PDF files in HTML, utilizing modern Web technologies.
It aims to provide an accuracy rendering, while keeping optimized for Web display.
2012-08-04 18:03:53 +00:00
2013-01-31 11:25:53 +00:00
pdf2htmlEX is best for text-based PDF files, for example scientific papers with complicated formulas and figures.
Text, fonts and formats are natively perserved in HTML such that you can still search and copy.
2013-05-04 17:52:53 +00:00
The generated HTML file is static, Javascript is optional.
2012-08-28 09:54:27 +00:00
2013-05-04 17:58:27 +00:00
[Learn more about who and why should use pdf2htmlEX ](https://github.com/coolwanglu/pdf2htmlEX/wiki/Introduction )
2012-12-12 08:54:48 +00:00
2012-08-28 09:56:37 +00:00
## Features
2012-08-04 18:03:53 +00:00
2013-05-04 17:52:53 +00:00
* Precise and native text in HTML
2013-05-04 13:33:55 +00:00
* Flexible Output
* Moderate Size
* More PDF stuffs that you love: links, outlines & printing
2013-02-01 08:16:01 +00:00
2013-05-04 17:52:53 +00:00
[Learn more ](https://github.com/coolwanglu/pdf2htmlEX/wiki/Feature-List )
2013-02-02 06:43:40 +00:00
[Compare with others ](https://github.com/coolwanglu/pdf2htmlEX/wiki/Comparison )
2012-08-04 18:03:53 +00:00
2012-08-28 09:56:37 +00:00
## Get started
2012-08-28 09:54:27 +00:00
2013-01-30 04:15:22 +00:00
### Install
2013-05-05 15:06:08 +00:00
Thanks to all the packagers!
2012-10-03 18:43:45 +00:00
2013-05-04 17:52:53 +00:00
* [Ubuntu PPA ](https://launchpad.net/~coolwanglu/+archive/pdf2htmlex ) by Lu Wang < coolwanglu @ gmail . com >
2013-01-30 04:15:22 +00:00
* [ArchLinux AUR ](https://aur.archlinux.org/packages.php?ID=62426 ) by Arthur Titeica < arthur.titeica @ gmail . com >
* [Gentoo Overlay ](http://gpo.zugaina.org/app-text/pdf2htmlex ), gentoo-zh, mrueg or sunrise, by respective packagers.
2013-02-01 18:44:23 +00:00
* [Homebrew Formula ](https://github.com/mxcl/homebrew/blob/master/Library/Formula/pdf2htmlex.rb ) by Jamie Ly < me @ jamie . ly >
2013-01-30 04:15:22 +00:00
* [Macports (local repo) ](https://github.com/iapain/pdf2htmlEX-macport ) by Deepak Thukral < iapain @ iapa . in >
2013-01-31 16:06:26 +00:00
* Windows [N/A ](https://github.com/coolwanglu/pdf2htmlEX/wiki/FAQ#wiki-install-windows )
2012-09-21 06:21:56 +00:00
2012-08-29 23:42:53 +00:00
### Build from source
2012-08-28 09:54:27 +00:00
2012-08-28 09:56:37 +00:00
#### Dependency
2012-08-28 10:27:45 +00:00
2012-09-10 18:44:45 +00:00
* CMake, pkg-config
2012-09-21 13:35:27 +00:00
* GNU Getopt
2012-09-17 17:32:27 +00:00
* compilers support C++11, for example
2012-09-09 08:13:04 +00:00
* GCC >= 4.4.6
2012-09-17 17:32:27 +00:00
* I heard about successful build with Clang
2012-10-13 08:01:27 +00:00
* **poppler** with xpdf header >= 0.20.0 (compile with ** --enable-xpdf-headers**)
* Install **libpng** (and headers) BEFORE you compile poppler if you want background images generated
* Install **poppler-data** if your want CJK support
* **fontforge** (with header files)
2012-09-21 13:35:27 +00:00
* git version is recommended to avoid annoying compilation issues
2012-10-13 08:01:27 +00:00
* [Optional] **ttfautohint**
* run pdf2htmlEX with ** --external-hint-tool=ttfautohint** to enable it
2013-01-30 04:15:22 +00:00
* [For Windows]
* Cygwin
2013-01-30 04:18:43 +00:00
* or MinGW, with some modifications to pdf2htmlEX. See [pdf2htmlEX on TeX Wiki ](http://oku.edu.mie-u.ac.jp/~okumura/texwiki/?pdf2htmlEX ) (in Japanese), special thanks to Haruhiko Okumura
2013-01-30 04:15:22 +00:00
2012-08-28 09:56:37 +00:00
#### Compiling
2012-08-28 10:27:45 +00:00
2012-12-25 09:10:38 +00:00
git clone --depth 1 git://github.com/coolwanglu/pdf2htmlEX.git
2012-10-08 09:02:34 +00:00
cd pdf2htmlEX
2012-08-14 18:28:19 +00:00
cmake . & & make & & sudo make install
2012-08-04 18:03:53 +00:00
2012-08-28 09:54:27 +00:00
## Usage
2012-08-28 10:27:45 +00:00
2012-08-28 09:54:27 +00:00
pdf2htmlEX /path/to/foobar.pdf
2013-03-09 15:57:26 +00:00
[Quick Start ](https://github.com/coolwanglu/pdf2htmlEX/wiki/QuickStart )
2012-08-28 09:54:27 +00:00
2012-09-21 10:12:14 +00:00
## FAQ
2012-10-03 12:32:21 +00:00
* [Troubleshooting compilation errors ](https://github.com/coolwanglu/pdf2htmlEX/wiki/FAQ#wiki-compile )
2012-10-03 12:12:51 +00:00
* [I want more features ](https://github.com/coolwanglu/pdf2htmlEX/wiki/FAQ#wiki-feature_commission )
2013-03-08 17:58:11 +00:00
* [More... ](https://github.com/coolwanglu/pdf2htmlEX/wiki/FAQ )
2012-09-21 10:12:14 +00:00
2012-08-28 09:56:37 +00:00
## LICENSE
2012-08-04 18:03:53 +00:00
2013-05-01 17:19:57 +00:00
GPLv2 & GPLv3 for most part, MIT License for `share/*`
2013-05-01 17:19:09 +00:00
Read LICENSE for more detail.
2012-08-04 18:03:53 +00:00
2013-02-01 08:17:09 +00:00
**pdf2htmlEX is totally free, please credit pdf2htmlEX if you use it**
2012-09-11 06:51:31 +00:00
**Please consider sponsoring it if you use it for commercial purpose**
2012-09-07 10:23:38 +00:00
2013-02-01 08:17:09 +00:00
**Font extraction, conversion or redistribution MAY BE ILLEGAL, please check your local laws**
2012-09-07 10:23:38 +00:00
2013-03-18 03:03:11 +00:00
## Contribute
2012-10-08 08:50:42 +00:00
2013-03-18 03:03:11 +00:00
Consider how much you have to pay for an alternatve with a similar quality, keeping in mind that pdf2htmlEX is maintained by one person in spare time.
* Patches are more than welcome.
* Or you may prefer [making a donation ](http://coolwanglu.github.com/pdf2htmlEX/donate.html ), the easier way.
2013-03-18 15:00:35 +00:00
* [Other ways you may help ](https://github.com/coolwanglu/pdf2htmlEX/wiki/FAQ#wiki-help )
2013-02-01 08:24:32 +00:00
2013-05-06 04:54:13 +00:00
## Resources
2013-01-30 04:21:57 +00:00
2013-01-31 13:13:48 +00:00
* Mailing list < pdf2htmlex @ googlegroups . com >
2013-05-06 04:54:13 +00:00
- Questions are welcome
- Make sure you have read `man pdf2htmlEX` , [wiki ](https://github.com/coolwanglu/pdf2htmlEX/wiki ) and [FAQ ](https://github.com/coolwanglu/pdf2htmlEX/wiki/FAQ )
* [pdf2htmlEX Blog ](http://pdf2htmlex.blogspot.com )
- News, announcements and discussions
2013-05-05 15:06:08 +00:00
* Lu Wang < coolwanglu @ gmail . com > or [coolwanglu@twitter ](https://twitter.com/coolwanglu )
2013-05-06 04:54:13 +00:00
- For personal enquiries only
- Accepting messages in **中文** , **English** or **日本語**
2013-05-05 09:24:48 +00:00
* IRC Channel [irc://irc.freenode.net/pdf2htmlEX ](irc://irc.freenode.net/pdf2htmlEX )
2012-10-03 18:41:07 +00:00
## Acknowledge
2012-08-28 09:54:27 +00:00
2012-09-21 13:38:23 +00:00
pdf2htmlEX is made possible thanks to the following projects:
2012-09-21 13:35:27 +00:00
2012-09-21 13:38:23 +00:00
* [poppler ](http://poppler.freedesktop.org/ )
* [Fontforge ](http://fontforge.org/ )
2012-09-22 06:41:29 +00:00
* [jQuery ](http://jquery.com/ )
2012-09-21 13:35:27 +00:00
2012-09-18 16:45:20 +00:00
pdf2htmlEX is inspired by the following projects:
2012-08-04 18:03:53 +00:00
* pdftops & pdftohtml from poppler
2012-08-11 11:55:06 +00:00
* MuPDF
2012-08-04 18:03:53 +00:00
* PDF.js
* Crocodoc
* Google Doc
2012-08-28 09:56:37 +00:00
### Special Thanks
2012-08-28 09:54:27 +00:00
2013-02-05 14:53:14 +00:00
* Hongliang Tian
* Wanmin Liu
2012-08-04 18:03:53 +00:00