Skip to content

Commit 1c63a01

Browse files
1010807: Diataxis changes for PDF Viewer Environment integration
1 parent a6586dc commit 1c63a01

2 files changed

Lines changed: 25 additions & 26 deletions

File tree

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

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Getting started with Syncfusion React PDF Viewer with React Router
11+
# React Router v7 Quickstart
1212

13-
Note: Remix's framework features were merged into React Router v7 and later. This guide targets React Router v7's framework-mode and shows a client-only (standalone) integration of the Syncfusion React PDF Viewer.
13+
N> Remix's framework features were merged into React Router v7 and later. This guide targets React Router v7's framework-mode and shows a client-only (standalone) integration of the Syncfusion React PDF Viewer.
1414

1515
## Prerequisites
1616

@@ -24,20 +24,20 @@ Note: Remix's framework features were merged into React Router v7 and later. Thi
2424
Different starters create different folder layouts. Pick the mapping that matches your project and follow the file locations shown below.
2525

2626
- create-react-router (framework-mode — `app/` tree)
27-
- Global CSS: `app/app.css` (imported by `root.tsx`)
28-
- Component: `app/components/PdfViewerClient.jsx`
29-
- Route: `app/routes/home.tsx` or `app/routes/index.tsx`
27+
- Global CSS: `app/app.css` (imported by `root.ts`)
28+
- Component: `app/components/PdfViewerClient.ts`
29+
- Route: `app/routes/home.ts` or `app/routes/index.ts`
3030

3131
- Vite / plain React (traditional — `src/` tree)
32-
- Global CSS: `src/index.css` (imported from `src/main.jsx`)
33-
- Component: `src/components/PdfViewerClient.jsx`
34-
- Route wrapper: `src/App.jsx` + `BrowserRouter` in `src/main.jsx`
32+
- Global CSS: `src/index.css` (imported from `src/main.ts`)
33+
- Component: `src/components/PdfViewerClient.ts`
34+
- Route wrapper: `src/App.ts` + `BrowserRouter` in `src/main.ts`
3535

3636
Use the file paths that match your project layout when following the steps below.
3737

3838
## Step 1 — Create a React + React Router (v7) app
3939

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

4242
```bash
4343
npx create-react-router@latest remix-pdf-viewer
@@ -87,11 +87,11 @@ Place the Syncfusion CSS imports in your project's global stylesheet. Choose the
8787

8888
create-react-router (`app/` tree)
8989

90-
- File: `app/app.css` (or similar global CSS imported by `root.tsx`)
90+
- File: `app/app.css` (or similar global CSS imported by `root.ts`)
9191

9292
Vite / plain React (`src/` tree)
9393

94-
- File: `src/index.css` (imported from `src/main.jsx`)
94+
- File: `src/index.css` (imported from `src/main.ts`)
9595

9696
Example CSS (same for both):
9797

@@ -108,9 +108,9 @@ Example CSS (same for both):
108108

109109
Then import the stylesheet according to your starter:
110110

111-
create-react-router (`app/root.tsx` or `app/root.jsx`): ensure the global CSS is imported or linked from `root` following the starter conventions.
111+
create-react-router (`app/root.ts` or `app/root.ts`): ensure the global CSS is imported or linked from `root` following the starter conventions.
112112

113-
Vite / plain React (`src/main.jsx`):
113+
Vite / plain React (`src/main.ts`):
114114

115115
```js
116116
import React from 'react';
@@ -132,16 +132,16 @@ The PDF Viewer depends on browser APIs and WebAssembly; avoid server-side render
132132

133133
create-react-router (`app/` tree)
134134

135-
- `app/components/PdfViewerClient.jsx`
135+
- `app/components/PdfViewerClient.ts`
136136

137137
Vite / plain React (`src/` tree)
138138

139-
- `src/components/PdfViewerClient.jsx`
139+
- `src/components/PdfViewerClient.ts`
140140

141141
Example component (works in either location):
142142

143-
```jsx
144-
// components/PdfViewerClient.jsx
143+
```ts
144+
// components/PdfViewerClient.ts
145145
import React, { useEffect, useState } from 'react';
146146
import {
147147
PdfViewerComponent,
@@ -175,19 +175,19 @@ export default function PdfViewerClient() {
175175

176176
Routing / usage examples:
177177

178-
create-react-router (`app/routes/home.tsx` or `app/routes/index.tsx`):
178+
create-react-router (`app/routes/home.ts` or `app/routes/index.ts`):
179179

180-
```tsx
180+
```ts
181181
import PdfViewerClient from '../components/PdfViewerClient';
182182
183183
export default function Home() {
184184
return <PdfViewerClient />;
185185
}
186186
```
187187

188-
Vite / plain React (`src/App.jsx`):
188+
Vite / plain React (`src/App.ts`):
189189

190-
```jsx
190+
```ts
191191
import { Routes, Route } from 'react-router-dom';
192192
import PdfViewerClient from './components/PdfViewerClient';
193193
@@ -210,5 +210,4 @@ npm run dev
210210
## See also
211211

212212
- [Getting started overview](../getting-started-overview)
213-
- [Creating a Next.js application using Syncfusion React PDF Viewer](./nextjs-getting-started)
214-
- [Getting started with Syncfusion React PDF Viewer in Preact](./nextjs-getting-started)
213+
- [Creating a Next.js application using Syncfusion React PDF Viewer](./nextjs-getting-started)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
layout: post
3-
title: Getting started with Syncfusion React PDF Viewer in SharePoint Framework (SPFx)
3+
title: Syncfusion React PDF Viewer in SPFx
44
description: Quickstart to integrate the Syncfusion React PDF Viewer into an SPFx React web part (standalone/client-side rendering).
55
control: PDF Viewer
66
platform: document-processing
77
documentation: ug
88
domainurl: ##DomainURL##
99
---
1010

11-
# Getting started with Syncfusion React PDF Viewer in SharePoint Framework (SPFx)
11+
# Syncfusion React PDF Viewer in SPFx
1212

1313
## Overview
1414

@@ -61,7 +61,7 @@ import '@syncfusion/ej2-splitbuttons/styles/material.css';
6161
import '@syncfusion/ej2-pdfviewer/styles/material.css';
6262
```
6363

64-
If your SPFx build configuration forbids direct CSS imports from node_modules, add these `@import` lines to your component SCSS (for example `PdfViewer.module.scss`) using the appropriate path or deploy the CSS from a CDN.
64+
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

6666
## Step 4 — Provide runtime assets and choose rendering mode
6767

0 commit comments

Comments
 (0)