diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 06939294b..8a0c87194 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -61,6 +61,8 @@ module ApplicationHelper "#{root_url.chomp("\/")}#{url}" end + # This method is used to embed the font inside CSS when the asset is precompiled. It is required in order to allow + # wkpdfhtml embeding custom fonts inside the PDF. def self.asset_data_base64(path) asset = (Rails.application.assets || ::Sprockets::Railtie.build_environment(Rails.application)).find_asset(path) throw "Could not find asset '#{path}'" if asset.nil?