Load base64 pdf on client side but with custom service controller for other actions

Hello Syncfusion team,

I am trying to integrate the syncfusion pdf viewer into our app.

Current use case is that I have the pdf stream already on our client and I want to directly load it into the viewer. When I try to load it as base64 with your public serviceUrl, there are no issues and the pdf is loaded correctly. For that I am using the following code:




So far so good. However I want to use a custom server-side service for all the actions except the load. I have implemented custom controller according to your documentation that contains all the required methods along with the Load method. But then when I try to load the pdf the same way I do with your public serviceUrl I receive the following error:

"The jsonObject field is required."

This is the code I am using for this:



I've tried modifying the input data from the client, but nothing changes. Also when I place a breakpoint in the controller it never hits, why is that? I would really appreciate the help or the guidance to what I am doing wrong. Thanks in advance!


Attachment: Example_3ba1ea65.zip


2 Replies

SK Shamini Kiruba Sobers Syncfusion Team May 20, 2022 05:05 PM UTC

Hi Emil,


We are checking the reported issue and we will provide further details in two business days on May 24, 2022.


Regards,

Shamini



SK Shamini Kiruba Sobers Syncfusion Team May 24, 2022 12:59 PM UTC

Hi Emil,

We were unable to reproduce the error “The jsonObject field is required.” The sample and the web service that we used at our end to check the reported issue can be downloaded from the links below.


Web Service: https://www.syncfusion.com/downloads/support/directtrac/general/ze/WEBSER~1-517930071.zip

Sample: https://stackblitz.com/edit/angular-nwzg3p?file=app.component.ts

Please refer to the below help link for creating or utilizing a web service.

Web service: https://github.com/SyncfusionExamples/EJ2-PDFViewer-WebServices

Kindly try the shared sample and let us know if the issue is resolved on your end. If not, please share the modified web service to replicate the issue at our end for further investigation.


Regards,

Shamini


Loader.
Up arrow icon