- Home
- Forum
- React - EJ 2
- React PDFViewer with .Net Core Web API service not working
React PDFViewer with .Net Core Web API service not working
I am trying to render React PDFViewerComponent similar to https://ej2.syncfusion.com/react/demos/?_ga=2.105078531.1414292391.1566478414-1376420778.1564721332#/material/pdfviewer/default
I have referred the following link to create the PDFViewer Web Service in .Net Core https://www.syncfusion.com/kb/10346/how-to-create-pdf-viewer-web-service-application-in-asp-net-core
Message is displayed as "Web-service is not listening. PDF Viewer depends on web-service for all it's features. Please start the web service to continue."
The request RenderPDFPages returns 200 OK but with the response as "Parameter is not valid".
Please suggest asap.
SIGN IN To post a reply.
4 Replies
AA
Akshaya Arivoli
Syncfusion Team
August 26, 2019 06:12 AM UTC
Hi Neelima,
Thank you for contacting Syncfusion support.
We are unable to reproduce the reported issue with the details provided in the incident. We shared a simple PDF Viewer sample with v17.2.0.46 in which we have tried to reproduce the reported issue in the
below link,
React sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/quickstart-react-1066490599
Web Service Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ej2-pdfviewer-web-service-358143740
Note: Kindly run the web service sample and provide that URL to the serviceUrl property of the PDF Viewer. Then run the React sample.
However we suspect that zoomFactor may be negative in the json data of the RenderPdfPages(). So, can you please check whether the zoomFactor is negative or not. If so, then we suspect that the PDF Viewer not initialized, or the display property of the PDF Viewer is set to none. Kindly ensure whether the viewer is initialized properly.
Please try this and revert us with the modified sample, Essential Studio Version, PDF document and more details about your issue if you are still facing the issue. It will be helpful for us to investigate further and assist you better.
Regards,
Akshaya
NE
Neelima
August 31, 2019 07:08 PM UTC
Hi Team,
Thanks for providing the sample. When I upgraded the version, it works perfectly in local solution, but when deployed to IIS or Azure, the css is not applied properly. I have referred to the css as below similar all other css files. Note, we are using webpack for bundling.
import '../node_modules/@syncfusion/ej2-base/styles/material.css';
import '../node_modules/@syncfusion/ej2-buttons/styles/material.css';
import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css';
import '../node_modules/@syncfusion/ej2-inputs/styles/material.css';
import '../node_modules/@syncfusion/ej2-navigations/styles/material.css';
import '../node_modules/@syncfusion/ej2-popups/styles/material.css';
import '../node_modules/@syncfusion/ej2-splitbuttons/styles/material.css';
import "../node_modules/@syncfusion/ej2-react-pdfviewer/styles/material.css";
import "../node_modules/@syncfusion/ej2-notifications/styles/material.css";
NE
Neelima
September 4, 2019 04:20 AM UTC
Is there anything I am missing here. Can you suggest why the styles are not rendered when deployed, but work fine in local solution.
AA
Akshaya Arivoli
Syncfusion Team
September 4, 2019 02:33 PM UTC
Hi Neelima,
We can resolve the reported issue by referring the CSS files using the CDN links in index.html in production environment,
|
<link rel='nofollow' href="https://cdn.syncfusion.com/ej2/17.2.49/material.css" rel="stylesheet" /> |
We have modified the sample for the same and shared in the following location,
Please find the below UG for referring the CDN links.
Please try this and revert us with the modified sample and more details about your issue if you are still facing the issue.
Regards,
Akshaya
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
-
NE Neelima
- Aug 23, 2019 01:36 PM UTC
- Sep 4, 2019 02:33 PM UTC