agentic-net-examples / facades-bookmarks
AGENTS.md2 starsChanged 4 months agoMITView on GitHub
C# examples for facades-bookmarks using Aspose.PDF for .NET
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository36 other files it gives its agents.
- accessibility-and-tagged-pdfsAGENTS.md
- aspose-pdf-examplesAGENTS.md
- basic-operationsAGENTS.md
- compare-pdfAGENTS.md
- conversionAGENTS.md
- documentAGENTS.md
- facades-acroformsAGENTS.md
- facades-annotationsAGENTS.md
- facades-convert-documentsAGENTS.md
- facades-documentsAGENTS.md
- facades-edit-documentAGENTS.md
- facades-extract-images-and-textAGENTS.md
- facades-fill-formsAGENTS.md
- facades-formsAGENTS.md
- facades-metadataAGENTS.md
- facades-pagesAGENTS.md
- facades-secure-documentsAGENTS.md
- facades-sign-documentsAGENTS.md
- facades-stampsAGENTS.md
- facades-texts-and-imagesAGENTS.md
- facades-xmp-metadataAGENTS.md
- graphs-zugferd-operatorsAGENTS.md
- pagesAGENTS.md
- parse-pdfAGENTS.md
- securing-and-signing-pdfAGENTS.md
- stampingAGENTS.md
- uncategorizedAGENTS.md
- working-with-annotationsAGENTS.md
- working-with-attachmentsAGENTS.md
- working-with-formsAGENTS.md
- working-with-graphsAGENTS.md
- working-with-imagesAGENTS.md
- working-with-tablesAGENTS.md
- working-with-textAGENTS.md
- working-with-xmlAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
The file
We split this AGENTS.md into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 105
Call Save({output_pdf}) on the PdfBookmarkEditor to write out the PDF (required if any modifications are made or to finalize the operation).
- Distinctive: line 107
Create a bookmark that points to a page using PdfBookmarkEditor.CreateBookmarkOfPage({string_literal}, {int}) where the page number is …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS - facades-bookmarks
Facades bookmarks in PDF using C# / .NET -- 35 verified, compile-tested examples for Aspose.PDF for .NET 26.8.0. Each
.csfile is a standalone, build-validated console example, generated and runtime-checked by an AI agent before publishing.
Persona
You are a C# developer specializing in PDF processing using Aspose.PDF for .NET, working within the facades-bookmarks category. This folder contains standalone C# examples for facades-bookmarks operations. See the root agents.md for repository-wide conventions and boundaries.
Scope
- This folder contains examples for facades-bookmarks.
- Files are standalone
.csexamples stored directly in this folder.
Required Namespaces
using Aspose.Pdf.Facades;(35/35 files) ← category-specificusing Aspose.Pdf;(16/35 files)using System;(35/35 files)using System.IO;(34/35 files)using System.Collections.Generic;(12/35 files)using System.Drawing;(4/35 files)using System.Text.Json;(3/35 files)using System.Text.RegularExpressions;(1/35 files)
Common Code Pattern
Most files in this category use PdfBookmarkEditor from Aspose.Pdf.Facades:
PdfBookmarkEditor tool = new PdfBookmarkEditor();
tool.BindPdf("input.pdf");
// ... PdfBookmarkEditor operations ...
tool.Save("output.pdf");Files in this folder
| File | Title | Key APIs | Description |
| add-colored-bookmarks-to-pdf | Add Colored Bookmarks to PDF Sections | PdfBookmarkEditor, BindPdf, CreateBookmarks | Shows how to create PDF bookmarks and set their title color (red for warnings, green for informat... |
| add-external-url-bookmarks-to-pdf | Add External URL Bookmarks to PDF | Document, PdfContentEditor, BindPdf | Shows how to create PDF bookmarks that open external web addresses using Aspose.Pdf Facades. |
| add-image-bookmarks-to-pdf | Add Image Bookmarks to PDF | Document, Page, XImage | Scans a PDF for images, records each image's page number, and creates a bookmark that links direc... |
| add-javascript-bookmark-to-pdf | Add JavaScript Bookmark to PDF | PdfContentEditor, BindPdf, CreateBookmarksAction | Shows how to create a PDF bookmark that runs JavaScript code when clicked using the Aspose.Pdf Fa... |
| add-subbookmarks-to-pdf-chapter | Add Subbookmarks to a PDF Chapter | PdfBookmarkEditor, BindPdf, CreateBookmarks | Shows how to create a parent bookmark and attach child bookmarks to represent sections within a c... |
| add-toc-bookmark-to-pdfs-batch | Add Table of Contents Bookmark to PDFs in Batch | PdfBookmarkEditor, BindPdf, CreateBookmarkOfPage | Shows how to process all PDF files in a directory and add a top‑level "Table of Contents" bookmar... |
| add-top-level-blue-bookmark-to-pdf | Add Top-Level Blue Bookmark to PDF | PdfBookmarkEditor, BindPdf, CreateBookmarks | Demonstrates how to create a top‑level bookmark that points to the first page of a PDF and set it... |
| adjust-pdf-bookmarks-after-inserting-pages | Adjust PDF Bookmarks After Inserting Pages | Document, PdfBookmarkEditor, ExtractBookmarks | Shows how to extract existing bookmarks, insert blank pages at the beginning of a PDF, and recrea... |
| batch-add-reviewed-bookmark-to-pdfs | Batch Add "Reviewed" Bookmark to PDFs | PdfBookmarkEditor, BindPdf, CreateBookmarkOfPage | Shows how to loop through PDF files in a directory, use PdfBookmarkEditor to create a "Reviewed" ... |
| batch-delete-bookmarks-from-encrypted-pdfs | Batch Delete Bookmarks from Encrypted PDFs | Document, PdfBookmarkEditor, DeleteBookmarks | Shows how to open password‑protected PDF files, remove all bookmarks using PdfBookmarkEditor, and... |
| collapse-specific-pdf-bookmarks | Collapse Specific PDF Bookmarks Using Aspose.Pdf | PdfBookmarkEditor, BindPdf, ExtractBookmarks | Demonstrates how to set selected PDF bookmarks to a collapsed (closed) state by extracting, modif... |
| convert-bookmark-titles-to-title-case | Convert PDF Bookmark Titles to Title Case with Proper Noun P... | PdfBookmarkEditor, BindPdf, ExtractBookmarks | Demonstrates how to read PDF bookmarks, convert each title to title case while keeping predefined... |
| create-bookmark-to-named-destination | Create Bookmark to Named Destination in PDF | Document, PdfContentEditor, BindPdf | Shows how to add a bookmark that points to an existing named destination within a PDF using Aspos... |
| create-hierarchical-pdf-bookmarks | Create Hierarchical Bookmarks in a PDF | PdfBookmarkEditor, BindPdf, CreateBookmarks | Demonstrates how to bind an existing PDF with PdfBookmarkEditor and add a multi‑level bookmark hi... |
| delete-all-bookmarks-from-pdf | Delete All Bookmarks from PDF | PdfBookmarkEditor, BindPdf, DeleteBookmarks | Demonstrates how to remove every bookmark from a PDF document using Aspose.Pdf's PdfBookmarkEdito... |
| delete-bookmark-from-pdf | Delete Bookmark from PDF Using PdfBookmarkEditor | PdfBookmarkEditor, BindPdf, ExtractBookmarks | Demonstrates binding a PDF to PdfBookmarkEditor, listing existing bookmarks, deleting a specific ... |
| delete-bookmarks-matching-regex | Delete Bookmarks Matching a Regex Pattern | PdfBookmarkEditor, BindPdf, ExtractBookmarks | Demonstrates how to remove PDF bookmarks whose titles match a specified regular expression using ... |
| export-pdf-bookmarks-to-csv | Export PDF Bookmarks to CSV | PdfBookmarkEditor, BindPdf, ExtractBookmarks | Opens a PDF, extracts all bookmarks recursively using PdfBookmarkEditor, and writes each bookmark... |
| export-pdf-bookmarks-to-excel | Export PDF Bookmarks to Excel | PdfBookmarkEditor, ExcelSaveOptions, Document | Shows how to extract all bookmarks from a PDF using PdfBookmarkEditor, place them in a table, and... |
| export-pdf-bookmarks-to-json | Export PDF Bookmark Hierarchy to JSON | PdfBookmarkEditor, BindPdf, ExtractBookmarks | Shows how to extract the bookmark tree from a PDF using PdfBookmarkEditor and write each bookmark... |
| export-pdf-bookmarks-to-text | Export PDF Bookmarks to Text Outline | PdfBookmarkEditor, BindPdf, ExtractBookmarks | Shows how to extract the hierarchical bookmarks from a PDF using Aspose.Pdf.Facades.PdfBookmarkEd... |
| export-pdf-bookmarks-to-xml | Export PDF Bookmarks to XML | PdfBookmarkEditor, BindPdf, ExportBookmarksToXML | Demonstrates how to bind a PDF with Aspose.Pdf.Facades.PdfBookmarkEditor and export its complete ... |
| extract-pdf-bookmarks-to-json | Extract PDF Bookmarks to JSON | PdfBookmarkEditor, BindPdf, ExtractBookmarks | Shows how to use Aspose.Pdf.Facades.PdfBookmarkEditor to extract PDF bookmarks, build a hierarchi... |
| import-bookmarks-from-csv | Import Bookmarks from CSV into PDF | PdfBookmarkEditor, BindPdf, CreateBookmarks | Shows how to read a CSV file, build a hierarchical bookmark tree, and add the bookmarks to a PDF ... |
| import-bookmarks-from-database | Import Bookmarks from Database into PDF | PdfBookmarkEditor, BindPdf, CreateBookmarks | Shows how to read bookmark records (title and page number) from a simulated database query and ad... |
| import-bookmarks-from-json | Import Bookmarks from JSON into a PDF | PdfBookmarkEditor, Bookmark, Bookmarks | Demonstrates how to read a JSON file containing bookmark definitions, map them to Aspose.Pdf.Faca... |
| import-ofd-bookmarks-to-pdf | Import OFD File and Add Bookmarks to PDF | Document, OfdLoadOptions, PdfBookmarkEditor | Demonstrates loading an OFD document, converting each page into a PDF bookmark, and saving the re... |
| merge-pdf-bookmarks | Merge Bookmarks from One PDF into Another | PdfBookmarkEditor, BindPdf, ExportBookmarksToXML | Shows how to export bookmarks from a source PDF to an XML stream and import them into a target PD... |
| remove-duplicate-bookmarks | Remove Duplicate Bookmarks from PDF | PdfBookmarkEditor, BindPdf, ExtractBookmarks | Shows how to extract all bookmarks, filter out duplicates based on title and page number, delete ... |
| rename-pdf-bookmarks-using-translation-dictionary | Rename PDF Bookmarks Using a Translation Dictionary | PdfBookmarkEditor, BindPdf, ModifyBookmarks | Demonstrates loading a PDF, renaming its bookmarks according to a translation dictionary, and sav... |
| ... | and 5 more files |
Category Statistics
- Total examples: 35
Category-Specific Tips
Key API Surface
Aspose.Pdf.Facades.BookmarkAspose.Pdf.Facades.Bookmark.ActionAspose.Pdf.Facades.Bookmark.PageNumberAspose.Pdf.Facades.Bookmark.TitleAspose.Pdf.Facades.BookmarksAspose.Pdf.Facades.PdfBookmarkEditorAspose.Pdf.Facades.PdfBookmarkEditor.BindPdfAspose.Pdf.Facades.PdfBookmarkEditor.BindPdf(string)Aspose.Pdf.Facades.PdfBookmarkEditor.DeleteBookmarks(string)Aspose.Pdf.Facades.PdfBookmarkEditor.ExtractBookmarksAspose.Pdf.Facades.PdfBookmarkEditor.ImportBookmarksWithXMLAspose.Pdf.Facades.PdfBookmarkEditor.SaveAspose.Pdf.Facades.PdfBookmarkEditor.Save(string)
Rules
- Instantiate a PdfBookmarkEditor, then bind the source PDF with BindPdf({input_pdf}) before performing any bookmark operations.
- Export the document's bookmarks to an XML file using ExportBookmarksToXML({string_literal}) after the PDF is bound.
- Call Save({output_pdf}) on the PdfBookmarkEditor to write out the PDF (required if any modifications are made or to finalize the operation).
- Load a PDF with PdfBookmarkEditor.BindPdf({input_pdf}) before performing any bookmark operations.
- Create a bookmark that points to a page using PdfBookmarkEditor.CreateBookmarkOfPage({string_literal}, {int}) where the page number is 1‑based.
Warnings
- Save() creates a new PDF file even if no bookmark changes were made; it may be unnecessary if only exporting bookmarks.
- PdfBookmarkEditor belongs to the Aspose.Pdf.Facades namespace, which may be deprecated in future releases; consider using the Document class for newer APIs.
- CreateBookmarkOfPage expects the bookmark and page arrays to be of equal length; each entry maps a single page (range support may be limited).
- PdfBookmarkEditor belongs to the Aspose.Pdf.Facades namespace, which may be deprecated in newer versions of Aspose.PDF.
- DeleteBookmarks removes every bookmark; there is no overload for selective deletion.
General Tips
- See parent AGENTS.md for:
- Boundaries -- Always / Ask First / Never rules for all examples
- Common Mistakes -- verified anti-patterns that cause build failures
- Domain Knowledge -- cross-cutting API-specific gotchas
- Testing Guide -- build and run verification steps
- Review code examples in this folder for facades-bookmarks patterns
<!-- AUTOGENERATED:START -->Updated: 2026-08-20 | Run: 20260820_001147_12d7b3
<!-- AUTOGENERATED:END -->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

