diff --git a/app/assets/stylesheets/reports.scss b/app/assets/stylesheets/reports.scss
index a1efb5700..9752b1f84 100644
--- a/app/assets/stylesheets/reports.scss
+++ b/app/assets/stylesheets/reports.scss
@@ -206,6 +206,11 @@ label {
padding-top: 10px;
padding-left: 15px;
padding-right: 15px;
+
+ .report-export-img {
+ max-height: 300px;
+ max-width: 300px;
+ }
}
.report-element-children {
diff --git a/app/assets/stylesheets/themes/scinote.scss b/app/assets/stylesheets/themes/scinote.scss
index d9e5a715c..4eca577ba 100644
--- a/app/assets/stylesheets/themes/scinote.scss
+++ b/app/assets/stylesheets/themes/scinote.scss
@@ -1945,10 +1945,6 @@ a.disabled-with-click-events {
padding-bottom: 60px;
}
-.tiny-mce-pdf-ready {
- max-width: 100%;
-}
-
.doorkeeper-authorization {
margin-bottom: 45px;
diff --git a/app/helpers/tiny_mce_helper.rb b/app/helpers/tiny_mce_helper.rb
index 091c586c1..809a5655d 100644
--- a/app/helpers/tiny_mce_helper.rb
+++ b/app/helpers/tiny_mce_helper.rb
@@ -26,7 +26,15 @@ module TinyMceHelper
img = TinyMceAsset.find_by_id(match[1])
next unless img && check_image_permissions(obj, img)
if pdf_export_ready
- report_image_asset_url(img, :tiny_mce_asset, 'tiny-mce-pdf-ready')
+ tmp_f = Tempfile.open(img.image_file_name, Rails.root.join('tmp'))
+ begin
+ img.image.copy_to_local_file(:large, tmp_f.path)
+ encoded_image = Base64.strict_encode64(tmp_f.read)
+ ""
+ ensure
+ tmp_f.close
+ tmp_f.unlink
+ end
else
image_tag(img.url,
class: 'img-responsive',
diff --git a/app/views/reports/elements/_my_module_result_asset_element.html.erb b/app/views/reports/elements/_my_module_result_asset_element.html.erb
index 84f341a44..62cc048c3 100644
--- a/app/views/reports/elements/_my_module_result_asset_element.html.erb
+++ b/app/views/reports/elements/_my_module_result_asset_element.html.erb
@@ -38,7 +38,11 @@