From c3534a725b8b45ded20f746784cca51d531ff0f8 Mon Sep 17 00:00:00 2001 From: Balaji Loganathan Date: Fri, 6 Feb 2026 20:53:59 +0530 Subject: [PATCH] 1008844: Updated getting started documentation for JS and TS --- .../getting-started-with-server-backed.md | 4 ++-- .../PDF/PDF-Viewer/javascript-es5/getting-started.md | 6 +++++- .../getting-started-with-server-backed.md | 10 +++++----- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Document-Processing/PDF/PDF-Viewer/javascript-es5/getting-started-with-server-backed.md b/Document-Processing/PDF/PDF-Viewer/javascript-es5/getting-started-with-server-backed.md index b7d967d48..44dd6f336 100644 --- a/Document-Processing/PDF/PDF-Viewer/javascript-es5/getting-started-with-server-backed.md +++ b/Document-Processing/PDF/PDF-Viewer/javascript-es5/getting-started-with-server-backed.md @@ -93,12 +93,12 @@ To enable additional features, inject the required modules. The following module dotnet run ``` -6. The PDF Viewer server instance runs at `https://localhost:5001`. Navigate to `https://localhost:5001/pdfviewer`, which returns the default GET response method. Bind this link to the `serviceUrl` property of the PDF Viewer as shown below. +6. The PDF Viewer server instance runs at `https://localhost:7255`. Navigate to `https://localhost:7255/pdfviewer`, which returns the default GET response method. Bind this link to the `serviceUrl` property of the PDF Viewer as shown below. ```javascript var pdfviewer = new ej.pdfviewer.PdfViewer({ documentPath: "https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf", - serviceUrl: 'https://localhost:5001/pdfviewer' + serviceUrl: 'https://localhost:7255/pdfviewer' }); ``` diff --git a/Document-Processing/PDF/PDF-Viewer/javascript-es5/getting-started.md b/Document-Processing/PDF/PDF-Viewer/javascript-es5/getting-started.md index 090208b99..2641a4a43 100644 --- a/Document-Processing/PDF/PDF-Viewer/javascript-es5/getting-started.md +++ b/Document-Processing/PDF/PDF-Viewer/javascript-es5/getting-started.md @@ -67,4 +67,8 @@ var pdfviewer = new ej.pdfviewer.PdfViewer({ View the sample in GitHub to [load PDF Viewer with local resources](https://github.com/SyncfusionExamples/javascript-pdf-viewer-examples/tree/master/How%20to/Refer%20resource%20url%20locally) -**Step 4:** Now, run the `index.html` in web browser, it will render the `Essential JS 2 PDF Viewer` component. +**Step 4:** Now, run the `index.html` in web browser using a local web server, it will render the `Essential JS 2 PDF Viewer` component. You can use the following command to start the server. + + ``` + npx serve . + ``` diff --git a/Document-Processing/PDF/PDF-Viewer/javascript-es6/getting-started-with-server-backed.md b/Document-Processing/PDF/PDF-Viewer/javascript-es6/getting-started-with-server-backed.md index b73a5b5ef..c657dd35d 100644 --- a/Document-Processing/PDF/PDF-Viewer/javascript-es6/getting-started-with-server-backed.md +++ b/Document-Processing/PDF/PDF-Viewer/javascript-es6/getting-started-with-server-backed.md @@ -84,7 +84,7 @@ PdfViewer.Inject(Toolbar, Magnification, Navigation, Annotation, LinkAnnotation, let pdfviewer: PdfViewer = new PdfViewer(); pdfviewer.serviceUrl = 'https://document.syncfusion.com/web-services/pdf-viewer/api/pdfviewer/'; pdfviewer.appendTo('#PdfViewer'); -pdfviewer.load('https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf', null); +pdfviewer.load('https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf', ''); {% endhighlight %} {% endtabs %} @@ -147,7 +147,7 @@ document.getElementById('load').addEventListener('click', function () { pdfViewer.serviceUrl = "https://document.syncfusion.com/web-services/pdf-viewer/api/pdfviewer"; pdfViewer.documentPath = "https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"; pdfViewer.dataBind(); - pdfViewer.load(pdfViewer.documentPath, null); + pdfViewer.load(pdfViewer.documentPath, ''); }); N> The Web API link https://document.syncfusion.com/web-services/pdf-viewer/api/pdfviewer/ used in the `serviceUrl` property is intended for demonstration and evaluation only. For production, host your own web service with the required server configuration. You can reuse the [GitHub web service example](https://github.com/SyncfusionExamples/EJ2-PDFViewer-WebServices) or [Docker image](https://hub.docker.com/r/syncfusion/pdfviewer-server). **Standalone mode is strongly recommended.** @@ -198,15 +198,15 @@ Inject modules using the `PdfViewer.Inject` method. dotnet run ``` -6. The PDF Viewer server instance runs at `https://localhost:5001`. Navigate to `https://localhost:5001/pdfviewer` to see the default GET response. Bind this URL to the [serviceUrl](https://ej2.syncfusion.com/documentation/api/pdfviewer#serviceurl) property of the PDF Viewer as shown below. +6. The PDF Viewer server instance runs at `https://localhost:7255`. Navigate to `https://localhost:7255/pdfviewer` to see the default GET response. Bind this URL to the [serviceUrl](https://ej2.syncfusion.com/documentation/api/pdfviewer#serviceurl) property of the PDF Viewer as shown below. {% tabs %} {% highlight ts tabtitle="app.ts" %} let pdfviewer: PdfViewer = new PdfViewer(); -pdfviewer.serviceUrl = 'https://localhost:5001/pdfviewer'; +pdfviewer.serviceUrl = 'https://localhost:7255/pdfviewer'; pdfviewer.appendTo('#PdfViewer'); -pdfviewer.load('PDF_Succinctly.pdf', null); +pdfviewer.load('PDF_Succinctly.pdf', ''); {% endhighlight %} {% endtabs %}