You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: packages/react-pdf/README.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -349,7 +349,7 @@ const options = {
349
349
```
350
350
351
351
> [!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.
353
353
354
354
Alternatively, you could use cMaps from external CDN:
355
355
@@ -465,7 +465,7 @@ const options = {
465
465
```
466
466
467
467
> [!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.
469
469
470
470
Alternatively, you could use standard fonts from external CDN:
471
471
@@ -507,7 +507,7 @@ Loads a document passed using `file` prop.
507
507
| onPassword | Function called when a password-protected PDF is loaded. | Function that prompts the user for password. |`(callback) => callback('s3cr3t_p4ssw0rd')`|
508
508
| 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)`|
509
509
| 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/' }`|
511
511
| renderMode | Rendering mode of the document. Can be `"canvas"`, `"custom"` or `"none"`. If set to `"custom"`, `customRenderer` must also be provided. |`"canvas"`|`"custom"`|
512
512
| 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`|
Copy file name to clipboardexpand all lines: packages/react-pdf/src/Document.tsx
+1-1
Original file line number
Diff line number
Diff line change
@@ -186,7 +186,7 @@ export type DocumentProps = {
186
186
*
187
187
* 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).
188
188
*
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.
0 commit comments