Project

pdf2html

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby wrapper for the awesome pdf2htmlex
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 1.3
>= 0

Runtime

= 0.5.3
 Project Readme

Pdf2html

Ruby wrapper for the awesome pdf2htmlex. Will utilize posix_spawn if available.

Installation

You need to have pdf2htmlex installed on your system in order for this to work. On OS X this is easy using Homebrew:

brew install pdf2htmlex

Install the gem:

$ gem install pdf2html

Usage

Pdf2Html.convert '/home/dev/meow.pdf', dest_dir: '/home/dev/public/', zoom: 1.5

Pdf2Html.convert '/home/dev/meow.pdf', { dest_dir: '/home/dev/public/', zoom: 1.5 }, "your_awesome_optional_html_filename.html"

All options to date:

  data_dir:             "--data-dir",
  first_page:           "--first-page",
  last_page:            "--last-page",
  fit_width:            "--fit-width",
  fit_height:           "--fit-height",
  use_cropbox:          "--use-cropbox",
  hdpi:                 "--hdpi",
  vdpi:                 "--vdpi",
  embed:                "--embed",
  split_pages:          "--split-pages",
  css_filename:         "--css-filename",
  page_filename:        "--page-filename",
  outline_filename:     "--outline-filename",
  process_nontext:      "--process-nontext",
  process_outline:      "--process-outline",
  printing:             "--printing",
  fallback:             "--fallback",
  embed_external_font:  "--embed-external-font",
  font_format:          "--font-format",
  decompose_ligature:   "--decompose-ligature",
  auto_hint:            "--auto-hint",
  external_hint_tool:   "--external-hint-tool",
  stretch_narrow_glyph: "--stretch-narrow-glyph",
  squeeze_wide_glyph:   "--squeeze-wide-glyph",
  override_fstype:      "--override-fstype",
  process_type:         "--process-type",
  heps:                 "--heps",
  veps:                 "--veps",
  space_threshold:      "--space-threshold",
  font_size_multiplier: "--font-size-multiplier",
  space_as_offset:      "--space-as-offset",
  tounicode:            "--tounicode",
  optimize_text:        "--optimize-text",
  bg_format:            "--bg-format",
  owner_password:       "--owner-password",
  user_password:        "--user-password",
  no_drm:               "--no-drm",
  clean_tmp:            "--clean-tmp",
  debug:                "--debug"

Work harder

Aleksandr Schigol