Skip to content

Page number is not in pages number range! #10

@ghost

Description

Just ran into your blogpost and awesome solution. Installed the plugin using NuGet, pulled the latest Ghostscript 9.50 (gsdll64.dll) assembly into the bin folder and used the following Razor to generate the image url: @Url.GetCropUrl(item, furtherOptions: "&format=jpg&width=500")

So far, so good but when viewing the image url, the following (not so good) exception is shown:

[GhostscriptException: Page number is not in pages number range!] Ghostscript.NET.Viewer.GhostscriptViewerPdfFormatHandler.InitPage(Int32 pageNumber) +206 Ghostscript.NET.Viewer.GhostscriptViewer.ShowPage(Int32 pageNumber, Boolean refresh) +160 Ghostscript.NET.Rasterizer.GhostscriptRasterizer.GetPage(Int32 xDpi, Int32 yDpi, Int32 pageNumber) +39 ImageProcessor.Plugins.Pdf.PdfRasterizer.Rasterize(Stream pdfStream, Int32 pageNumber) +54 ImageProcessor.ImageFactory.Load(Stream stream) +129 ImageProcessor.Web.HttpModules.<ProcessImageAsync>d__31.MoveNext() +4497 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +60 System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar) +64 System.Web.AsyncEventExecutionStep.InvokeEndHandler(IAsyncResult ar) +209 System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +156

I don't have a clue as to what to do with the page number. Have I missed something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions