Closed AlainPilon closed 9 years ago
Try using regular javascript_include_tag
, or base64 encode it. Some large JS files include markup, that could break out of the <script>
tag that is created with wicked_pdf_javascript_include_tag
.
Let me know how it goes.
Bump since adding the last comment on my phone caused everything after the <script>
tag to not show, and it appeared incomplete.
Also, check out #314, and #257
I fixed the used by only including the JS I needed as you suggested. Just annoying.
I used both the CSS and JS helper in my layout:
%html{:lang => I18n.locale} %head = wicked_pdf_stylesheet_link_tag 'application' = wicked_pdf_javascript_include_tag 'application' ....
When I used the CSS alone, everything works, but if I add the JS, it will output on the page the full content of the application.js file. Any idea why? I will be rendering a lot of charts on the PDF which requires a lot of JS files, hence the reason to use the application file instead of calling each one individually.