pdf2htmlEX/README.md

147 lines
6.1 KiB
Markdown
Raw Normal View History

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-02-01 11:14:08 +00:00
- **Typography**: [Default](http://coolwanglu.github.com/pdf2htmlEX/demo/geneve.html) / [MediaFire](http://www.mediafire.com/view/?fqbc2d2o1kdz51a) / [Original](https://github.com/raphink/geneve_1564/raw/master/geneve_1564.pdf)
- **Formulas**: [Default](http://coolwanglu.github.com/pdf2htmlEX/demo/cheat.html) / [MediaFire](http://www.mediafire.com/view/?84vdgrepkxclbq2) / [Original](http://www.tug.org/texshowcase/cheat.pdf)
2013-02-01 12:07:39 +00:00
- **Scientific Paper**: [Default](http://coolwanglu.github.com/pdf2htmlEX/demo/demo.html) / [MediaFire](http://www.mediafire.com/view/?6po429kz9czcga2) / [Original](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.148.349&rep=rep1&type=pdf)
2013-02-03 08:08:09 +00:00
- **Full Circle Magazine**: [Default](http://coolwanglu.github.com/pdf2htmlEX/demo/issue65_en.html) / [MediaFire](http://www.mediafire.com/view/?6hxmt94k2vppnpb) / [Original](http://dl.fullcirclemagazine.org/issue65_en.pdf) <sub>The 1st link might be slow</sub>
2013-02-01 11:14:08 +00:00
- **Chinese**: [Default](http://coolwanglu.github.com/pdf2htmlEX/demo/chn.html) / [MediaFire](http://www.mediafire.com/view/?6550ldag9w0uuq3) / [Original](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-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.
The generated HTML file is static, Javascript is not required.
2012-08-28 09:54:27 +00:00
2013-02-02 19:11:00 +00:00
[Learn more](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-02-01 08:16:01 +00:00
* Precise, native text in HTML, which means
- You can select & copy & search
2013-02-01 08:17:09 +00:00
- Correct font & position & styles
- Proper reencoding
2013-02-01 08:16:01 +00:00
- Generated HTML file is of similar size as the original (uncompressed) PDF file
2013-03-08 18:08:24 +00:00
- Fallback (image + hidden text) - better accuracy and compatibility
2013-02-01 08:16:01 +00:00
* Output modes
- Normal HTML
- All-in-one HTML - portable & easy to share
- One HTML per page - best for dynamic pages
* More PDF stuffs that you love
- Links
- Outline
2013-02-28 14:40:52 +00:00
- Printing (experimental)
2013-02-01 08:16:01 +00:00
2013-02-02 06:44:01 +00:00
[Full list](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-02-28 17:41:42 +00:00
Thanks to all packagers!
2012-10-03 18:43:45 +00:00
2013-01-30 04:15:22 +00:00
* [Ubuntu PPA](https://launchpad.net/~coolwanglu/+archive/pdf2htmlex) by Lu Wang <coolwanglu@gmail.com>, not always up-to-date.
* [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-04 18:03:53 +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
## 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-08-28 09:56:37 +00:00
## LICENSE
2012-08-04 18:03:53 +00:00
2013-02-02 17:19:10 +00:00
GPLv2 & GPLv3 for most part, MIT License for share/\*
Read LICENSE for 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-01-30 04:21:57 +00:00
## Contact
2013-01-31 13:13:48 +00:00
* Mailing list <pdf2htmlex@googlegroups.com>
2013-03-18 03:03:11 +00:00
* Make sure you have read `man pdf2htmlEX`, [wiki](https://github.com/coolwanglu/pdf2htmlEX/wiki) and [FAQ](https://github.com/coolwanglu/pdf2htmlEX/wiki/FAQ)
* Or you may not get any reply.
2013-01-31 13:13:48 +00:00
* Lu Wang <coolwanglu@gmail.com>
* For personal enquiries only
2013-03-03 08:20:12 +00:00
* Accepting messages in **中文**, **English** or **日本語**.
2013-01-30 04:21:57 +00:00
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