Open luvssti opened 4 years ago
The error,
Win32Exception: The system cannot find the file specified.
System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
System.Diagnostics.Process.Start()
indicate missing wkhtmltopdf.exe
in your project / bin directory.
e.g. https://github.com/arichika/RotativaCore/tree/master/src/RotativaCore.SampleWebApp.3.0
Please check this.
(project)\WkHtmlToPdf
implement RazorPageAsPdf https://stackoverflow.com/questions/59349176/razor-pages-pdf-generation-with-rotativa-model-null
Ohh... That's great solution. The issue was that you wanted to run it in Razor Pages. I was mistaken. When I see the work I'm working on, I'll try to implement it in this module.
Thank You for the reply... I've been busy on another project and just got back to continue my previous project.
What is the point of this project? Can you run an executable in Azure bin folder?
Hi, I just want to if how can I fix this error?
Thank You and God Bless!
`public class PDFModel : PageModel {
}`
Win32Exception: The system cannot find the file specified. System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) System.Diagnostics.Process.Start() RotativaCore.WkhtmlDriver.Convert(string wkhtmlPath, string switches, string html, string wkhtmlExe) RotativaCore.WkhtmltopdfDriver.Convert(string wkhtmltopdfPath, string switches) RotativaCore.AsPdfResultBase.WkhtmlConvert(string switches) RotativaCore.AsResultBase.CallTheDriver(ActionContext context) RotativaCore.AsResultBase.BuildFile(ActionContext context) RotativaCore.AsResultBase.ExecuteResult(ActionContext context) Microsoft.AspNetCore.Mvc.ActionResult.ExecuteResultAsync(ActionContext context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultAsync(IActionResult result) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeResultAsync(IActionResult result) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext<TFilter, TFilterAsync>(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeNextResultFilterAsync<TFilter, TFilterAsync>() Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext<TFilter, TFilterAsync>(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters() Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.gAwaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
Microsoft.AspNetCore.Routing.EndpointMiddleware.g AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)