Skip to content

Commit c9158aa

Browse files
committed
Improve wording
1 parent 71f4065 commit c9158aa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/react-pdf/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ const options = {
349349
```
350350

351351
> [!NOTE]
352-
> Make sure to define `options` object outside of your React component, and use `useMemo` if you can't.
352+
> Make sure to define `options` object outside of your React component or use `useMemo` if you can't.
353353
354354
Alternatively, you could use cMaps from external CDN:
355355

@@ -465,7 +465,7 @@ const options = {
465465
```
466466

467467
> [!NOTE]
468-
> Make sure to define `options` object outside of your React component, and use `useMemo` if you can't.
468+
> Make sure to define `options` object outside of your React component or use `useMemo` if you can't.
469469
470470
Alternatively, you could use standard fonts from external CDN:
471471

@@ -507,7 +507,7 @@ Loads a document passed using `file` prop.
507507
| onPassword | Function called when a password-protected PDF is loaded. | Function that prompts the user for password. | `(callback) => callback('s3cr3t_p4ssw0rd')` |
508508
| 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)` |
509509
| onSourceSuccess | Function called when document source is successfully retrieved from `file` prop. | n/a | `() => alert('Document source retrieved!')` |
510-
| 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).<br /><br />**Note**: Make sure to define options object outside of your React component, and use `useMemo` if you can't. | n/a | `{ cMapUrl: '/cmaps/' }` |
510+
| 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).<br /><br />**Note**: Make sure to define options object outside of your React component or use `useMemo` if you can't. | n/a | `{ cMapUrl: '/cmaps/' }` |
511511
| renderMode | Rendering mode of the document. Can be `"canvas"`, `"custom"` or `"none"`. If set to `"custom"`, `customRenderer` must also be provided. | `"canvas"` | `"custom"` |
512512
| 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` |
513513

packages/react-pdf/src/Document.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export type DocumentProps = {
186186
*
187187
* 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).
188188
*
189-
* **Note**: Make sure to define options object outside of your React component, and use `useMemo` if you can't.
189+
* **Note**: Make sure to define options object outside of your React component or use `useMemo` if you can't.
190190
*
191191
* @example { cMapUrl: '/cmaps/' }
192192
*/

0 commit comments

Comments
 (0)