Hi and thanks for watching!
Background
I am using a Rotativa pdf tool to read a presentation (html) to a PDF file. It works great, but it does not offer a way to save PDF to the file system. Rather, it returns the file to the user browser as a result of the action.
Here is what this code looks like:
public ActionResult PrintQuote(FormCollection fc)
{
int revisionId = Int32.Parse(Request.QueryString["RevisionId"]);
var pdf = new ActionAsPdf(
"Quote",
new { revisionId = revisionId })
{
FileName = "Quote--" + revisionId.ToString() + ".pdf",
PageSize = Rotativa.Options.Size.Letter
};
return pdf;
}
This code calls another actionresult ("Quote"), converts it to PDF, and then returns the PDF as a file upload to the user.
Question
How to intercept a stream of files and save a PDF in my file system. It is true that the PDF code is sent to the user, but my client also wants the PDF file to be saved in the file system at the same time.
Any ideas?
Thank!
Matt