Oct 24
It’s about more than 6 months i haven’t written any post.
Why ?
Recently join new organiztion,
Can’t get time because we are working almost more than 10 to 12 hr day with messy code.
So we are spending more time to refactoring and optimising code,and scaling application also.
Now i started making my time to writing.
In my current organization we are generating various Pdf report.
We are using prawn but now we are switching to  acts_as_flying_saucer.
So there are couple of challenges i have faced
1) XHTML code is not proper
2) Special character in html
Solution
Cleanup Html code
I am using tidy library clean up html code.
By passing :clean=>true it will cleanup html befor generating pdf.
3) Send PDF as email
Solution
Generate PDF on server and do some processing like attached to mail.
:send_attachment => true it will generate pdf and return path of pdf file then do some processing.
So couple of new feature is added to acts_as_flying_saucer
1) Clean up  html by passing :clean=>true
2) Generate pdf on server (locally) by passing :send_attachment=>true
3) acts_as_flying_saucer is also working with rails 3.1 (precomplie asset) and heroku.

It’s about more than 6 months i haven’t written any post Why ?

because recently join new organization, and can’t get much more time , we are working almost more than 10 to 12 hr day with messy code.So we are spending more time to  refactoring and optimizing code,and scaling application.😥

In my current organization we are generating various PDF report.We are using prawn but now we are switching to acts_as_flying_saucer.

So there are couple of challenges i have faced

  1. XHTML code is not proper
  2. Special character in html

Solution: Cleanup Html code

Continue reading »

Tagged with:
preload preload preload