简体   繁体   English

rails格式为pdf并保存到Amazon s3

[英]rails form to pdf and save to amazon s3

I have a form for users to fill out about specific attributes first_name,last_name etc. I need to generate a pdf from this form and also send an email with the pdf of the form as an attachment. 我有一个表格供用户填写有关first_name,last_name等特定属性的信息。我需要从此表格生成pdf,还需要发送一封电子邮件,其中包含该表格的pdf作为附件。

My approach was to save it to Amazon S3 and somehow attach it in the create method in my controller. 我的方法是将其保存到Amazon S3,并以某种方式将其附加到控制器的create方法中。

Any input would be greatly appreciated! 任何投入将不胜感激!

You will probably need to use something like the prawn gem https://github.com/prawnpdf/prawn . 您可能需要使用类似prawn gem的东西https://github.com/prawnpdf/prawn This will allow you to generate a PDF file from within your application. 这将允许您从应用程序内部生成PDF文件。 Your question is somewhat vague though, but you should be able to generate the PDF fairly easily using prawn 您的问题虽然有些含糊,但您应该能够使用对虾轻松生成PDF

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM