Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/site/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
out/
next-env.d.ts
*.tsbuildinfo
.env*.local
16 changes: 16 additions & 0 deletions apps/site/content/docs/v4/components/document.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ This component represents the PDF document itself. It _must_ be the root of your
| creator | Sets creator info on the document's metadata | _String_ | _"react-pdf"_ |
| producer | Sets producer info on the document's metadata | _String_ | _"react-pdf"_ |
| pdfVersion | Sets PDF version for generated document | _String_ | _"1.3"_ |
| conformance | Produces PDF/A output with the given conformance level. [See more](/docs/v4/components/document#conformance-type) | [PDFConformance](/docs/v4/components/document#conformance-type) | _undefined_ |
| language | Sets PDF default language | _String_ | _undefined_ |
| pageMode | Specifying how the document should be displayed when opened | [PageMode](/docs/v4/components/document#pagemode-type) | _useNone_ |
| pageLayout | This controls how (some) PDF viewers choose to show pages | [PageLayout](/docs/v4/components/document#pagelayout-type) | _singlePage_ |
Expand All @@ -40,6 +41,21 @@ This component represents the PDF document itself. It _must_ be the root of your
| useOC | Optional content group panel visible |
| useAttachments | Attachments panel visible |

### Conformance type

`conformance` produces an archival PDF/A file: the document gets XMP conformance metadata and an sRGB OutputIntent, and `pdfVersion` defaults to what the chosen level requires (`1.4` for PDF/A-1, `1.7` for PDF/A-2 and PDF/A-3) unless you set it yourself.

| Value | Description |
|------------|:---------------------------------------:|
| PDF/A-1 | Alias of `PDF/A-1b`, based on PDF 1.4 |
| PDF/A-1b | PDF/A-1 level B conformance |
| PDF/A-2 | Alias of `PDF/A-2b`, based on PDF 1.7 |
| PDF/A-2b | PDF/A-2 level B conformance |
| PDF/A-3 | Alias of `PDF/A-3b`, based on PDF 1.7 |
| PDF/A-3b | PDF/A-3 level B conformance |

Only b-level (visual appearance) conformance is supported. PDF/A requires every font to be embedded, so register your own fonts with `Font.register` — documents using the built-in standard 14 fonts will not fully validate.

### Permissions type

`permissions` prop accepts an object with the following optional boolean fields. All default to `true` when an owner password is set without specifying permissions.
Expand Down
Loading