Skip to content

Commit 2da4b7e

Browse files
1010807: Resolving heading issues in React PDF Viewer UG
1 parent 0b0cd96 commit 2da4b7e

8 files changed

Lines changed: 423 additions & 424 deletions

File tree

Document-Processing/PDF/PDF-Viewer/react/annotation/text-markup-annotation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ root.render(<App />);
565565

566566
## Strikethrough text
567567

568-
There are two ways to add strikethrough:
568+
Two ways to add strikethroughs:
569569

570570
1. Using the context menu
571571
* Select text in the PDF document and right-click it.

Document-Processing/PDF/PDF-Viewer/react/depoyment-integration/gatsby.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ How to integrate the Syncfusion React PDF Viewer into a Gatsby site. Use the Qui
1414

1515
## Quickstart for Gatsby
1616

17-
1. Create or open your Gatsby site.
17+
#### Create or open your Gatsby site:
1818

1919
```bash
2020
# create a new Gatsby site (or use an existing one)
@@ -23,13 +23,13 @@ cd my-gatsby-site
2323
npm install
2424
```
2525

26-
2. Install the PDF Viewer package:
26+
#### Install the PDF Viewer package:
2727

2828
```bash
2929
npm install @syncfusion/ej2-react-pdfviewer --save
3030
```
3131

32-
3. Optional — host runtime locally or use the CDN
32+
#### Optional — host runtime resources locally or use the CDN
3333

3434
If you want to host the viewer runtime and WASM locally, copy the runtime files into Gatsby's `static` directory so they are served at the root URL (`/`). The example component below uses the CDN `resourceUrl` for a quick demo; hosting locally is recommended for production.
3535

@@ -41,7 +41,7 @@ cp -R ./node_modules/@syncfusion/ej2-pdfviewer/dist/ej2-pdfviewer-lib static/ej2
4141
mkdir -p static/assets && cp ./path/to/sample.pdf static/assets/sample.pdf
4242
```
4343

44-
4. Add viewer CSS imports to `src/components/layout.css` (recommended for Gatsby component-scoped styling):
44+
- Add viewer CSS imports to `src/components/layout.css` (recommended for Gatsby component-scoped styling):
4545

4646
Create `src/components/layout.css` and add the imports below (relative path to `node_modules` used from `src/components`):
4747

@@ -63,7 +63,7 @@ Then import the stylesheet in `gatsby-browser.js` at your project root so it is
6363
import './src/components/layout.css';
6464
```
6565

66-
5. Use a client-only approach (Gatsby is server-side rendered). A simple and reliable pattern is to render the viewer after mount with a mounted flag. Create `src/components/pdfviewer.js` with the component below (the example also shows where to register a Syncfusion license if you have one):
66+
- Use a client-only approach (Gatsby is server-side rendered). A simple and reliable pattern is to render the viewer after mount with a mounted flag. Create `src/components/pdfviewer.js` with the component below (the example also shows where to register a Syncfusion license if you have one):
6767

6868
{% tabs %}
6969
{% highlight js tabtitle="Standalone" %}
@@ -127,7 +127,7 @@ export default function PdfViewerPage() {
127127
{% endhighlight %}
128128
{% endtabs %}
129129

130-
6. Run the Gatsby dev server:
130+
#### Run the Gatsby dev server:
131131

132132
```bash
133133
npm run develop

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ yarn create next-app
4545

4646
Using one of the above commands will prompt for project configuration options.
4747

48-
1. Define the project name. For example: `ej2-next-js-pdfviewer`.
48+
- Define the project name. For example: `ej2-next-js-pdfviewer`.
4949
{% tabs %}
5050
{% highlight bash tabtitle="CMD" %}
5151

@@ -54,7 +54,7 @@ Using one of the above commands will prompt for project configuration options.
5454
{% endhighlight %}
5555
{% endtabs %}
5656

57-
2. Select the required packages.
57+
- Select the required packages.
5858
{% tabs %}
5959
{% highlight bash tabtitle="CMD" %}
6060

@@ -70,7 +70,7 @@ Creating a new Next.js app in D:\ej2-next-js-pdfviewer.
7070
{% endhighlight %}
7171
{% endtabs %}
7272

73-
3. After the project is created, navigate to the project directory:
73+
- After the project is created, navigate to the project directory:
7474
{% tabs %}
7575
{% highlight bash tabtitle="CMD" %}
7676

@@ -131,7 +131,7 @@ N> To learn more about built-in themes and CSS references for individual compone
131131

132132
Follow these steps to add the React PDF Viewer component to the Next.js project:
133133

134-
1. Define the PDF Viewer component in `src/app/page.tsx`, as shown below:
134+
- Define the PDF Viewer component in `src/app/page.tsx`, as shown below:
135135

136136
{% tabs %}
137137
{% highlight ts tabtitle="page.tsx" %}

Document-Processing/PDF/PDF-Viewer/react/depoyment-integration/remix.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Different starters create different folder layouts. Pick the mapping that matche
3939

4040
Use the file paths that match your project layout when following the steps below.
4141

42-
## Step 1 — Create a Remix or React Router v7 app
42+
## Create a Remix or React Router v7 app
4343

4444
If you want the React Router framework-mode project (creates an `app/` tree), use the official scaffolding tool:
4545

@@ -61,13 +61,13 @@ npm install react-router@7 react-router-dom@7
6161
npm run dev
6262
```
6363

64-
## Step 2 — Install the PDF Viewer package
64+
## Install the PDF Viewer package
6565

6666
```bash
6767
npm install @syncfusion/ej2-react-pdfviewer --save
6868
```
6969

70-
## Step 3 — Copy viewer runtime assets to `public`
70+
## Copy viewer runtime assets to public folder
7171

7272
The PDF Viewer requires runtime assets (pdfium.js, pdfium.wasm, supporting files). Copy them from the `ej2-pdfviewer` package to your `public` folder so `resourceUrl` can point to `/ej2-pdfviewer-lib`.
7373

@@ -85,7 +85,7 @@ Copy-Item -Path .\node_modules\@syncfusion\ej2-pdfviewer\dist\ej2-pdfviewer-lib
8585

8686
Confirm `public/ej2-pdfviewer-lib` contains `pdfium.js` and `pdfium.wasm`.
8787

88-
## Step 4 — Add global CSS for the viewer
88+
## Add global CSS for the viewer
8989

9090
Place the Syncfusion CSS imports in your project's global stylesheet. Choose the path that matches your project layout.
9191

@@ -130,7 +130,7 @@ ReactDOM.createRoot(document.getElementById('root')).render(
130130
);
131131
```
132132

133-
## Step 5 — Client-only rendering
133+
## Client-only rendering
134134

135135
The PDF Viewer depends on browser APIs and WebAssembly; avoid server-side rendering it. Render it only after the component mounts. Create a client-only component in the folder that matches your project layout.
136136

@@ -208,7 +208,7 @@ export default function App() {
208208
}
209209
```
210210

211-
## Step 6 — Run the app
211+
## Run the app
212212

213213
```bash
214214
npm run dev

Document-Processing/PDF/PDF-Viewer/react/depoyment-integration/share-point.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This quickstart shows how to integrate the Syncfusion React PDF Viewer into a Sh
2121
- Yeoman and the SPFx generator: `npm install -g yo @microsoft/generator-sharepoint`.
2222
- Gulp: `npm install -g gulp-cli`.
2323

24-
## Step 1 — Create an SPFx React web part
24+
## Create an SPFx React web part
2525

2626
Run the SharePoint generator and choose the React framework (TypeScript recommended). Example answers shown in parentheses.
2727

@@ -36,17 +36,17 @@ yo @microsoft/sharepoint
3636

3737
This creates the usual SPFx project tree (no `src/`/`app/` ambiguity): React components live under `src/webparts/pdfViewer/components` and global web part assets are under `src/webparts/pdfViewer/assets`.
3838

39-
## Step 2 — Install Syncfusion package
39+
## Install Syncfusion package
4040

4141
In the project root run:
4242

4343
```bash
4444
npm install @syncfusion/ej2-react-pdfviewer --save
4545
```
4646

47-
Keep the package version aligned with the runtime assets you host (see Step 4).
47+
Keep the package version aligned with the runtime assets you host.
4848

49-
## Step 3 — Add Syncfusion CSS
49+
## Add Syncfusion CSS
5050

5151
Import the Syncfusion theme CSS so the viewer styles are bundled with the web part. In your React component file (TypeScript example below) import the CSS from node_modules:
5252

@@ -63,7 +63,7 @@ import '@syncfusion/ej2-pdfviewer/styles/material.css';
6363

6464
If your SPFx build configuration forbids direct CSS imports from node_modules, add these `@import` lines to your component CSS (for example `PdfViewer.module.css`) using the appropriate path or deploy the CSS from a CDN.
6565

66-
## Step 4 — Provide runtime assets and choose rendering mode
66+
## Provide runtime assets and choose rendering mode
6767

6868
SPFx web parts run in the browser (client-side). That makes standalone (client-only) rendering the natural default: the PDF Viewer runs in the user's browser and uses `resourceUrl` to load runtime assets (pdfium.js, pdfium.wasm and supporting files).
6969

@@ -88,7 +88,7 @@ Notes on rendering modes and SPFx:
8888

8989
Important: ensure any host you use serves `.wasm` files with Content-Type `application/wasm` and that tenant/content security policies permit fetching assets from the chosen host.
9090

91-
## Step 5 — Add the React component (TypeScript)
91+
## Add the React component (TypeScript)
9292

9393
Create `PdfViewerClient.tsx` under `src/webparts/pdfViewer/components` and paste the minimal example below. This component is client-only and safe for SPFx (which runs in the browser):
9494

@@ -131,7 +131,7 @@ export default PdfViewerClient;
131131
{% endhighlight %}
132132
{% endtabs %}
133133

134-
## Step 6 — Use the component in the web part
134+
## Use the component in the web part
135135

136136
Open the web part main React file (for example `src/webparts/pdfViewer/components/PdfViewer.tsx` created by the generator) and render `PdfViewerClient`:
137137

@@ -148,7 +148,7 @@ export default function PdfViewer(): JSX.Element {
148148
}
149149
```
150150

151-
## Step 7 — Test and package
151+
## Test and package
152152

153153
Run the local workbench for development:
154154

0 commit comments

Comments
 (0)