Just quick post how to use acts_as_flying_saucer with rails 3.1 and Heroku. I was testing acts_as_flying_saucer with rails 3.1.It is working fine so far. but when i have added external style sheet it was hanging on dev mode. and later on i figure out it is external style sheet causing an issue. So i precomplied css and then try to generate pdf it is working. Now it is time to test on heroku. I am using cedar stack and ruby …
Tag: Ruby
Generate PDF using acts_as_flying_saucer.It also support for clean up html before generating pdf,pdf can be generated on remote and do further processing. …
Hi all, We needed to use net/http of ruby for sending parameters between two modules. We decided to use the get and the post request of http as follows: url = URI.parse(“http://SERVER:PORT”) http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Get.new(“/method_name?parameter=a”) response = http.request(request) In the above get request the parameter “a” is taken to the “http://SERVER:PORT/method_name” and data related to it is queried. url = URI.parse(“http://SERVER:PORT”) http = Net::HTTP.new(url.host, url.port) request = Net::HTTP::Post.new(“/method_name”) request.set_form_data({“parameter1” => “a”, “parameter2” => “b”, “parameter3” => …
Today I will demonstrate how did I manage to get Selenium (browser => “firefox”) running under headless state (click here to know more on this) . Now we need Xvfb to accomplish this dirty task. For Ubuntu the package is fairly straight forward just type in the command . Under Fedora the same can be achieve using command . For more on Xvfb package check your distribution provider . …
In previous article we have seen that how to start nailgun server,and use of nailgun in shortly. Now in this article how to use nailgun using ruby application which directly/indirectly use java library or java application. You can start with nailgun manually as shown previous article and configure ng as per need.Or you can install nailgun plugin from github. …
In previous article we have seen that how pdf is generated using act_as_flying_saucer plugin. Following code snippets is used for generating pdf with bookmark . <bookmark name=”section 1″ href=”#section_1″> tag is used to generate bookmark. which contains name attribute for displaying name of bookmark. href attribute is used for navigation purpose. <bookmark> tag can be nested so it can be used for generating nested bookmark <bookmark> tag is wrapper with <bookmarks> tag. This tag placed in html header. Now in …
Pdf with password protected in rails In previous article we have seen that how pdf is generated using act_as_flying_saucer plugin. Now act_flying_saucer has added support for password protected pdf. To generate PDF with password protection just pass :password=>”xxx” to render_pdf method. You can install act_as_flying_saucer plugin For further details you can visit article or visit http://github.com/amardaxini/act_as_flying_saucer …
In this article i have just taken a short example describing vertical table,and its implementation using rails. When table has no fixed column it has dynamic fields .data is not stored on separate column but data stores in vertical fashion. For implementing vertical table table has mainly 2 columns key and value pair.key is like database column name and value contains actual data. Lets take an e.g Consider website in which it contains various products and its comparison ,searching and …
Rails Pdf Plugin act_as_flying_saucer There are various ways to generate pdf documents in any language.In Rails we can use prawn library ,HtmlDoc,PrinceXml and many other library,using their api we can generate pdf document.Basically the primary goal is converting HTML web pages to PDF Document,without much changing existing CSS and HTML. Using the Flying Saucer Project we can achieve this.we can convert HTML + CSS to PDF documents without much changing HTML and CSS. It also support CSS 2 and many …