Skip to content

Commit f940ca1

Browse files
Merge pull request #2199 from syncfusion-content/EJ2-1009098-H
1009098: UG updated
2 parents f746b82 + d243b82 commit f940ca1

20 files changed

Lines changed: 243 additions & 207 deletions

Document-Processing/PDF/PDF-Viewer/react/Redaction/overview.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ To enable the redaction toolbar, configure the `toolbarSettings.toolbarItems` pr
1919
The following example shows how to enable the redaction toolbar:
2020

2121
{% tabs %}
22-
{% highlight js tabtitle="index.js" %}
22+
{% highlight js tabtitle="app.jsx" %}
2323

2424
import * as ReactDOM from 'react-dom/client';
2525
import * as React from 'react';
@@ -52,8 +52,7 @@ export function App() {
5252
documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
5353
resourceUrl= "https://cdn.syncfusion.com/ej2/31.2.2/dist/ej2-pdfviewer-lib"
5454
toolbarSettings={toolbarSettings}
55-
56-
style={{ 'height': '680px' }}
55+
style={{ 'height': '680px' }}
5756
>
5857
<Inject services={[Toolbar, Magnification, Navigation, Annotation, LinkAnnotation, BookmarkView, ThumbnailView,
5958
Print, TextSelection, TextSearch, FormFields, FormDesigner]} />

Document-Processing/PDF/PDF-Viewer/react/Redaction/programmatic-support.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ export function App() {
5151
documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
5252
resourceUrl= "https://cdn.syncfusion.com/ej2/31.2.2/dist/ej2-pdfviewer-lib"
5353
toolbarSettings={toolbarSettings}
54-
55-
style={{ 'height': '680px' }}
56-
>
54+
style={{ 'height': '640px' }}>
55+
5756
<Inject services={[Toolbar, Magnification, Navigation, Annotation, LinkAnnotation, BookmarkView, ThumbnailView,
5857
Print, TextSelection, TextSearch, FormFields, FormDesigner]} />
5958
</PdfViewerComponent>

Document-Processing/PDF/PDF-Viewer/react/Redaction/toolbar.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ export function App() {
5151
documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
5252
resourceUrl= "https://cdn.syncfusion.com/ej2/31.2.2/dist/ej2-pdfviewer-lib"
5353
toolbarSettings={toolbarSettings}
54-
5554
style={{ 'height': '680px' }}
5655
>
5756
<Inject services={[Toolbar, Magnification, Navigation, Annotation, LinkAnnotation, BookmarkView, ThumbnailView,

Document-Processing/PDF/PDF-Viewer/react/annotation/comments.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ Edit comments and replies in the following ways:
111111
>Deleting the root comment from the comment panel also deletes the associated annotation.
112112
```html
113113
<button id="checkComments">Check the Comments</button>
114+
```
114115
## How to check the comments added by the user
115116

116117
Comments added to the PDF document can be read using the annotation's `comments` property.

Document-Processing/PDF/PDF-Viewer/react/events.md

Lines changed: 139 additions & 139 deletions
Large diffs are not rendered by default.

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

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,29 @@ To get started with Syncfusion<sup style="font-size:70%">&reg;</sup> React UI co
2020

2121
## Setup for Local Development
2222

23-
1. Create a new React app [`create-react-app`](https://github.com/facebook/create-react-app) and install it using the following command.
23+
To easily set up a React application, use `create-vite-app`, which provides a faster development environment, smaller bundle sizes, and optimized builds compared to traditional tools like `create-react-app`. For detailed steps, refer to the Vite [installation instructions](https://vitejs.dev/guide/). Vite sets up your environment using JavaScript and optimizes your application for production.
2424

25-
```bash
26-
npm install -g create-react-app
27-
```
28-
29-
2. To setup basic `React` sample use following commands.
30-
31-
{% tabs %}
32-
{% highlight js tabtitle="JSX" %}
25+
> **Note:** To create a React application using `create-react-app`, refer to this [documentation](https://ej2.syncfusion.com/react/documentation/getting-started/create-app) for more details.
3326
34-
create-react-app quickstart
35-
cd quickstart
36-
npm install
27+
To create a new React application, run the following command.
3728

38-
{% endhighlight %}
39-
{% highlight js tabtitle="TSX" %}
29+
```bash
30+
npm create vite@latest my-app
31+
```
32+
To set-up a React application in TypeScript environment, run the following command.
4033

41-
npx create-react-app quickstart --template cra-template-typescript
42-
cd quickstart
43-
npm install
34+
```bash
35+
npm create vite@latest my-app -- --template react-ts
36+
cd my-app
37+
npm run dev
38+
```
39+
To set-up a React application in JavaScript environment, run the following command.
4440

45-
{% endhighlight %}
46-
{% endtabs %}
41+
```bash
42+
npm create vite@latest my-app -- --template react
43+
cd my-app
44+
npm run dev
45+
```
4746

4847
## Adding Syncfusion<sup style="font-size:70%">&reg;</sup> packages
4948

@@ -58,7 +57,7 @@ N> The following changes applies to React version 18 and above.
5857

5958
## Adding PDF Viewer component and the CSS reference
6059

61-
* Add an HTML div element to act as the PDF Viewer element `public/index.html` using the following code.
60+
* Add an HTML div element to act as the PDF Viewer element `index.html` using the following code.
6261

6362
```
6463
<!DOCTYPE html>
@@ -73,6 +72,7 @@ N> The following changes applies to React version 18 and above.
7372
<body>
7473
<div id='sample'>
7574
<div id='loader'>Loading....</div>
75+
<script type="module" src="/src/main.tsx"></script>
7676
</div>
7777
</body>
7878
</html>
@@ -173,11 +173,11 @@ $env:NODE_OPTIONS = "--openssl-legacy-provider"
173173
Output will be appears as follows.
174174

175175
{% tabs %}
176-
{% highlight js tabtitle="index.jsx" %}
177-
{% include code-snippet/pdfviewer/react/base-cs1/app/index.jsx %}
176+
{% highlight js tabtitle="app.jsx" %}
177+
{% include code-snippet/pdfviewer/react/base-cs1/app/app.jsx %}
178178
{% endhighlight %}
179-
{% highlight ts tabtitle="index.tsx" %}
180-
{% include code-snippet/pdfviewer/react/base-cs1/app/index.tsx %}
179+
{% highlight ts tabtitle="app.tsx" %}
180+
{% include code-snippet/pdfviewer/react/base-cs1/app/app.tsx %}
181181
{% endhighlight %}
182182
{% highlight html tabtitle="index.html" %}
183183
{% include code-snippet/pdfviewer/react/base-cs1/index.html %}

Document-Processing/PDF/PDF-Viewer/react/getting-started.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ N> The following changes apply to React version 18 and above.
6969

7070
## Adding PDF Viewer component and the CSS reference
7171

72-
* Add an HTML div element to act as the PDF Viewer element `public/index.html` using the following code.
72+
* Add an HTML div element to act as the PDF Viewer element `index.html` using the following code.
7373

7474
```
7575
<!DOCTYPE html>
@@ -84,6 +84,7 @@ N> The following changes apply to React version 18 and above.
8484
<body>
8585
<div id='sample'>
8686
<div id='loader'>Loading....</div>
87+
<script type="module" src="/src/main.tsx"></script>
8788
</div>
8889
</body>
8990
</html>
@@ -102,7 +103,7 @@ N> The following changes apply to React version 18 and above.
102103
@import "../node_modules/@syncfusion/ej2-pdfviewer/styles/material.css";
103104
```
104105

105-
* Add the React PDF Viewer as shown below in `src/index.js` when using JavaScript (JSX). If you're using TypeScript (TSX), add it in `src/index.tsx` to render the PDF Viewer component.
106+
* Add the React PDF Viewer as shown below in `src/index.js` when using JavaScript (JSX). If you're using TypeScript (TSX), add it in `src/app.tsx` to render the PDF Viewer component.
106107

107108

108109
{% tabs %}
@@ -276,8 +277,10 @@ return (<div>
276277
}
277278
const root = ReactDOM.createRoot(document.getElementById('sample'));
278279
root.render(<App />);
280+
{% endraw %}
279281
{% endhighlight %}
280282
{% highlight html tabtitle="index.html" %}
283+
{% raw %}
281284
<!DOCTYPE html>
282285
<html lang="en">
283286
<head>
@@ -294,6 +297,7 @@ root.render(<App />);
294297
<body>
295298
<div id='sample'>
296299
<div id='loader'>Loading....</div>
300+
<script type="module" src="/src/main.tsx"></script>
297301
</div>
298302
</body>
299303
</html>

Document-Processing/PDF/PDF-Viewer/react/how-to/change-author-name-using-annotation-settings.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: post
3-
title: Change author name using annotation settings in React PDF Viewer | Syncfusion
3+
title: Change author name using annotation settings in React | Syncfusion
44
description: Learn how to change the author name and related annotation settings using the annotationSettings API in the React PDF Viewer.
55
platform: document-processing
66
control: PDF Viewer
@@ -31,7 +31,7 @@ Change the author name and other properties using the annotationSettings API as
3131

3232
{% tabs %}
3333
{% highlight ts tabtitle="Standalone" %}
34-
```ts
34+
3535
import { PdfViewer, Toolbar, Magnification, Navigation, LinkAnnotation, ThumbnailView, BookmarkView, TextSelection, TextSearch, Print, Annotation, FormFields } from "../src/index";
3636

3737
PdfViewer.Inject(Toolbar, Magnification, Navigation, LinkAnnotation, ThumbnailView, BookmarkView, TextSelection, TextSearch, Print, Annotation, FormFields);
@@ -40,10 +40,10 @@ viewer.load('https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf', null);
4040
viewer.annotationSettings = { author: 'syncfusion', minHeight: 30, maxHeight: 500, minWidth: 30, maxWidth: 500, isLock: false, isPrint: true, isDownload: true };
4141
viewer.freeTextSettings = { allowTextOnly : true };
4242
viewer.appendTo("#pdfViewer");
43-
```
43+
4444
{% endhighlight %}
4545
{% highlight ts tabtitle="Server-Backed" %}
46-
```ts
46+
4747
import { PdfViewer, Toolbar, Magnification, Navigation, LinkAnnotation, ThumbnailView, BookmarkView, TextSelection, TextSearch, Print, Annotation, FormFields } from "../src/index";
4848

4949
PdfViewer.Inject(Toolbar, Magnification, Navigation, LinkAnnotation, ThumbnailView, BookmarkView, TextSelection, TextSearch, Print, Annotation, FormFields);
@@ -53,6 +53,6 @@ viewer.load('https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf', null);
5353
viewer.annotationSettings = { author: 'syncfusion', minHeight: 30, maxHeight: 500, minWidth: 30, maxWidth: 500, isLock: false, isPrint: true, isDownload: true };
5454
viewer.freeTextSettings = { allowTextOnly : true };
5555
viewer.appendTo("#pdfViewer");
56-
```
56+
5757
{% endhighlight %}
5858
{% endtabs %}

Document-Processing/PDF/PDF-Viewer/react/how-to/clear-annotation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ domainurl: ##DomainURL##
1010

1111
# Clear annotations in React PDF Viewer
1212

13-
Use the [deleteAnnotations](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/#deleteannotations) method to clear all annotations in the currently loaded document.
13+
Use the [deleteAnnotations](https://ej2.syncfusion.com/react/documentation/api/pdfviewer#deleteannotations) method to clear all annotations in the currently loaded document.
1414

1515
Example: Clear all annotations in the loaded document
1616

@@ -42,5 +42,5 @@ function deleteAnnotationbyId() {
4242
</script>
4343
```
4444

45-
Sample: How to clear annotations using deleteAnnotations
45+
Sample: [How to clear annotations using deleteAnnotations]
4646
(https://stackblitz.com/edit/react-xlvqkm?file=public%2Findex.html)
24.6 KB
Loading

0 commit comments

Comments
 (0)