Skip to content

Commit e95ec0f

Browse files
Merge branch 'development' of https://github.com/syncfusion-content/document-processing-docs into 1010299-JS-PageUpdate
2 parents 1a28b6d + 757e215 commit e95ec0f

41 files changed

Lines changed: 1418 additions & 1301 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Document-Processing-toc.html

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -888,11 +888,18 @@
888888
<li>
889889
<a href="/document-processing/pdf/pdf-viewer/react/overview">React</a>
890890
<ul>
891-
<li>Getting Started
891+
<li>
892+
<a href="/document-processing/pdf/pdf-viewer/react/getting-started-overview">Getting Started</a>
892893
<ul>
893894
<li><a href="/document-processing/pdf/pdf-viewer/react/getting-started">with Standalone PDF Viewer</a></li>
894895
<li><a href="/document-processing/pdf/pdf-viewer/react/getting-started-with-server-backed">with Server-Backed PDF Viewer</a></li>
895-
<li><a href="/document-processing/pdf/pdf-viewer/react/preact">Preact</a></li>
896+
</ul>
897+
</li>
898+
<li>
899+
Environment Integration
900+
<ul>
901+
<li><a href="/document-processing/pdf/pdf-viewer/react/depoyment-integration/preact">Preact</a></li>
902+
<li><a href="/document-processing/pdf/pdf-viewer/react/depoyment-integration/nextjs-getting-started">NextJS</a></li>
896903
</ul>
897904
</li>
898905
<li><a href="/document-processing/pdf/pdf-viewer/react/feature-module">Feature Modules</a></li>

Document-Processing/PDF/PDF-Viewer/react/nextjs-getting-started.md renamed to Document-Processing/PDF/PDF-Viewer/react/depoyment-integration/nextjs-getting-started.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
layout: post
33
title: React getting started with Next.js | Syncfusion
4-
description: Check out and learn here all about how to use the Syncfusion React UI components in the Next.js project.
4+
description: Check out and learn here all about how to use the Syncfusion React PDF Viewer in the Next.js project.
55
control: PDF Viewer
66
platform: document-processing
77
documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Creating a Next.js application using Syncfusion<sup style="font-size:70%">&reg;</sup> React components
11+
# Creating a Next.js application using Syncfusion React PDF Viewer
1212

1313
This guide shows how to set up a Next.js application and integrate the Syncfusion<sup style="font-size:70%">&reg;</sup> React PDF Viewer component.
1414

@@ -22,7 +22,9 @@ Before getting started with the Next.js application, ensure the following prereq
2222

2323
* [Node.js 18.17](https://nodejs.org/en) or later.
2424

25-
* The application is compatible with macOS, Windows, and Linux operating systems.
25+
* The application is compatible with macOS, Windows, and Linux operating systems.
26+
27+
* See the [System requirements](../../../../System-Requirements.md) for detailed platform requirements.
2628

2729
## Create a Next.js application
2830

@@ -43,11 +45,11 @@ yarn create next-app
4345

4446
Using one of the above commands will prompt for project configuration options.
4547

46-
1. Define the project name. For example: `ej2-nextjs-pdfviewer`.
48+
1. Define the project name. For example: `ej2-next-js-pdfviewer`.
4749
{% tabs %}
4850
{% highlight bash tabtitle="CMD" %}
4951

50-
√ What is your project named? » ej2-nextjs-pdfviewer
52+
√ What is your project named? » ej2-next-js-pdfviewer
5153

5254
{% endhighlight %}
5355
{% endtabs %}
@@ -56,14 +58,14 @@ Using one of the above commands will prompt for project configuration options.
5658
{% tabs %}
5759
{% highlight bash tabtitle="CMD" %}
5860

59-
√ What is your project named? ... ej2-nextjs-pdfviewer
61+
√ What is your project named? ... ej2-next-js-pdfviewer
6062
√ Would you like to use TypeScript? ... No / `Yes`
6163
√ Would you like to use ESLint? ... No / `Yes`
6264
√ Would you like to use Tailwind CSS? ... `No` / Yes
6365
√ Would you like to use `src/` directory? ... No / `Yes`
6466
√ Would you like to use App Router? (recommended) ... No / `Yes`
6567
√ Would you like to customize the default import alias? ... `No`/ Yes
66-
Creating a new Next.js app in D:\ej2-nextjs-pdfviewer.
68+
Creating a new Next.js app in D:\ej2-next-js-pdfviewer.
6769

6870
{% endhighlight %}
6971
{% endtabs %}
@@ -72,7 +74,7 @@ Creating a new Next.js app in D:\ej2-nextjs-pdfviewer.
7274
{% tabs %}
7375
{% highlight bash tabtitle="CMD" %}
7476

75-
cd ej2-nextjs-pdfviewer
77+
cd ej2-next-js-pdfviewer
7678

7779
{% endhighlight %}
7880
{% endtabs %}
@@ -100,13 +102,16 @@ yarn add @syncfusion/ej2-react-pdfviewer
100102

101103
## Import Syncfusion<sup style="font-size:70%">&reg;</sup> CSS styles
102104

103-
Syncfusion<sup style="font-size:70%">&reg;</sup> React components include built-in themes. Import a theme to match the look and feel of the application.
105+
Syncfusion<sup style="font-size:70%">&reg;</sup> React components include built-in themes. Import the PDF Viewer theme and base styles to match the look and feel of the application.
104106

105-
For projects using the App Router, add the imports to `src/app/globals.css`. For projects using the Pages Router, add them to a global stylesheet such as `pages/_app.js` or its CSS import. Remove or consolidate any conflicting styles as needed.
107+
/* Where to add the imports: */
108+
/* - App Router: put these in `src/app/globals.css` */
109+
/* - Pages Router: put them in `pages/_app.js` or its imported global CSS */
106110

107111
{% tabs %}
108112
{% highlight css tabtitle="globals.css" %}
109113

114+
/* PDF Viewer theme and base styles */
110115
@import '../node_modules/@syncfusion/ej2-base/styles/material.css';
111116
@import '../node_modules/@syncfusion/ej2-buttons/styles/material.css';
112117
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material.css';
@@ -119,7 +124,7 @@ For projects using the App Router, add the imports to `src/app/globals.css`. For
119124
{% endhighlight %}
120125
{% endtabs %}
121126

122-
N> To learn more about built-in themes and CSS references for individual components, see the [themes](https://ej2.syncfusion.com/react/documentation/appearance/theme/) documentation.
127+
N> To learn more about built-in themes and CSS references for individual components, see the [themes](https://ej2.syncfusion.com/react/documentation/appearance/theme) documentation.
123128

124129
## Add the Syncfusion<sup style="font-size:70%">&reg;</sup> React component
125130

@@ -174,4 +179,4 @@ yarn run dev
174179

175180
To learn more about the PDF Viewer component, see the [documentation](https://help.syncfusion.com/document-processing/pdf/pdf-viewer/react/getting-started#module-injection).
176181

177-
N> [View the Next.js PDF Viewer sample in the GitHub repository]https://github.com/SyncfusionExamples/syncfusion-react-pdfviewer-component-in-nextjs
182+
N> [View the Next.js PDF Viewer sample in the GitHub repository](https://github.com/SyncfusionExamples/syncfusion-react-pdfviewer-component-in-nextjs)
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
layout: post
3+
title: Getting started with Syncfusion React PDF Viewer in Preact Application
4+
description: Provides a short overview and essential task links for integrating and using the Syncfusion React PDF Viewer within Preact.
5+
control: PDF Viewer
6+
platform: document-processing
7+
documentation: ug
8+
domainurl: ##DomainURL##
9+
---
10+
11+
12+
# Getting started with Syncfusion React PDF Viewer in Preact
13+
14+
This page is a short, task-focused overview for integrating the Syncfusion React PDF Viewer into a [Preact](https://preactjs.com/) app. Use the short sections below for quick tasks; a minimal full example is provided as an optional reference.
15+
16+
[Preact](https://preactjs.com/) is a lightweight React alternative that preserves the React-compatible API. Use Preact when you want smaller bundle size while reusing the React viewer components.
17+
## Setup
18+
19+
How‑to: Create a Preact project and install the Syncfusion package.
20+
21+
```bash
22+
npm init preact # choose JavaScript or TypeScript as needed
23+
cd my-project
24+
npm install @syncfusion/ej2-react-pdfviewer --save
25+
# or
26+
yarn init preact
27+
yarn add @syncfusion/ej2-react-pdfviewer
28+
```
29+
30+
## Import CSS
31+
32+
How‑to: Add the required Syncfusion theme and component CSS to `src/style.css`.
33+
34+
```css
35+
@import '../node_modules/@syncfusion/ej2-base/styles/material3.css';
36+
@import '../node_modules/@syncfusion/ej2-buttons/styles/material3.css';
37+
@import '../node_modules/@syncfusion/ej2-dropdowns/styles/material3.css';
38+
@import '../node_modules/@syncfusion/ej2-inputs/styles/material3.css';
39+
@import '../node_modules/@syncfusion/ej2-navigations/styles/material3.css';
40+
@import '../node_modules/@syncfusion/ej2-popups/styles/material3.css';
41+
@import '../node_modules/@syncfusion/ej2-splitbuttons/styles/material3.css';
42+
@import '../node_modules/@syncfusion/ej2-react-pdfviewer/styles/material3.css';
43+
```
44+
45+
Note: keep import order consistent with component dependencies.
46+
47+
## Add component
48+
49+
How‑to: Render a minimal `PdfViewerComponent` in `src/index.js`.
50+
51+
Prefer a single `Add component` example using the CDN `resourceUrl` (no server required). Replace the CDN version as needed.
52+
53+
```js
54+
import { render } from 'preact';
55+
import { PdfViewerComponent, Toolbar, Magnification, Navigation, Annotation, Inject } from '@syncfusion/ej2-react-pdfviewer';
56+
import './style.css';
57+
58+
function App() {
59+
return (
60+
<PdfViewerComponent
61+
id="container"
62+
documentPath="https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf"
63+
resourceUrl="https://cdn.syncfusion.com/ej2/23.2.6/dist/ej2-pdfviewer-lib"
64+
style={{ height: '640px' }}>
65+
<Inject services={[Toolbar, Magnification, Navigation, Annotation]} />
66+
</PdfViewerComponent>
67+
);
68+
}
69+
70+
render(<App />, document.getElementById('app'));
71+
```
72+
73+
**See also**
74+
75+
- [Getting started with the Syncfusion React PDF Viewer](./getting-started-overview)
76+
- [System requirements for Syncfusion React PDF Viewer](https://help.syncfusion.com/document-processing/system-requirements)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
layout: post
3+
title: Getting started with Syncfusion React PDF Viewer component| Syncfusion
4+
description: Learn here all about Getting started with Syncfusion React PDF Viewer component of Syncfusion Essential JS 2 and more details.
5+
control: PDF Viewer
6+
platform: document-processing
7+
documentation: ug
8+
domainurl: ##DomainURL##
9+
---
10+
11+
12+
# Getting started with Syncfusion React PDF Viewer
13+
14+
15+
If you're starting to integrate the Syncfusion<sup style="font-size:70%">&reg;</sup> React PDF Viewer into your application, choose the path below that matches how you'll run the viewer in your app (client-only or via a web service) and follow that tutorial.
16+
17+
- **Standalone** — Run the viewer entirely in the browser (no server rendering). This mode delivers excellent runtime performance and responsiveness because rendering and interaction happen on the client; it is ideal for quick prototyping and simple integrations.
18+
- **Server‑backed** — Use a web service to perform PDF Viewer operations (rendering, document processing, or streaming). Choose this path when you need server-side processing for PDF Viewer operations.
19+
20+
This page is intentionally a short introduction — choose a path and follow its tutorial:
21+
22+
- [Standalone tutorial](./getting-started)
23+
- [Server‑backed tutorial](./getting-started-with-server-backed)
24+
25+
Related:
26+
27+
- [Annotations](./annotation/text-markup-annotation)
28+
- [Form designer](./forms/form-designer)
29+
- [Organize pages](./organize-pages/overview)
30+
31+
See also:
32+
33+
- [PDF Viewer overview](../overview)

0 commit comments

Comments
 (0)