Module: HtmlFromPdf

Defined in:
lib/html_from_pdf.rb,
lib/html_from_pdf/version.rb,
lib/html_from_pdf/converter.rb,
lib/html_from_pdf/exceptions.rb

Defined Under Namespace

Classes: Converter, ConvertingError, PdfNotFound, UnrecognizedOption

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.convert(pdf_path, html_path = nil, options: {}) ⇒ Object



8
9
10
11
12
13
# File 'lib/html_from_pdf.rb', line 8

def self.convert(pdf_path, html_path = nil, options: {})
  raise HtmlFromPdf::PdfNotFound unless File.exist? pdf_path

  converter = HtmlFromPdf::Converter.new(pdf_path, html_path, options)
  converter.convert
end