WebComponent API, export to pdf is failing

Posted by: rico on 18 April 2024, 6:53 am EST

  • Posted 18 April 2024, 6:53 am EST

    we are having an issue exporting to pdf using web api.

    when we use the online version of the webapi project, it works fine.

    https://developer.mescius.com/componentone/demos/aspnet/5/C1WebAPI/latest/api/report/ReportsRoot/DataManipulation/Parameters.flxr/parameters/$report/export?parameters.prmBeginningDate=1/1/2024&exportOptions.format=pdf

    however, when we use this same format for our project or even the sample web api project included in the componentonecontrolpanel downloads

    …/$report/export?exportOptions.format=pdf

    the export fails with this error:

    An error has occurred.

    Method not found: ‘Void C1.Win.C1Document.Export.PdfSecurityOptions.set_EncryptionType(C1.C1Pdf.PdfEncryptionType)’.

    System.MissingMethodException

    at #Cjt.#Zjt.CreateExportFilter() at C1.Web.Api.Document.Models.ExportFilterOptions.ToExportFilter(String tempFolder) at C1.Web.Api.Document.DocumentRequestContext

    1.GetExportFilter(ExportFilterOptions options) at C1.Web.Api.Report.ReportController.#Tyb.#Kmt() at C1.Web.Api.C1ApiController.ProcessAction(Func
    1 func) at lambda_method(Closure , Object , Object ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_0.b__2(Object instance, Object methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken) — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ApiControllerActionInvoker.d__1.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ActionFilterResult.d__5.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ExceptionFilterResult.d__6.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Web.Http.Controllers.ExceptionFilterResult.d__6.MoveNext() — End of stack trace from previous location where exception was thrown — at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__15.MoveNext()

    the url used with sample project was this:

    http://localhost:16410/api/report/ReportsRoot/DataManipulation/Parameters.flxr/parameters/$report/export?exportOptions.format=pdf

    Note: if I change pdf to html in that url it DOES work.

  • Posted 18 April 2024, 9:31 pm EST

    Hi Ricardo,

    We were able to replicate the issue on our end, we suspect this may be a bug and therefore we have reported the same to our development team with the internal tracking id-C1WEB-29658. We’ll let you know of any updates we have for you.

    Thanks for your patience!

    Regards,

    Manish Gupta

  • Posted 23 April 2024, 1:23 am EST

    Can we get an update on this ?

  • Posted 23 April 2024, 8:40 pm EST

    Hi Rico,

    This issue is still with the development team. We will let you know as we get an update on this.

    Regards,

    Manish Gupta

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels