BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
I am trying to use PDFViewer component with your sample code from here:
https://github.com/SyncfusionExamples/syncfusion-react-pdfviewer-component-in-nextjs/blob/master/app/page.tsx
I am getting error messages depending on
serviceUrl, I saw different 2 serviceUrl on your samples and documentations and I tested both of them but still error on there.
serviceUrl="https://services.syncfusion.com/react/production/api/pdfviewer"
serviceUrl="https://ej2services.syncfusion.com/production/web-services/api/pdfviewer"
Error Message is :
Web-service is not listening. PDF Viewer depends
on web-service for all it's features. Please start the
web service to continue.
Error Message is :
Invalid PDF file type or PDF file not found. Please
select a valid PDF file
current code is :
how can I solve the problem ?
Best regards,
Hi
In the provided code snippet, we can see that the online service URL is used, which was created for demonstration purposes. If you want to test locally, you can set up your own service URL. Please refer to the documentation below to create the local service on your end.
Alternatively, if you don't require the service, the PDF Viewer will function in standalone mode without any dependency on the service. We provide a Standalone PDF Viewer component that renders PDFs entirely on the client side, eliminating the need for any server-side service to display the PDF. For your reference, we have provided the documentation on the Standalone PDF Viewer below.
Standalone PDF Viewer Documentation
Regards,
Priyadharshini