lib/formalizer/form.rb
# Exports the filled form into a PDF file uwing Wicked PDF gem
Exports the filled form into a PDF file uwing Wicked PDF gem
Exports the filled form into a PDF file uwing Wicked PDF gem
def export_to_pdf filename = 'pdf'
      html = @html_template.to_s
      @html_template.css('img').each do |image_tag|
        html.gsub!(image_tag.to_s, replace_tag(image_tag, 'src'))
      end
      @html_template.css('link').each do |rel_tag|
        html.gsub!(rel_tag.to_s, replace_tag(rel_tag, 'href'))
      end
      WickedPdf.new.pdf_from_string(html)
    end
def export_to_pdf filename = 'pdf' html = @html_template . to_s @html_template . css ( 'img' ) . each do | image_tag | html . gsub! ( image_tag . to_s , replace_tag ( image_tag , 'src' ) ) end @html_template . css ( 'link' ) . each do | rel_tag | html . gsub! ( rel_tag . to_s , replace_tag ( rel_tag , 'href' ) ) end WickedPdf . new . pdf_from_string ( html ) end
Exports the filled form into a PDF file uwing Wicked PDF gem
Exports the filled form into a PDF file uwing Wicked PDF gem
# replacing html image tags with wicked_pdf tags
filename
<not_specific>