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: README.md
+87-29
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@
39
39
40
40
-[Features](#features)
41
41
-[Motivation](#motivation)
42
-
-[Examples](#examples)
42
+
-[Usage Examples](#usage-examples)
43
43
-[Create Document](#create-document)
44
44
-[Modify Document](#modify-document)
45
45
-[Copy Pages](#copy-pages)
@@ -60,9 +60,8 @@
60
60
- Draw Text
61
61
- Draw Images
62
62
- Draw Vector Graphics
63
-
- Embed Fonts (supports UTF-8 and UTF-16 character sets)
64
63
- Measure width and height of text
65
-
- Embed Images
64
+
- Embed Fonts (supports UTF-8 and UTF-16 character sets)
66
65
67
66
## Motivation
68
67
@@ -75,7 +74,7 @@ Two of `pdf-lib`'s distinguishing features are:
75
74
76
75
There are [other](#prior-art) good open source JavaScript PDF libraries available. However, most of them can only _create_ documents, they cannot _modify_ existing ones. And many of them only work in particular environments.
77
76
78
-
## Examples
77
+
## Usage Examples
79
78
80
79
### Create Document
81
80
@@ -85,13 +84,19 @@ _This example produces [this PDF](assets/pdfs/examples/document_creation.pdf)._
-[`pdfkit`](https://github.com/devongovett/pdfkit) is a PDF generation library for Node and the Browser. This library was immensely helpful as a reference and existence proof when creating `pdf-lib`. `pdfkit`'s code for [font embedding](https://github.com/Hopding/pdf-lib/blob/AddDocumentation/src/core/pdf-structures/factories/PDFFontFactory.ts#L64-L68), [PNG embedding](https://github.com/Hopding/pdf-lib/blob/AddDocumentation/src/core/pdf-structures/factories/PNGXObjectFactory.ts#L19-L23), and [JPG embedding](https://github.com/Hopding/pdf-lib/blob/AddDocumentation/src/core/pdf-structures/factories/JPEGXObjectFactory.ts#L32-L36) was especially useful.
350
-
-[`pdf.js`](https://github.com/mozilla/pdf.js) is a PDF rendering library for the Browser. This library was helpful as a reference when writing `pdf-lib`'s parser. Some of the code for stream decoding was ported directly to TypeScript for use in `pdf-lib`.
407
+
-[`pdfkit`](https://github.com/devongovett/pdfkit) is a PDF generation library for Node and the Browser. This library was immensely helpful as a reference and existence proof when creating `pdf-lib`. `pdfkit`'s code for [font embedding](https://github.com/Hopding/pdf-lib/blob/Rewrite/src/core/embedders/CustomFontEmbedder.ts#L17-L21), [PNG embedding](https://github.com/Hopding/pdf-lib/blob/Rewrite/src/core/embedders/PngEmbedder.ts#L7-L11), and [JPG embedding](https://github.com/Hopding/pdf-lib/blob/Rewrite/src/core/embedders/JpegEmbedder.ts#L25-L29) was especially useful.
408
+
-[`pdf.js`](https://github.com/mozilla/pdf.js) is a PDF rendering library for the Browser. This library was helpful as a reference when writing `pdf-lib`'s parser. Some of the code for stream decoding was [ported directly to TypeScript](https://github.com/Hopding/pdf-lib/tree/Rewrite/src/core/streams) for use in `pdf-lib`.
351
409
-[`jspdf`](https://github.com/MrRio/jsPDF) is a PDF generation library for the browser.
352
410
-[`pdfmake`](https://github.com/bpampuch/pdfmake) is a PDF generation library for the browser.
353
411
-[`hummus`](https://github.com/galkahana/HummusJS) is a PDF generation and modification library for Node environments. `hummus` is a Node wrapper around a [C++ library](https://github.com/galkahana/PDF-Writer), so it doesn't work in many JavaScript environments - like the Browser or React Native.
0 commit comments