Skip to content

Commit 13ff03e

Browse files
1010724: Addressed Review changes
1 parent e66fd56 commit 13ff03e

2 files changed

Lines changed: 13 additions & 49 deletions

File tree

Document-Processing/PDF/PDF-Viewer/react/document-handling/load-large-pdf.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ Base64 encoding increases file size by ~33% and consumes more memory. For large
4747
### 3. Minimize Injected Modules
4848

4949
Reduce the number of injected modules in the PDF Viewer to lower background processing and memory usage. For large files, avoid modules like:
50-
- Text Search
51-
- Text Selection
52-
- Organize Pages
53-
- Thumbnail View
50+
- [Text Search](https://helpstaging.syncfusion.com:14038/document-processing/pdf/pdf-viewer/react/text-search)
51+
- [Text Selection](https://helpstaging.syncfusion.com/document-processing/pdf/pdf-viewer/react/text-selection)
52+
- [Organize Pages](https://helpstaging.syncfusion.com/document-processing/pdf/pdf-viewer/react/organize-pages/overview)
53+
- [Thumbnail View](https://helpstaging.syncfusion.com/document-processing/pdf/pdf-viewer/react/interactive-pdf-navigation/page-thumbnail)
5454

5555
**Example:**
5656
```tsx
@@ -68,7 +68,7 @@ Reduce the number of injected modules in the PDF Viewer to lower background proc
6868

6969
Enabling local storage in the PDF Viewer can improve performance and smoothness when working with large files. This allows the viewer to cache document data locally, reducing repeated network requests and memory spikes.
7070

71-
Use the `enableLocalStorage` property to control this behavior. When set to `true`, session data is stored in memory for the current session; when `false` (default), browser session storage is used.
71+
Use the [`enableLocalStorage`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/index-default#enablelocalstorage) property to control this behavior. When set to `true`, session data is stored in memory for the current session; when `false` (default), browser session storage is used.
7272

7373
**Example:**
7474
```tsx

Document-Processing/PDF/PDF-Viewer/react/document-handling/load-password-pdf.md

Lines changed: 8 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,18 @@ This article explains how to load and display password-protected PDF files in th
1616

1717
## Tutorial: Open a Password-Protected PDF
1818

19-
To open a password-protected PDF, provide the password as part of the `documentPath` object. The viewer will use this password to decrypt and display the file.
19+
To open a password-protected PDF, provide the password as part of the [`documentPath`](https://ej2.syncfusion.com/react/documentation/api/pdfviewer/index-default#documentpath) object. The viewer will use this password to decrypt and display the file.
2020

2121
---
2222

2323
## How-to Guide: Minimal Example
2424

2525
```tsx
26-
import { createRoot } from 'react-dom/client';
27-
import './index.css';
26+
import * as ReactDOM from 'react-dom';
2827
import * as React from 'react';
29-
import {
30-
PdfViewerComponent,
31-
Toolbar,
32-
Magnification,
33-
Navigation,
34-
LinkAnnotation,
35-
BookmarkView,
36-
ThumbnailView,
37-
Print,
38-
TextSelection,
39-
TextSearch,
40-
Annotation,
41-
FormFields,
42-
FormDesigner,
43-
PageOrganizer,
44-
Inject,
45-
} from '@syncfusion/ej2-react-pdfviewer';
46-
47-
function Default() {
28+
import { PdfViewerComponent, Toolbar, Magnification, Navigation, Print, Inject } from '@syncfusion/ej2-react-pdfviewer';
29+
30+
function App() {
4831
let viewer;
4932
const resourcesLoaded = () => {
5033
//pass PDF URL and passwod here as string
@@ -66,33 +49,14 @@ function Default() {
6649
resourceUrl="https://cdn.syncfusion.com/ej2/23.2.6/dist/ej2-pdfviewer-lib"
6750
style={{ height: '640px' }}
6851
>
69-
<Inject
70-
services={[
71-
Toolbar,
72-
Magnification,
73-
Navigation,
74-
LinkAnnotation,
75-
BookmarkView,
76-
ThumbnailView,
77-
Print,
78-
TextSelection,
79-
TextSearch,
80-
Annotation,
81-
FormFields,
82-
FormDesigner,
83-
PageOrganizer,
84-
]}
85-
/>
52+
<Inject services={[Toolbar, Magnification, Navigation, Print]} />
8653
</PdfViewerComponent>
8754
</div>
8855
</div>
8956
);
9057
}
91-
export default Default;
92-
93-
const root = createRoot(document.getElementById('sample'));
94-
root.render(<Default />);
95-
58+
const root = ReactDOM.createRoot(document.getElementById('sample'));
59+
root.render(<App />);
9660
```
9761

9862
---

0 commit comments

Comments
 (0)