asp.net mvc 5 - How to save Rotativa PDF on server -


I am using Rotativa to create a PDF in my "MVC" application. How can I save Rotativa PDF? After all the process is completed, I need to save the document on the server.

Code below:

  public function PRVRequestPdf (string refund, string emid) {var prv = Functions.getprvrequest (refnum, emid); See Return (PRV); } PRVREXEx model as public functioning PDFPRVRequest () {var PRV = session ["PRV"]; Byte [] pdfByteArray = Rotativa.WkhtmltopdfDriver.ConvertHtml ("Rotativa", "Approver", "PRVRequestPdf"); Return to the new rotativia. ViewAsPdf ("PRVREXPDF", new {refnum = prv.rheader.request.Referenceno}); }  

You can try it

  Var Action Result = New ActionApPDF ("PRVREXPDF", New {Ref. = PRVR .. Requested, EMID = "Whatever"}); Var Bitere = Action Result .Build PDF (Controller Context); Var filestream = new filestream (write fullpath, flamemod.creative, file essay); FileStream.Write (Bytere, 0, Bytere Lang); FileStream.Close ();  

If that does not do the trick, then you can follow the answers

Just make sure that you do not have to do this PRVRequestPdf a PDF view, rather than a general view you have above (only to mention that it can be bad because of its very bad).


Comments

Popular posts from this blog

Active Directory Authenticated Proxy Server with Squid or CNTLM -

java - Can't add JTree to JPanel of a JInternalFrame -

java - @PluginTarget(Node.class) not registering as neo4j plugin -