Welcome Guest Search | Active Topics | Sign In | Register

v23.3.5 - receiving exception "Either TargetUrl or TargetDestination must be set" Options
Phil
Posted: Monday, August 28, 2023 3:12:07 AM
Rank: Advanced Member
Groups: Member

Joined: 11/8/2017
Posts: 64
Hi, we have an Angular 14 application testing the latest EO-PDF version 23.3.5. I am consistently receiving the following exception for certain reports

System.Exception: Either TargetUrl or TargetDestination must be set.
at EO.Pdf.PdfLink.weuf(Boolean nk, coqe nl)
at EO.Pdf.PdfLink.Render()
at EO.Internal.fvfv.iyqt(HtmlDocument bqi, fvaw bqj, Boolean bqk, Int32 bql, Int32 bqm)
at EO.Internal.fvay.eykv(HtmlToPdfResult xp, fvaw xq, coqe xr)
at EO.Internal.fvay.cfpj(fvaz xl)

at System.Environment.get_StackTrace()
at EO.Base.BaseException..ctor(String lss, Exception lst)
at EO.Pdf.HtmlToPdfException..ctor(HtmlToPdfErrorCode acc, Int32 acd, String ace, Exception acf)
at EO.Pdf.HtmlToPdfException.kwtx(Exception acg)
at EO.Internal.fvay.cfpj(fvaz xl)
at EO.Internal.fvay.cfpj()
at EO.Pdf.HtmlToPdfSession.RenderAsPDF(PdfDocument doc)
at EO.Pdf.HtmlToPdf.tdcx.durw()
at EO.Internal.fvgb.ssgg[a](qzkq`1 btc)
at EO.Pdf.HtmlToPdf.ConvertHtml(String html, PdfDocument doc, HtmlToPdfOptions options)
at EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream, HtmlToPdfOptions options)
at EO.Pdf.HtmlToPdf.ConvertHtml(String html, Stream stream)
at MI.ParentReporting.Web.PdfGenerate.NetCore.Controllers.PdfGenerateController.GeneratePdf(UploadData uploadData, Int32& pageCount, HtmlToPdfResult& coversheetHtmlToPdfResult, Byte[]& coversheetPdf, Boolean generateFromCoversheetHtml) in C:\Projects\Api\MI.ParentReporting.Web.PdfGenerate.NetCore\Controllers\PdfGenerateController.cs:line 824
at MI.ParentReporting.Web.PdfGenerate.NetCore.Controllers.PdfGenerateController.Post(UploadData uploadData) in C:\Projects\Api\MI.ParentReporting.Web.PdfGenerate.NetCore\Controllers\PdfGenerateController.cs:line 120
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at MI.ParentReporting.Web.PdfGenerate.NetCore.Controllers.PdfGenerateController.Post(UploadData uploadData)
at lambda_method(Closure , Object , Object[] )
at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.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()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeAsync()
at Microsoft.AspNetCore.Mvc.Routing.ActionEndpointFactory.<>c__DisplayClass7_0.<CreateRequestDelegate>b__0(HttpContext context)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.HostFiltering.HostFilteringMiddleware.Invoke(HttpContext context)
at Microsoft.WebTools.BrowserLink.Net.BrowserLinkMiddleware.ExecuteWithoutFilterAsync(HttpContext context)
at Microsoft.WebTools.BrowserLink.Net.BrowserLinkMiddleware.InvokeAsync(HttpContext context)
at Microsoft.WebTools.BrowserLink.Net.VsContentMiddleware.InvokeAsync(HttpContext context)
at Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserRefreshMiddleware.InvokeAsync(HttpContext context)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserRefreshMiddleware.InvokeAsync(HttpContext context)
at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Hosting.HostingApplication.ProcessRequestAsync(Context context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecuteFromThreadPool(Thread threadPoolThread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()


For our previous version (23.1.77, and all tested versions before), I have not seen this message - as well, I have tested the same request using 23.1.77 and didn't get the above exception - something appears to have changed between the two versions - is this a bug or is this something (i.e. TargetUrl or TargetDestination) that now needs to be set before requesting the PDF - if so do you have a code sample ?

Kind regards
Phil
eo_support
Posted: Monday, August 28, 2023 9:31:21 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Hi,

Sorry about the problem. We are aware of this issue. This occurs when you have a repeated table header/footer with a non-clickable link inside it (for example, a link with "javascript:" target, which is not functional inside the PDF file). These links are always rendered as "dead links" in previous version, however from 23.3.5 it will attempt to render clickable links. We will add code to detect non-clickable links and post an updated build as soon as possible.

Thanks!
Phil
Posted: Monday, August 28, 2023 11:22:04 PM
Rank: Advanced Member
Groups: Member

Joined: 11/8/2017
Posts: 64
Ok - thanks for sharing - would be good if you could reply when the new version is released
Phil
Posted: Tuesday, August 29, 2023 5:47:34 AM
Rank: Advanced Member
Groups: Member

Joined: 11/8/2017
Posts: 64
I see v23.3.10 has been released - I can confirm it fixes the "Either TargetUrl or TargetDestination must be set." issue I was having
eo_support
Posted: Tuesday, August 29, 2023 9:18:29 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,088
Great. Thanks for confirming!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.