We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.pdf for .net v20.7 PDF转换图片异常

使用 .netcore3.1 + centos7 进行测试,在window平台下没有发现这个问题,请问这个是什么原因造成的呢?万分感谢!
异常信息:
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id “0HM1PVKNOC2RP”, Request id “0HM1PVKNOC2RP:00000001”: An unhandled exception was thrown by the application.
System.ArgumentNullException: Value cannot be null. (Parameter ‘key’)
at System.Collections.Generic.Dictionary2.FindEntry(TKey key) at System.Collections.Generic.Dictionary2.TryGetValue(TKey key, TValue& value)
at #=z_XCRU2dc7OjZxfp9LjKOq0ceMi$hvHMFyQ==.#=zELORVws=(#=zsg$NTyo= #=z9K54qFs=)
at #=z3WF3ydXuQk0VF1x0MJUe8BozwZFynNKZHg==.#=z_m7WgTFOMwVt.#=z2Qz$5ii7ZwDh(#=zsg$NTyo= #=z9K54qFs=, #=zx2QRjnA=& #=ziW_6yvU=)
at #=zK9FEIoyaDxuzPl42VzY_nA9qc34mZ$AJfRAHohs=.#=z1bIBdJ6ZYPja(#=zhuqx94bvcZT$fcJA3XV$kjhYyvPZ #=zBQWB2mUe_GOM)
at #=zELbrSi_IISUNqygYBnEQ6PJC1veU.#=z6CqBJbw=(#=z8Bb7XmHz$Y3O_z_y34NrmW83poJq7U_x0gk32SJlCVy9& #=zWRPqdQI=)
at #=zELbrSi_IISUNqygYBnEQ6PJC1veU.#=z6CqBJbw=()
at Aspose.Pdf.Devices.ImageDevice.#=z6CqBJbw=(Page #=z3HFhqzw=)
at Aspose.Pdf.Devices.JpegDevice.Process(Page page, Stream output)
at WebApplication1.Controllers.HomeController.GetTest() in D:\netcore\WebApplication1\WebApplication1\Controllers\HomeController.cs:line 19
at lambda_method(Closure , Object , Object[] )
at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
— End of stack trace from previous location where exception was thrown —
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
— End of stack trace from previous location where exception was thrown —
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

@wahchiu

您能否尝试在系统中安装所有Windows字体和libgdiplus软件包。如果问题仍然存在,请告诉我们。

@asad.ali
已经安装,问题仍然存在,依然报出同样的异常信息,请问我还可能存在哪方面遗漏?谢谢!

@wahchiu

您能否与示例文件一起共享示例代码段。我们将在我们的环境中测试该场景并相应地解决它。

@asad.ali
这是我们的测试工程。
ProcessImage.zip (18.7 KB)

@wahchiu

感谢您分享示例项目。该示例项目中没有任何示例文件。文件夹“文件”为空。您也可以共享示例文件吗?

@asad.ali

很抱歉造成你的困惑,我再分享下示例项目 (它是一个Web工程)。
麻烦了,谢谢你!

ProcessImage.zip (18.7 KB)
20200811102719.png (8.4 KB)

@wahchiu

我们还可以看到Controller文件。但是,我们需要您在HomeController.cs的代码段中使用的样本PDF文档。请检查随附的空白文件夹的屏幕快照。missing file.png (5.0 KB)

@asad.ali

不好意思,误会了你的意思,我整理了一个新的项目。劳烦了!

ProcessImage.zip (237.3 KB)

@wahchiu

我们已在问题跟踪系统中将问题记录为PDFNET-48641,以进行进一步调查。我们将调查其详细信息,并向您发布其纠正状态。请耐心等待,为我们节省一些时间。

我们对造成的不便很抱歉。