Here is one idea: in your rails application, configure it to return one html per user. In addition, you have a nice / users / index method that returns a list of users in a convenient, possibly json format.
Now you need a local script written in ruby, bash, anything convenient:
- select a list of users from this / users / method, maybe save it to a file
- loop over the list of users (from the file, so they are not all in memory), and get the HTML email address
- generate PDF from each loaded HTML, either inside a loop, or cycle through files in the directory in which you saved the HTML. Use wkhtmltopdf or similar.
- pdf , , pdf .
, , ββ resque, . pdf , , . , script .