开发者

rendering a pdf with rails-latex that has no corresponding html view

开发者 https://www.devze.com 2023-03-12 08:12 出处:网络
I\'m trying to find a replacement for rtex in rails 3 and found rails-latex开发者_StackOverflow社区.

I'm trying to find a replacement for rtex in rails 3 and found rails-latex开发者_StackOverflow社区. In the example application in the git repository the following link in index.html.erb renders a pdf file using the latex code in index.pdf.erb:

<%= link_to "print", latex_example_path(:format => :pdf) %>

Is it also possible to generate a pdf file from let's say article_list.pdf.erb if there's no article_list.html.erb? Do I have to change my routes for the problem? At the moment I only have the following route: match ':controller(/:action(/:id(.:format)))'

Thanks for your help!


When you are asking for a URL in a specific format, it will render this format regardless of the other format templates. Please try it and ask again if not working.

0

精彩评论

暂无评论...
验证码 换一张
取 消