0

i am creating a pdf viewer application in react with Nodejs as its backend server… as per DevExpress' Documentation for "# Document Viewer Integration in React Application" the back end server is only made using ASP.Net but i want to use Node.js…

i have also tried fiddling with you Code snippet:

import "../App.css";
import { useEffect, useRef } from "react";
import { DxReportViewer } from "devexpress-reporting/dx-webdocumentviewer";
import * as ko from "knockout";

export const ReportViewer = (props) => {
  const reportUrl = ko.observable(`${props.pdfURL}`);
  const viewerRef = useRef();
  const requestOptions = { // i dont know if this is correct or not 
    host: "blob:https://localhost:3000/",
  };
  useEffect(() => {
    const viewer = new DxReportViewer(
      viewerRef.current,
      {
        reportUrl,
        requestOptions,
      },
      [reportUrl]
    );
    viewer.render();
    return () => viewer.dispose();
  });
  return <div ref={viewerRef}></div>;
};

form the above code snippet as you can see i am sending a prop named pdfURL and also i dont know what to pass in requestOptions but when i run the app it is throwing an error. quote: POST http://localhost:3000/DXXRDV.axd 404 (Not Found) how can i resolve this issue ?

Manan
  • 1
  • 1

0 Answers0