pdf2htmlEX /pdf2htmlEX
Convert PDF to HTML without losing text or format.
★ 5,609⑂ 527👁 63⑃ 49● 160▤ 13
-1
日增长
5,609
stars
527
forks
63
watchers
49
prs
160
issues
13
releases
README
! pdf2htmlEX Differences from upstream pdf2htmlEX: This is my branch of pdf2htmlEX which aims to allow an open collaboration to help keep the project active. A number of changes and improvements have been incorporated from other forks: Lots of bugs fixes, mostly of edge cases Integration of latest Cairo code Out of source building Rewritten handling of obscured/partially obscured text - now much more accurate Some support for transparent text Improvement of DPI settings - clamping of DPI to ensure output graphic isn't too big --correct-text-visibility tracks the visibility of 4 sample points for each character (currently the 4 corners of the character's bounding box, inset slightly) to determine visibility. It now has two modes. 1 = Fully occluded text handled (i.e. doesn't get put into the HTML layer). 2 = Partially occluded text handled. The default is now "1", so fully occluded text should no longer show through. If "2" is selected then if the character is partially occluded it will be drawn in the background layer. In this case, the rendered DPI of the page will be automatically increased to --covered-text-dpi (default: 300) to reduce the impact of rasterized text. For maximum accuracy I strongly recommend using the output options: --font-size-multiplier 1 --zoom 25. This will circumvent rounding errors inside web browsers. You will then have to scale down the resulting HTML page using an appropriate "scale" transform. If you are concerned about file size of the resulting HTML, then I recommend patching fontforge to prevent it writing the current time into the dumped fonts, and then post-process the pdf2htmlEX data to remove duplicate files - there will usually be many duplicate background images and fonts. 一图胜千言A beautiful demo is worth a thousand words - Bible de Genève, 1564 (fonts and typography): HTML / PDF - Cheat Sheet (math formulas): HTML / PDF - Scientific Paper (text and figures): HTML / PDF - Full Circle Magazine (read while downloading): HTML / PDF - Git Manual (CJK support): HTML / PDF pdf2htmlEX renders PDF files in HTML, utilizing modern Web technologies. Academic papers with lots of formulas and figures? Magazines with complicated layouts? No problem! pdf2htmlEX is also an online publishing tool which is flexible for many different use cases. Learn more about who and why should use pdf2htmlEX. Features Native HTML text with precise font and location. Flexible output: all-in-one HTML or on demand page loading (needs JavaScript). Moderate file size, sometimes even smaller than PDF. Supporting links, outlines (bookmarks), printing, SVG background, Type 3 fonts and more... Compare to others Portals :house:Wiki Home Download & Building Quick Start Report Issues / Ask for Help :question:FAQ :envelope:Mailing List :mahjong:中文邮件列表 LICENSE pdf2htmlEX, as a whole package, is licensed under GPLv3+. Some resource files are released with relaxed licenses, read LICENSE for more details.
Top issues
#81Some embedded images error19 comments · 2020-07-24#74support for epub3 html16 comments · 2020-07-10#15What are the newest versions of poppler and fontforge that will build with this project?14 comments · 2018-06-01#131How to improve quality of embedded images after conversion from PDF to HTML?13 comments · 2022-04-29#28Internal Error: Lookup sub table and attempt to output 2147483647 into a 16-bit field. 11 comments · 2019-09-10#151Create a new latest docker image on docker hub9 comments · 2023-10-09#80docker error manifest unknown9 comments · 2020-07-23#42Segmentation fault during processing9 comments · 2019-11-07
Latest release
v0.18.8.rc1 v0.18.8.rc1 2020-06-30This is the most recent release of the pdf2htmlEX project. - It adds support for Poppler version 0.89.0 as well as FontForge version 20200314. - It also adds the --turn-off-ligatures command line switch to explicitly tell browsers not to use ligatures. This can be useful if an embedded font does not include ligatures. We release five types of objects: 1. Debian archives 2. Alpine tar archive 3. AppImage 4. Docker image 5. Source You can click on any of the above links to find more information on how to download and use each type of release object. Finally, the various