agentic-net-examples / facades-secure-documents
AGENTS.md2 starsChanged 4 months agoMITView on GitHub
C# examples for facades-secure-documents using Aspose.PDF for .NET
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-bookmarksAGENTS.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-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
Files
AGENTS - facades-secure-documents
Facades secure documents in PDF using C# / .NET -- 39 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-secure-documents category. This folder contains standalone C# examples for facades-secure-documents operations. See the root agents.md for repository-wide conventions and boundaries.
Scope
- This folder contains examples for facades-secure-documents.
- Files are standalone
.csexamples stored directly in this folder.
Required Namespaces
using Aspose.Pdf.Facades;(38/39 files) ← category-specificusing Aspose.Pdf;(24/39 files) ← category-specificusing Aspose.Pdf.Text;(3/39 files)using System;(39/39 files)using System.IO;(36/39 files)using Azure.Identity;(1/39 files)using Azure.Security.KeyVault.Secrets;(1/39 files)using NUnit.Framework;(1/39 files)using System.Collections.Generic;(1/39 files)using System.Diagnostics;(1/39 files)
Common Code Pattern
Most files in this category use PdfFileSecurity from Aspose.Pdf.Facades:
PdfFileSecurity tool = new PdfFileSecurity();
tool.BindPdf("input.pdf");
// ... PdfFileSecurity operations ...
tool.Save("output.pdf");Files in this folder
| File | Title | Key APIs | Description |
| apply-password-protection-to-pdf | Apply Password Protection to PDF without Loading Document | PdfFileSecurity, EncryptFile, DocumentPrivilege | Shows how to encrypt an existing PDF file with user and owner passwords using the PdfFileSecurity... |
| batch-decrypt-pdfs-owner-passwords | Batch Decrypt PDFs Using Owner Passwords | PdfFileSecurity, DecryptFile, PdfFileSecurity (constructor) | Shows how to read a simple configuration file containing PDF paths and owner passwords, then decr... |
| batch-encrypt-pdf-files | Batch Encrypt PDF Files with User and Owner Passwords | PdfFileSecurity, EncryptFile, DocumentPrivilege | Shows how to encrypt every PDF in a directory using Aspose.Pdf.Facades.PdfFileSecurity with a com... |
| batch-update-pdf-user-passwords | Batch Update PDF User Passwords | PdfFileSecurity, TryChangePassword | Shows how to iterate through a folder of PDF files and change each file's user password to a stan... |
| change-pdf-passwords-from-csv | Change User and Owner Passwords for PDFs from CSV | PdfFileSecurity, BindPdf, ChangePassword | Shows how to read PDF file paths and passwords from a CSV file and use Aspose.Pdf.Facades.PdfFile... |
| change-user-and-owner-passwords | Change User and Owner Passwords in PDF | PdfFileSecurity, ChangePassword | Demonstrates how to change both the user and owner passwords of an encrypted PDF in a single call... |
| change-user-password-of-encrypted-pdf | Change User Password of Encrypted PDF | PdfFileSecurity, ChangePassword, ctor | Demonstrates how to update the user password of an already encrypted PDF while keeping the existi... |
| check-pdf-encryption-and-toggle-protection | Check PDF Encryption and Apply or Remove Protection | PdfFileInfo, Document, Encrypt | The example shows how to inspect a PDF's IsEncrypted flag using PdfFileInfo, then either encrypt ... |
| check-pdf-extended-usage-rights | Check PDF for Extended Usage Rights | Document, PdfFileSignature, BindPdf | Shows how to use Aspose.Pdf's PdfFileSignature facade to determine if a PDF contains extended usa... |
| conditional-decrypt-modify-pdf | Conditional Decrypt and Modify PDF with Aspose.Pdf | Document, PdfFileSecurity, DecryptFile | The example loads a PDF, detects if it is encrypted, decrypts it using the owner password when ne... |
| conditional-pdf-encryption-based-on-filename | Conditional PDF Encryption Based on File Name | PdfFileSecurity, BindPdf, EncryptFile | Demonstrates how to encrypt multiple PDF files using Aspose.Pdf, selecting the key size and encry... |
| decrypt-pdf-owner-password | Decrypt PDF Using Owner Password | PdfFileSecurity, DecryptFile | Demonstrates how to remove encryption from a PDF file by providing the owner password using Aspos... |
| decrypt-pdf-using-owner-password-azure-key-vault | Decrypt PDF Using Owner Password from Azure Key Vault | PdfFileSecurity, DecryptFile | Shows how to retrieve an owner password stored in Azure Key Vault and use Aspose.Pdf.Facades to d... |
| disable-copying-enable-printing-pdf | Disable Copying While Enabling Printing for PDF | PdfFileSecurity, SetPrivilege, DocumentPrivilege | Demonstrates using Aspose.Pdf.Facades.PdfFileSecurity to set document privileges so that copying ... |
| encrypt-decrypt-pdf-roundtrip | Encrypt and Decrypt PDF with Round‑Trip Verification | PdfFileSecurity, BindPdf, EncryptFile | Demonstrates how to encrypt a PDF using a user and owner password, decrypt it back, and verify in... |
| encrypt-pdf-256-aes | Encrypt PDF with 256‑bit AES using Aspose.Pdf | PdfFileSecurity, EncryptFile, DocumentPrivilege | Shows how to encrypt a PDF with 256‑bit AES, set user and owner passwords, and apply a print priv... |
| encrypt-pdf-aes256-custom-privileges | Encrypt PDF with AES‑256 and Custom Privileges | PdfFileSecurity, EncryptFile, DocumentPrivilege | Demonstrates encrypting a PDF using AES‑256 while applying custom document privileges such as all... |
| encrypt-pdf-aes256-upload | Encrypt PDF with AES‑256 and Upload to Cloud Storage | PdfFileSecurity, BindPdf, EncryptFile | Shows how to encrypt a PDF using Aspose.Pdf.Facades with AES‑256 and then upload the encrypted st... |
| encrypt-pdf-from-byte-array | Encrypt PDF from Byte Array using Aspose.Pdf | Document, PdfFileSecurity, DocumentPrivilege | Shows how to load a PDF from a byte array, apply 256‑bit AES encryption with user and owner passw... |
| encrypt-pdf-rc4-128-print-edit-privileges | Encrypt PDF with RC4‑128 and Enable Print/Edit Privileges | Document, DocumentPrivilege, PdfFileSecurity | Demonstrates how to combine print and edit privileges, then encrypt a PDF using RC4‑128 with Aspo... |
| encrypt-pdf-rc4-40 | Encrypt PDF with RC4‑40 and Password | PdfFileSecurity, EncryptFile, DocumentPrivilege | Shows how to encrypt an existing PDF using the RC4‑40 algorithm with user and owner passwords and... |
| encrypt-pdf-stream-rc4-40 | Encrypt PDF Stream with RC4‑40 using Aspose.Pdf | PdfFileSecurity, BindPdf, EncryptFile | Shows how to encrypt a PDF supplied as a stream with 40‑bit RC4 encryption using Aspose.Pdf's Pdf... |
| encrypt-pdf-to-memory-stream | Encrypt PDF and Save to MemoryStream | Document, Encrypt, Permissions | Demonstrates loading a PDF with Aspose.Pdf, applying AES‑256 encryption with user/owner passwords... |
| encrypt-pdf-with-password-and-capture-exceptions | Encrypt PDF with Password and Capture Exceptions | PdfFileSecurity, AllowExceptions, BindPdf | Demonstrates encrypting a PDF using PdfFileSecurity, enabling AllowExceptions to suppress throws,... |
| encrypt-pdf-with-user-password | Encrypt PDF with User Password Only | PdfFileSecurity, EncryptFile, DocumentPrivilege | Shows how to encrypt a PDF using Aspose.Pdf.Facades by providing only a user password (owner pass... |
| encrypt-pdfs-with-performance-timing | Encrypt PDFs with Performance Timing | PdfFileSecurity, BindPdf, EncryptFile | Shows how to encrypt PDF files using Aspose.Pdf's PdfFileSecurity facade while measuring the time... |
| load-pdf-verify-page-count-facade | Load PDF and Verify Page Count Using PdfFileInfo Facade | PdfFileInfo, Document, Pages | Demonstrates loading a PDF file via the PdfFileInfo facade class and confirming successful loadin... |
| pdf-decryption-failure-wrong-owner-password-test | Unit Test for PDF Decryption Failure with Incorrect Owner Pa... | Document, Page, TextFragment | Demonstrates encrypting a PDF with Aspose.Pdf and writing an NUnit test that asserts DecryptFile ... |
| pdf-encryption-summary | Generate PDF Encryption Summary with Privileges | PdfFileInfo, IsEncrypted, GetDocumentPrivilege | Demonstrates how to inspect PDF files for encryption status, algorithm (when detectable), and doc... |
| remove-extended-usage-rights-from-signed-pdf | Remove Extended Usage Rights from Signed PDF | PdfFileSignature, BindPdf, ContainsUsageRights | Shows how to load a signed PDF, detect extended usage rights, remove them with PdfFileSignature, ... |
| ... | and 9 more files |
Category Statistics
- Total examples: 39
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-secure-documents 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.

