---
title: "onepdf cookbook"
url: https://recursiveai.org/onepdf/cookbook/
description: "Short recipes for common OnePDF tasks, each with complete code you can copy."
version: "1.11.0"
---

# onepdf cookbook

Short recipes for common OnePDF tasks, each with complete code you can copy.

## Recipes

- [Add an image or a watermark to a PDF](https://recursiveai.org/onepdf/cookbook/add-image-watermark/index.md): Draw a PNG or JPEG onto a page of an existing PDF in C#, stamp a translucent “DRAFT” across every page, and put a faint logo behind the content.
- [Arabic and Hindi text in a PDF](https://recursiveai.org/onepdf/cookbook/arabic-hindi-text/index.md): Write Arabic (right to left, letters joined) and Hindi (conjuncts and vowel signs in place) into a PDF in C# with OnePdf.Layout, and read it back.
- [Create PDF/A](https://recursiveai.org/onepdf/cookbook/create-pdf-a/index.md): Write PDF/A-2b and PDF/A-3u files in C# from documents made or edited with OnePDF, attach data to PDF/A-3, and check files from elsewhere first.
- [Create PDF/UA](https://recursiveai.org/onepdf/cookbook/create-pdf-ua/index.md): Generate a tagged PDF in C# that is PDF/UA-1 and PDF/A-2a in one file, and see what OnePDF refuses when a title or alternate text is missing.
- [Decrypt or encrypt a PDF](https://recursiveai.org/onepdf/cookbook/decrypt-pdf/index.md): Remove the password from a PDF you are allowed to open, in C#, or encrypt one with AES-256, a password and permission flags, with OnePDF.
- [Extract text from a PDF](https://recursiveai.org/onepdf/cookbook/extract-text/index.md): Read the text of every page of a PDF in C# in reading order, leave out running headers and footers, and keep the page layout when you need it, with OnePDF.
- [Fill and flatten form fields](https://recursiveai.org/onepdf/cookbook/fill-flatten-forms/index.md): List a PDF form’s fields, fill text fields and check boxes in C#, save the filled form, then flatten it so the values become part of the page, with OnePDF.
- [Generate a PDF with tables](https://recursiveai.org/onepdf/cookbook/generate-tables/index.md): Generate a multi-page PDF table in C# with OnePdf.Layout: column widths, striped rows, header and footer rows on every page, spans and page numbers.
- [Merge PDFs](https://recursiveai.org/onepdf/cookbook/merge-pdfs/index.md): Merge PDF files in C# with OnePDF, keeping bookmarks, links and form fields, merge PDFs held in memory, or append chosen pages to a file.
- [Redact text in a PDF](https://recursiveai.org/onepdf/cookbook/redact/index.md): Find a name on every page of a PDF in C#, remove it from the content, cover the spot with a black box, and clear it from the metadata.
- [Repair a damaged PDF](https://recursiveai.org/onepdf/cookbook/repair-damaged-pdf/index.md): Open a damaged or truncated PDF in C#, see what OnePDF repaired, and save a clean copy, or reject damaged files outright with strict mode.
- [Rotate, delete and reorder pages](https://recursiveai.org/onepdf/cookbook/rotate-delete-pages/index.md): Rotate, delete, move and insert pages of an existing PDF in C# with OnePDF; bookmarks and links to deleted pages are repaired.
- [Sign a PDF and verify its signatures](https://recursiveai.org/onepdf/cookbook/sign-and-verify/index.md): Sign a PDF in C# with a certificate from a .pfx file, verify the signature against your own root, and see how a change after signing is reported.
- [Split a PDF](https://recursiveai.org/onepdf/cookbook/split-pdf/index.md): Split a PDF into one file per page, or into chosen page ranges, in C# with OnePDF. Bookmarks, links and form fields go with their pages.
- [Get words and their positions](https://recursiveai.org/onepdf/cookbook/word-positions/index.md): Read every word on a PDF page with its bounding box in C#, group words into rows, and find the value printed next to a label, with OnePDF.
