Skip to content

Commit b674946

Browse files
Merge pull request #2187 from syncfusion-content/EJ2-1008844-validate-hf
1008844: Updated getting started documentation for JS and TS
2 parents 328ea7b + ea4fd90 commit b674946

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

Document-Processing/PDF/PDF-Viewer/javascript-es5/getting-started-with-server-backed.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ To enable additional features, inject the required modules. The following module
9393
dotnet run
9494
```
9595

96-
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.
96+
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.
9797

9898
```javascript
9999
var pdfviewer = new ej.pdfviewer.PdfViewer({
100100
documentPath: "https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf",
101-
serviceUrl: 'https://localhost:5001/pdfviewer'
101+
serviceUrl: 'https://localhost:7255/pdfviewer'
102102
});
103103
```
104104

Document-Processing/PDF/PDF-Viewer/javascript-es5/getting-started.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,8 @@ var pdfviewer = new ej.pdfviewer.PdfViewer({
6767

6868
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)
6969

70-
**Step 4:** Now, run the `index.html` in web browser, it will render the `Essential JS 2 PDF Viewer` component.
70+
**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.
71+
72+
```
73+
npx serve .
74+
```

Document-Processing/PDF/PDF-Viewer/javascript-es6/getting-started-with-server-backed.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ PdfViewer.Inject(Toolbar, Magnification, Navigation, Annotation, LinkAnnotation,
8484
let pdfviewer: PdfViewer = new PdfViewer();
8585
pdfviewer.serviceUrl = 'https://document.syncfusion.com/web-services/pdf-viewer/api/pdfviewer/';
8686
pdfviewer.appendTo('#PdfViewer');
87-
pdfviewer.load('https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf', null);
87+
pdfviewer.load('https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf', '');
8888

8989
{% endhighlight %}
9090
{% endtabs %}
@@ -147,7 +147,7 @@ document.getElementById('load').addEventListener('click', function () {
147147
pdfViewer.serviceUrl = "https://document.syncfusion.com/web-services/pdf-viewer/api/pdfviewer";
148148
pdfViewer.documentPath = "https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf";
149149
pdfViewer.dataBind();
150-
pdfViewer.load(pdfViewer.documentPath, null);
150+
pdfViewer.load(pdfViewer.documentPath, '');
151151
});
152152

153153
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.
198198
dotnet run
199199
```
200200

201-
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.
201+
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.
202202

203203
{% tabs %}
204204
{% highlight ts tabtitle="app.ts" %}
205205

206206
let pdfviewer: PdfViewer = new PdfViewer();
207-
pdfviewer.serviceUrl = 'https://localhost:5001/pdfviewer';
207+
pdfviewer.serviceUrl = 'https://localhost:7255/pdfviewer';
208208
pdfviewer.appendTo('#PdfViewer');
209-
pdfviewer.load('PDF_Succinctly.pdf', null);
209+
pdfviewer.load('PDF_Succinctly.pdf', '');
210210

211211
{% endhighlight %}
212212
{% endtabs %}

0 commit comments

Comments
 (0)