Module: PDFKit::HTMLPreprocessor

Defined in:
lib/pdfkit/html_preprocessor.rb

Class Method Summary collapse

Class Method Details

.process(html, root_url, protocol) ⇒ Object

Change relative paths to absolute, and relative protocols to absolute protocols



5
6
7
8
9
# File 'lib/pdfkit/html_preprocessor.rb', line 5

def self.process(html, root_url, protocol)
  html = translate_relative_paths(html, root_url) if root_url
  html = translate_relative_protocols(html, protocol) if protocol
  html
end