@peculiar/pdf-doc is a Typescript library for creating and working with a PDF files focused on signing, and encryption scenarios.
| Sample | Description |
|---|---|
| Creating a document | Demonstrates how to create a simple PDF document with a page and some text content. |
| Reading a document | Demonstrates how to read a PDF document and get a list of pages. |
| Updating a document | Demonstrates how to read a PDF document and update it by adding some form components. |
| Add PDF pages | Demonstrates how to read a PDF document and add a new page with an image. |
| Remove PDF pages | Demonstrates how to remove pages from a PDF document. |
| Rotate PDF pages | Demonstrates how to rotate pages in a PDF document. |
| Signing a document | Demonstrates how to read a PDF document, add an invisible signature, and sign it using an RSA X509 certificate. |
| Verifying a document signature | Demonstrates how to read a signed PDF document, verify the signature, and output the result of the verification. |
| Creating a password-encrypted document | Demonstrates how to create a PDF document, protect it with a password, and allow printing. |
| Reading a password-encrypted document | Demonstrates how to read a PDF document that is protected with a password. |
| Add password | Demonstrates how to read an unprotected PDF document and add password protection to it. |
| Remove password | Demonstrates how to remove password protection from a password-protected PDF document. |
| Protect PDF | Demonstrates how to read a PDF document and protect it, with permissions enabled for copying content and filling interactive forms. |
| Unprotect PDF | Demonstrates how to read a protected PDF document and remove all restrictions. |
| Creating a certificate encrypted document | Demonstrates how to read a PDF document and encrypt it using a public key X509 certificate. |
| Reading a certificate encrypted document | Demonstrates how to read an encrypted PDF document using the corresponding private key X509 certificate. |
| Add watermark | Demonstrates how to read a PDF document and add a watermark in the form of an image to all pages. |
| Splitting a document | Demonstrates how to split a PDF document into multiple files for specified page ranges. |
| Merging a document | Demonstrates how to merge multiple PDF documents into a single file with the ability to specify specific pages to include. |
| Attach file | Demonstrates how to create a new PDF document and add a file to it. |
| Extract embedded file | Demonstrates how to read a PDF document, get a list of embedded files, and extract the content of a specified file. |