- Home
- Forum
- React - EJ 2
- How do I have to develop a nodejs express service in order to work with PDF viewer?
How do I have to develop a nodejs express service in order to work with PDF viewer?
Hello,
I'm working in a project build with React in the client-side and Nodejs / Express on the server-side.
I tried to use the React Pdf Viewer component to visualize PDF files server by Nodejs served. But I can't make it work.
I followed the examples of .Net servers provided and I realized that I have to implement /Load /BookMarks /RenderPdfPages... etc in my API. But it's not clear what I have to code in order to answer those requests. In .NET PdfRender object does all the magic.
My questions are:
Do I have to code all the possible requests?
How do I have to answer each one?
An finally and most important.
Is there any example in Nodejs / Express I can follow?
Thank you in advance for your help.
Best regards.
SIGN IN To post a reply.
5 Replies
1 reply marked as answer
AA
Akshaya Arivoli
Syncfusion Team
September 24, 2020 08:30 AM UTC
Hi Rafael,
Thank you for contacting Syncfusion support
At present we do not have support for PDF Viewer Web service in node js application. PDF Viewer control is both server and client-side oriented. PDF viewer control processes the PDF document on the server-side(developed with the .NET environment) and sends the processed PDF data to the client using the web service to render the PDF document and for further operations in PDF viewer.
Please find the below UG link to getting started with PDF Viewer,
We need all the web action methods provided in the below link to rendering the PDF pages and for further operations in PDF Viewer. We will send the necessary data through the AJAX request from the source level. You can create the PDF Viewer Web Service project in ASP.NET Core/ ASP.NET MVC with the help of the below links and we can also host the same and use it.
ASP.NET Core: https://www.syncfusion.com/kb/10346/how-to-create-pdf-viewer-web-service-application-in-asp-net-core
Please let us know if you have any concerns about this.
Regards,
Akshaya
RG
Rafael Garcia
September 24, 2020 03:54 PM UTC
Hi Akshaya.
Thank you so much for your quick replay
The problem, in my case, is that all the platforms for this project run in Linux, we can't include a Windows Server in it.
My question now is if you have some documentation about the message format I have to respond when an Ajax request comes.
Then I will try to implement it in Node and, if I succeed, I'll share it with all the fellow developers.
Regards.
AA
Akshaya Arivoli
Syncfusion Team
September 25, 2020 01:36 PM UTC
Hi Rafael,
Thank you for your update.
Our PDF Viewer Web service project in ASP.NET Core will be supported in Linux platform also. Kindly include the ’Syncfusion.EJ2.PdfViewer.AspNet.Core.Linux’ package in your project while working in Linux. Since our PDF Viewer is both client and server side oriented, we need to provide all the web action methods as provided in the below KB and we will send the AJAx request data from the source level.
https://www.syncfusion.com/kb/10346/how-to-create-pdf-viewer-web-service-application-in-asp-net-core
Please try it and revert us with more details if any concerns.
Regards,
Akshaya
Marked as answer
RG
Rafael Garcia
September 29, 2020 07:02 AM UTC
Thank you.
I'll check what you mention.
Regards
AA
Akshaya Arivoli
Syncfusion Team
September 30, 2020 08:09 AM UTC
Hi Rafael,
Thank you for your update. We will wait to hear from you.
Regards,
Akshaya
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
- Marked answer
-
RG Rafael Garcia
- Sep 23, 2020 10:42 AM UTC
- Sep 30, 2020 08:09 AM UTC