Skip to content

Commit f95e265

Browse files
committed
Make it clear SVG renderMode is deprecated and will be removed in the future
1 parent d460425 commit f95e265

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/react-pdf/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ Loads a document passed using `file` prop.
470470
| onSourceError | Function called in case of an error while retrieving document source from `file` prop. | n/a | `(error) => alert('Error while retrieving document source! ' + error.message)` |
471471
| onSourceSuccess | Function called when document source is successfully retrieved from `file` prop. | n/a | `() => alert('Document source retrieved!')` |
472472
| options | An object in which additional parameters to be passed to PDF.js can be defined. Most notably:<ul><li>`cMapUrl`;</li><li>`httpHeaders` - custom request headers, e.g. for authorization);</li><li>`withCredentials` - a boolean to indicate whether or not to include cookies in the request (defaults to `false`)</li></ul>For a full list of possible parameters, check [PDF.js documentation on DocumentInitParameters](https://mozilla.github.io/pdf.js/api/draft/module-pdfjsLib.html#~DocumentInitParameters). **Note**: Make sure to define options object outside of your React component, and use `useMemo` if you can't. | n/a | `{ cMapUrl: '/cmaps/' }` |
473-
| renderMode | Rendering mode of the document. Can be `"canvas"`, `"custom"`, `"none"` or `"svg"`. If set to `"custom"`, `customRenderer` must also be provided.<br />**Warning**: SVG render mode is no longer maintained and may be removed in the future. | `"canvas"` | `"svg"` |
473+
| renderMode | Rendering mode of the document. Can be `"canvas"`, `"custom"`, `"none"` or `"svg"`. If set to `"custom"`, `customRenderer` must also be provided.<br />**Warning**: SVG render mode is deprecated and will be removed in the future. | `"canvas"` | `"svg"` |
474474
| rotate | Rotation of the document in degrees. If provided, will change rotation globally, even for the pages which were given `rotate` prop of their own. `90` = rotated to the right, `180` = upside down, `270` = rotated to the left. | n/a | `90` |
475475

476476
### Page
@@ -512,7 +512,7 @@ Displays a page. Should be placed inside `<Document />`. Alternatively, it can h
512512
| pdf | pdf object obtained from `<Document />`'s `onLoadSuccess` callback function. | (automatically obtained from parent `<Document />`) | `pdf` |
513513
| renderAnnotationLayer | Whether annotations (e.g. links) should be rendered. | `true` | `false` |
514514
| renderForms | Whether forms should be rendered. `renderAnnotationLayer` prop must be set to `true`. | `false` | `true` |
515-
| renderMode | Rendering mode of the document. Can be `"canvas"`, `"custom"`, `"none"` or `"svg"`. If set to `"custom"`, `customRenderer` must also be provided.<br />**Warning**: SVG render mode is no longer maintained and may be removed in the future. | `"canvas"` | `"svg"` |
515+
| renderMode | Rendering mode of the document. Can be `"canvas"`, `"custom"`, `"none"` or `"svg"`. If set to `"custom"`, `customRenderer` must also be provided.<br />**Warning**: SVG render mode is deprecated and will be removed in the future. | `"canvas"` | `"svg"` |
516516
| renderTextLayer | Whether a text layer should be rendered. | `true` | `false` |
517517
| rotate | Rotation of the page in degrees. `90` = rotated to the right, `180` = upside down, `270` = rotated to the left. | Page's default setting, usually `0` | `90` |
518518
| scale | Page scale. | `1` | `0.5` |

packages/react-pdf/src/Document.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ export type DocumentProps = {
201201
/**
202202
* Rendering mode of the document. Can be `"canvas"`, `"custom"`, `"none"` or `"svg"`. If set to `"custom"`, `customRenderer` must also be provided.
203203
*
204-
* **Warning**: SVG render mode is no longer maintained and may be removed in the future.
204+
* **Warning**: SVG render mode is deprecated and will be removed in the future.
205205
*
206206
* @default 'canvas'
207-
* @example 'svg'
207+
* @example 'custom'
208208
*/
209209
renderMode?: RenderMode;
210210
/**

packages/react-pdf/src/Page.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,10 @@ export type PageProps = {
273273
/**
274274
* Rendering mode of the document. Can be `"canvas"`, `"custom"`, `"none"` or `"svg"`. If set to `"custom"`, `customRenderer` must also be provided.
275275
*
276-
* **Warning**: SVG render mode is no longer maintained and may be removed in the future.
276+
* **Warning**: SVG render mode is deprecated and will be removed in the future.
277277
*
278278
* @default 'canvas'
279-
* @example 'svg'
279+
* @example 'custom'
280280
*/
281281
renderMode?: RenderMode;
282282
/**

0 commit comments

Comments
 (0)