class Html2Docx::Helpers::DocumentHelper
Public Class Methods
convert_hex_color(value)
click to toggle source
# File lib/Html2Docx/helpers/document_helper.rb, line 8 def self.convert_hex_color(value) value.upcase.delete('#') end
height_px_to_word(value)
click to toggle source
# File lib/Html2Docx/helpers/document_helper.rb, line 4 def self.height_px_to_word(value) (value.to_i * 9533.77880184).to_i end
line_height(value)
click to toggle source
# File lib/Html2Docx/helpers/document_helper.rb, line 20 def self.line_height(value) (value.to_f * 240).to_i end
px_to_indent(value)
click to toggle source
# File lib/Html2Docx/helpers/document_helper.rb, line 12 def self.px_to_indent(value) value.to_i.to_i * 15 end
width_px_to_word(value)
click to toggle source
# File lib/Html2Docx/helpers/document_helper.rb, line 16 def self.width_px_to_word(value) (value.to_i * 9405.9375).to_i end