Sha256: 9c33ec0f4337ac3e111c1a6eafee7f094c4a27bf63d01b54a42008c41032a7cf
Contents?: true
Size: 679 Bytes
Versions: 96
Compression:
Stored size: 679 Bytes
Contents
# frozen_string_literal: true module Renalware module Letters class RecipientAddressPdfRenderer OPTIONS = { page_size: "A4", encoding: "UTF-8" }.freeze def self.call(recipient) unless recipient.respond_to?(:to_html) recipient = RecipientPresenter::WithCurrentAddress.new(recipient) end WickedPdf.new.pdf_from_string( LettersController.new.render_to_string( partial: "/renalware/letters/formatted_letters/recipient_address_cover_sheet", locals: { recipient: recipient }, encoding: "UTF-8" ), OPTIONS ) end end end end
Version data entries
96 entries across 96 versions & 1 rubygems