Skip to content

Commit

Permalink
Make it clear SVG renderMode is deprecated and will be removed in the…
Browse files Browse the repository at this point in the history
… future
  • Loading branch information
wojtekmaj committed Jan 4, 2024
1 parent d460425 commit 78e123d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/react-pdf/README.md
Expand Up @@ -470,7 +470,7 @@ Loads a document passed using `file` prop.
| 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)` |
| onSourceSuccess | Function called when document source is successfully retrieved from `file` prop. | n/a | `() => alert('Document source retrieved!')` |
| 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/' }` |
| 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"` |
| 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"` | `"custom"` |
| 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` |

### Page
Expand Down Expand Up @@ -512,7 +512,7 @@ Displays a page. Should be placed inside `<Document />`. Alternatively, it can h
| pdf | pdf object obtained from `<Document />`'s `onLoadSuccess` callback function. | (automatically obtained from parent `<Document />`) | `pdf` |
| renderAnnotationLayer | Whether annotations (e.g. links) should be rendered. | `true` | `false` |
| renderForms | Whether forms should be rendered. `renderAnnotationLayer` prop must be set to `true`. | `false` | `true` |
| 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"` |
| 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"` | `"custom"` |
| renderTextLayer | Whether a text layer should be rendered. | `true` | `false` |
| 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` |
| scale | Page scale. | `1` | `0.5` |
Expand Down
4 changes: 2 additions & 2 deletions packages/react-pdf/src/Document.tsx
Expand Up @@ -201,10 +201,10 @@ export type DocumentProps = {
/**
* Rendering mode of the document. Can be `"canvas"`, `"custom"`, `"none"` or `"svg"`. If set to `"custom"`, `customRenderer` must also be provided.
*
* **Warning**: SVG render mode is no longer maintained and may be removed in the future.
* **Warning**: SVG render mode is deprecated and will be removed in the future.
*
* @default 'canvas'
* @example 'svg'
* @example 'custom'
*/
renderMode?: RenderMode;
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/react-pdf/src/Page.tsx
Expand Up @@ -273,10 +273,10 @@ export type PageProps = {
/**
* Rendering mode of the document. Can be `"canvas"`, `"custom"`, `"none"` or `"svg"`. If set to `"custom"`, `customRenderer` must also be provided.
*
* **Warning**: SVG render mode is no longer maintained and may be removed in the future.
* **Warning**: SVG render mode is deprecated and will be removed in the future.
*
* @default 'canvas'
* @example 'svg'
* @example 'custom'
*/
renderMode?: RenderMode;
/**
Expand Down

0 comments on commit 78e123d

Please sign in to comment.