We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ViewAsPdf use to Save file on Server Path but not work by SaveOnServerPath Property
ViewAsPdf
var pdfname = String.Format("{0}.pdf", Guid.NewGuid().ToString()); var path = Path.Combine(@"MyPathProject\wwwroot\doc\Claim\Request", pdfname); path = Path.GetFullPath(path); var pdfResult = new ViewAsPdf { ViewName = "_ToPDF", Model = memo, FileName = pdfname, SaveOnServerPath = path };
The text was updated successfully, but these errors were encountered:
Late, but just for reference if anyone stumbles on this issue. This works:
var pdf = new ViewAsPdf() { SaveOnServerPath = "wwwroot/output.pdf" }; pdf.BuildFile(this.ControllerContext);
SaveOnServerPath is obsolete though. If you don't specify it, a byte array is returned, which you can use to save the file yourself:
SaveOnServerPath
var pdfFile = new ViewAsPdf().BuildFile(this.ControllerContext); File.WriteAllBytes("wwwroot/output.pdf", pdfFile);
Added this as documentation in #92.
Sorry, something went wrong.
No branches or pull requests
ViewAsPdf
use to Save file on Server Path but not work by SaveOnServerPath PropertyThe text was updated successfully, but these errors were encountered: