Hi
In accordance with your requirements, we have provided a sample that demonstrates submitting form data along with the PDF Viewer JSON object to the server. The sample utilizes the ajaxRequestInitiate event, which allows customization of the JSON data being sent to the server. The implementation also includes triggering the server-side controller's download function to retrieve the base64 data.
Please review the sample and try integrating it into your application. If you encounter any issues or need further assistance, do let us know. Your feedback will help us analyze the scenario in detail and provide the necessary support.
Sample:
Client: Nvurpg (forked) - StackBlitz
Server: WebService
Documentation: JavaScript (ES5) PDF Viewer API control - Syncfusion
Code snippet:
|
viewer.ajaxRequestInitiate = function (args) { if (args.JsonData['action'] === 'Download') { args.JsonData['formKey'] = 'formValue'; // Set custom JSON data viewer.setJsonData(args.JsonData); } };
|
Steps:
1. Open the Service Sample and
run it.
2. Open the Client-Side Sample.
Regards,
Priyadharshini