Skip to content

Commit

Permalink
Merge pull request #731 from vlio20/master
Browse files Browse the repository at this point in the history
adding information about font subset
  • Loading branch information
Hopding authored Jan 9, 2021
2 parents a0f0dab + ee0d482 commit 9da3431
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,12 @@ Error: WinAnsi cannot encode "Ω" (0x03a9)
at Encoding.encodeUnicodeCodePoint
```

Embedding a font into the pdf file might increase its size of the file, in order to avoid this you could just subset the needed characters. You can achive exactly this by embedding your custom font in the following way:

```js
await pdfDoc.embedFont(fontBytes, { subset: true});
```

## Creating and Filling Forms

`pdf-lib` can create, fill, and read PDF form fields. The following field types are supported:
Expand Down

0 comments on commit 9da3431

Please sign in to comment.