1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-21 20:50:07 +00:00
Go to file
Trent Petersen 9ed21007e5
New master (#2)
* Show header in font map files

* fix a usage of unique_ptr with array

* Added '--quiet' argument to hide progress messages (resolves #503)

* Revert cout messages to cerr (see #622)

* bump version

* fix build; fix some coverity warnings

* Many bug fixes and improvements, including:

- Incorporated latest Cairo files from cairo-0.15.2
- Moved build to out-of-source
- Added clean script
- Rewritten correct_text_visibility option to improve accuracy
- Transparent characters drawn on background layer
- Improved bad unicode detection

* Many bug fixes and improvements, including:

- Incorporated latest Cairo files from cairo-0.15.2
- Moved build to out-of-source
- Added clean script
- Rewritten correct_text_visibility option to improve accuracy
- Transparent characters drawn on background layer
- Improved bad unicode detection

* Rationlise DPI to single number.
Implement actual_dpi - clamp maximum background image size in cases of huge PDF pages

* DPI fixes - increase DPI when partially covered text to covered-text-dpi
Add font-style italic for oblique fonts
Reduce char bbox for occlusion tests

* Don't shrink bbox - not required if zoom=25 used

* Ignore occlusion from stroke/fill with opacity < 0.5
Better compute char bbox for occlusion
Use 10% inset for char bbox for occlusion
Back out adding font-weight: bold to potentially bold fonts
Fix bug to ensure CID ascent/descent matches subfont values

* Removed zero char logging

* Remove forced italic - missing italic is due to fontforge bug which needs fixing

* Typos fixed, readme updated

* Typos

* Increase maximum background image width
Fix private use range to avoid stupid mobile safari switching to emoji font

* included -pthread switch to link included 3rdparty poppler files.

* Updated files from poppler 0.59.0 and adjusted includes.

* Support updated "Object" class from poppler 0.59.0
2018-01-10 13:31:38 -06:00
3rdparty New master (#2) 2018-01-10 13:31:38 -06:00
logo lots of improvements from josch 2014-07-13 16:59:30 -07:00
share New master (#2) 2018-01-10 13:31:38 -06:00
src New master (#2) 2018-01-10 13:31:38 -06:00
test Removed --embed altogether. 2016-12-11 14:37:19 +01:00
.gitignore working on unittest 2014-11-16 00:06:43 +08:00
.travis.yml should verbose infor in ctest in .travis.yml; otherwise travis would terminate the process due to lont time silence 2015-05-03 15:17:43 +08:00
AUTHORS Merge branch 'incoming' 2015-04-29 21:25:46 +08:00
build_for_ppa.py trying to fix ppa packaging 2014-11-12 09:45:49 +08:00
ChangeLog 0.14.6 2015-07-22 17:31:40 +08:00
CMakeLists.txt New master (#2) 2018-01-10 13:31:38 -06:00
CONTRIBUTING.md Update CONTRIBUTING.md 2015-03-16 23:00:19 +08:00
dobuild New master (#2) 2018-01-10 13:31:38 -06:00
doclean New master (#2) 2018-01-10 13:31:38 -06:00
INSTALL new option: --process-annotation 2014-06-06 21:43:53 -07:00
LICENSE make license consistent 2014-07-13 17:16:36 -07:00
LICENSE_GPLv3 update License 2012-08-31 21:19:46 +08:00
pdf2htmlEX.1.in New master (#2) 2018-01-10 13:31:38 -06:00
README.md New master (#2) 2018-01-10 13:31:38 -06:00
TODO fix typos 2016-01-01 12:02:27 +01:00

pdf2htmlEX is no longer under active development. New maintainers are wanted.

# pdf2htmlEX

My branch differences:

This is my branch of pdf2htmlEX which I maintain for my own purposes. I have made a number of changes and improvements over the original code:

  • 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.

Original README.md follows...

一图胜千言
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

LICENSE

pdf2htmlEX, as a whole package, is licensed under GPLv3+. Some resource files are released with relaxed licenses, read LICENSE for more details.

Acknowledgements

pdf2htmlEX is made possible thanks to the following projects:

pdf2htmlEX is inspired by the following projects:

  • pdftohtml from poppler
  • MuPDF
  • PDF.js
  • Crocodoc
  • Google Doc

Special Thanks

  • Hongliang Tian
  • Wanmin Liu