Module: Pdf2htmlDocker

Defined in:
lib/pdf2html_docker.rb,
lib/pdf2html_docker/service.rb,
lib/pdf2html_docker/version.rb,
lib/pdf2html_docker/option_builder.rb

Defined Under Namespace

Classes: Error, OptionBuilder, Service

Constant Summary collapse

DOCKER_COMMAND =
'docker run -v'.freeze
DOCKER_IMAGE =
'okorkov/pdf2htmlex'.freeze
BASE_COMMAND =
'pdf2htmlEX'.freeze
DOCKER_VOLUME =
':/pdf'.freeze
VERSION =
"1.0.1"
CONVERTER_ARGS =
[':pdf', ':html'].freeze
CONVERTER_OPTIONS =
{
  first_page: '--first-page',
  last_page: '--last-page',
  zoom: '--zoom',
  fit_height: '--fit-height',
  use_cropbox: '--use-cropbox',
  hdpi: '--hdpi',
  vdpi: '--vdpi',
  embed: '--embed',
  embed_css: '--embed-css',
  embed_font: '--embed-font',
  embed_image: '--embed-image',
  embed_javascript: '--embed-javascript',
  embed_outline: '--embed-outline',
  split_pages: '--split-pages',
  dest_dir: '--dest-dir',
  css_filename: '--css-filename',
  page_filename: '--page-filename',
  outline_filename: '--outline-filename',
  process_nontext: '--process-nontext',
  process_outline: '--process-outline',
  process_annotation: '--process-annotation',
  process_form: '--process-form',
  printing: '--printing',
  fallback: '--fallback',
  tmp_file_size_limit: '--tmp-file-size-limit',
  embed_external_font: '--embed-external-font',
  font_format: '--font-format',
  decomponse_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_type3: '--process-type3',
  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',
  correct_text_visibility: '--correct-text-visibility',
  bg_format: '--bg-format',
  svg_node_count_limit: '--svg-node-count-limit',
  svg_embed_bitmap: '--svg-embed-bitmap',
  owner_password: '--owner-password',
  user_password: '--user-password',
  no_drm: '--no-drm',
  clear_tmp: '--clean-tmp',
  tmp_dir: '--tmp-dir',
  data_dir: '--data-dir',
  debug: '--debug',
  proof: '--proof',
  version: '--version',
  help: '--help'
}.freeze

Class Method Summary collapse

Class Method Details

.convert(input_file, options = {}, output_file = '') ⇒ Object



6
7
8
9
10
# File 'lib/pdf2html_docker.rb', line 6

def self.convert(input_file, options = {}, output_file = '')
  Service.new(input_file, output_file, options).run
rescue ArgumentError => e
  e
end