Skip to content

Error generating PDF #11

@luvssti

Description

@luvssti

Hi,
I just want to if how can I fix this error?

Thank You and God Bless!

`public class PDFModel : PageModel
{

    public ActionResult OnGet()
    {
        var report = new ActionAsPdf(Url.Content("~/TestPDF"), new { })
        {
            PageMargins = { Left = 10, Bottom = 10, Right = 10, Top = 10 },
            PageSize = RotativaCore.Options.Size.Legal,
            CustomSwitches = "--disable-smart-shrinking"

        };
        return report;
    }

}`

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.g__Awaited|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)

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions