agentleFS
aspose-pdfaspose-pdf/agentic-net-examples/graphs-zugferd-operators/AGENTS.md

agentic-net-examples / graphs-zugferd-operators

AGENTS.md2 starsChanged 4 months agoMITView on GitHub

C# examples for graphs-zugferd-operators using Aspose.PDF for .NET

The file

We split this AGENTS.md into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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
  1. Distinctive:

    Create a {doc} (Aspose.Pdf.Document), add a {page} (Aspose.Pdf.Page) via doc.Pages.Add(), instantiate a Graph (Aspose.Pdf.Drawing.Graph) …

    line 118

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS - graphs-zugferd-operators

Graphs ZUGFeRD operators in PDF using C# / .NET -- 85 verified, compile-tested examples for Aspose.PDF for .NET 26.8.0. Each .cs file 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 graphs-zugferd-operators category. This folder contains standalone C# examples for graphs-zugferd-operators operations. See the root agents.md for repository-wide conventions and boundaries.

Scope

  • This folder contains examples for graphs-zugferd-operators.
  • Files are standalone .cs examples stored directly in this folder.

Required Namespaces

  • using Aspose.Pdf; (84/85 files) ← category-specific
  • using Aspose.Pdf.Annotations; (24/85 files)
  • using Aspose.Pdf.Text; (12/85 files)
  • using Aspose.Pdf.Forms; (9/85 files)
  • using Aspose.Pdf.Drawing; (7/85 files)
  • using Aspose.Pdf.Devices; (6/85 files)
  • using Aspose.Pdf.Operators; (5/85 files)
  • using Aspose.Pdf.Facades; (3/85 files)
  • using Aspose.Pdf.Tagged; (2/85 files)
  • using Aspose.Pdf.Optimization; (1/85 files)
  • using Aspose.Pdf.Signatures; (1/85 files)
  • using System; (85/85 files)
  • using System.IO; (77/85 files)
  • using System.Collections.Generic; (7/85 files)
  • using System.Drawing; (1/85 files)
  • using System.Drawing.Printing; (1/85 files)
  • using System.Reflection; (1/85 files)
  • using System.Text.Json; (1/85 files)
  • using System.Xml; (1/85 files)
  • using System.Xml.Schema; (1/85 files)

Common Code Pattern

Most files follow this pattern:

using (Document doc = new Document("input.pdf"))
{
    // ... operations ...
    doc.Save("output.pdf");
}

Files in this folder

FileTitleKey APIsDescription
add-auto-close-javascript-to-pdfAdd Auto‑Close JavaScript to PDFDocument, JavascriptAction, OpenActionShows how to embed a document‑level JavaScript action that automatically closes a PDF after a spe...
add-auto-print-javascript-action-to-pdfAdd Auto‑Print JavaScript Action to PDFDocument, JavascriptAction, OpenActionDemonstrates how to attach a JavaScript action that automatically opens the print dialog when the...
add-auto-save-javascript-to-pdfAdd Document-Level Auto‑Save JavaScript to PDFDocument, JavascriptAction, ctor(string)Demonstrates how to embed a document‑level JavaScript action that automatically saves the PDF at ...
add-custom-metadata-to-zugferd-pdfAdd Custom Metadata to ZUGFeRD PDFDocument, DocumentInfo, SaveDemonstrates loading an existing PDF with Aspose.Pdf, adding custom metadata entries such as proj...
add-encrypted-file-attachment-to-pdfAdd Encrypted File Attachment to PDFDocument, Page, TextFragmentShows how to embed a file attachment using a stream and then encrypt the PDF so only authorized u...
add-expiry-javascript-action-to-pdfAdd Expiry JavaScript Action to PDFDocument, JavascriptAction, OpenActionShows how to embed a document‑level JavaScript action that checks a predefined expiry date and cl...
add-file-attachment-to-pdfAdd File Attachment to PDF with DescriptionDocument, Page, RectangleShows how to attach an external PDF file to a PDF document using Aspose.Pdf, including a descript...
add-javascript-calculation-to-pdf-totalAdd JavaScript Calculation to PDF Form Total FieldDocument, Form, FieldShows how to embed JavaScript in a PDF using Aspose.Pdf to sum line‑item fields and display the r...
add-javascript-open-action-jump-to-page-5Add JavaScript Open Action to Jump to Page 5Document, JavascriptAction, OpenActionDemonstrates how to attach a JavaScript open action to a PDF using Aspose.Pdf so that the documen...
add-javascript-toggle-optional-sectionsAdd JavaScript to Toggle Optional Sections in PDF FormDocument, CheckboxField, JavascriptActionShows how to attach a JavaScript action to a checkbox field in an Aspose.Pdf form so that optiona...
add-page-level-javascript-alert-to-pdfAdd Page-Level JavaScript Alert to PDFDocument, Page, JavascriptActionDemonstrates how to embed a JavaScript action that shows an alert when a specific PDF page is ope...
add-password-prompt-javascript-to-pdfAdd Password Prompt JavaScript to PDFDocument, JavascriptAction, OpenActionDemonstrates embedding JavaScript in a PDF with Aspose.Pdf to prompt for a password on document o...
add-semi-transparent-text-watermarkAdd Semi-Transparent Text Watermark Behind PDF ContentDocument, Page, WatermarkArtifactDemonstrates how to place a semi‑transparent text watermark behind the existing content on every ...
add-signature-field-with-js-validationAdd Digital Signature Field with JavaScript Validation to PD...Document, Page, RectangleShows how to create a PDF, insert a digital signature field, and attach a JavaScript action that ...
add-xmp-metadata-pdfa-complianceAdd XMP Metadata for PDF/A ComplianceDocument, DocumentInfo, MetadataShows how to load a PDF, add required XMP metadata entries (creator tool, creation date, document...
attach-multiple-files-to-pdfAttach Multiple Files with Descriptions to a PDFDocument, Page, FileSpecificationDemonstrates how to embed several external files into a PDF, each with its own MIME type, descrip...
attach-zugferd-xml-to-pdfAttach ZUGFeRD XML to PDF and Convert to PDF/A‑3BDocument, FileSpecification, EmbeddedFilesShows how to load a PDF, embed a ZUGFeRD XML file as an attached file (AFRelationship.Data), conv...
batch-apply-pdf-password-protectionBatch Apply Password Protection to PDFsDocument, Encrypt, SaveDemonstrates how to iterate through a folder of PDF files and apply identical user and owner pass...
batch-convert-pdfs-to-jpegBatch Convert PDFs to JPEG ImagesDocument, Resolution, JpegDeviceDemonstrates how to iterate through all PDF files in a folder, convert each page to a JPEG image ...
batch-generate-zugferd-pdfs-from-csvBatch Generate ZUGFeRD‑Compliant PDFs from CSVDocument, Page, TextFragmentReads invoice data from a CSV file, creates a PDF for each record, adds basic invoice text, and a...
calculate-total-order-amountCalculate Total Order Amount from PDF Form FieldsDocument, Form, FieldShows how to read quantity and price fields from an Aspose.Pdf form, compute line totals, and wri...
change-pdf-line-widthChange PDF Line Width from 1 to 3 PointsDocument, Page, OperatorShows how to iterate through each page's content operators and modify SetLineWidth operators to c...
combine-multiple-graphs-on-single-pdf-pageCombine Multiple Graphs on a Single PDF PageDocument, Page, GraphDemonstrates how to place four separate graphs in a 2×2 grid on one PDF page using Aspose.Pdf, in...
compress-pdf-images-optimizationCompress PDF Images and Optimize ResourcesDocument, OptimizationOptions, ImageCompressionOptionsDemonstrates how to reduce a PDF file size by enabling image compression, resizing high‑resolutio...
convert-pdf-pages-to-high-resolution-pngConvert PDF Pages to High-Resolution PNG ImagesDocument, Resolution, PngDeviceDemonstrates loading a PDF with Aspose.Pdf, setting a 300 DPI resolution, and converting each pag...
convert-pdf-to-docx-preserve-layoutConvert PDF to DOCX with Layout PreservationDocument, DocSaveOptions, SaveShows how to convert a PDF file to DOCX using Aspose.Pdf while keeping the original layout, fonts...
convert-pdf-to-html-with-embedded-imagesConvert PDF to HTML with Embedded ImagesDocument, HtmlSaveOptions, PartsEmbeddingModesDemonstrates converting a PDF to HTML using Aspose.Pdf while embedding all resources and raster i...
convert-pdf-to-multi-page-tiffConvert PDF to Multi‑Page TIFFDocument, Resolution, TiffSettingsDemonstrates how to load a PDF with Aspose.Pdf, configure TIFF settings, and convert the entire d...
convert-pdf-to-pdfa-2bConvert PDF to PDF/A‑2b ComplianceDocument, Convert, PdfFormatLoads a PDF, converts it to PDF/A‑2b archival format using Aspose.Pdf, logs any conversion errors...
convert-pdf-zugferd-to-pdfa3uConvert PDF with ZUGFeRD to PDF/A‑3U preserving XMLDocument, Convert, SaveShows how to load a PDF containing a ZUGFeRD XML attachment and convert it to PDF/A‑3U while keep...
...and 55 more files

Category Statistics

  • Total examples: 85

Category-Specific Tips

Key API Surface

  • Aspose.Pdf.BorderInfo
  • Aspose.Pdf.BorderSide
  • Aspose.Pdf.Color
  • Aspose.Pdf.Document
  • Aspose.Pdf.Drawing.GradientAxialShading
  • Aspose.Pdf.Drawing.Graph
  • Aspose.Pdf.Drawing.GraphInfo
  • Aspose.Pdf.Drawing.Line
  • Aspose.Pdf.Drawing.Line.GraphInfo
  • Aspose.Pdf.Drawing.Paragraphs
  • Aspose.Pdf.Drawing.Point
  • Aspose.Pdf.Drawing.Rectangle
  • Aspose.Pdf.Drawing.Shapes
  • Aspose.Pdf.GraphInfo
  • Aspose.Pdf.Matrix

Rules

  • Create a {doc} (Aspose.Pdf.Document), add a {page} (Aspose.Pdf.Page) via doc.Pages.Add(), instantiate a Graph (Aspose.Pdf.Drawing.Graph) with width and height, and add it to page.Paragraphs.
  • Instantiate a Line (Aspose.Pdf.Drawing.Line) with a float[] of coordinates, optionally set line.GraphInfo.DashArray = int[] and line.GraphInfo.DashPhase = int to define dash style, then add the line to graph.Shapes.
  • Save the {doc} to a file path ({output_pdf}) using doc.Save().
  • Create a {graph} (Aspose.Pdf.Drawing.Graph) with dimensions {float} width and {float} height, set IsChangePosition={bool}, position it using Left={float} and Top={float}, add a Rectangle shape (Aspose.Pdf.Drawing.Rectangle) at (0,0) with the same dimensions, set its fill and border color to {color}, assign Graph.ZIndex={int}, then add the Graph to {page}.Paragraphs.
  • Set {page}.PageInfo.Margin.Left={float} and .Top={float} to zero (or desired offset) before placing Graph objects to ensure absolute positioning aligns with page coordinates.

Warnings

  • GraphInfo is accessed through the Line instance (line.GraphInfo); ensure the line object supports this property.
  • DashArray expects an int[] where the pattern values represent dash and gap lengths; incorrect values may produce unexpected rendering.
  • GraphInfo is accessed via the Rectangle.GraphInfo property; the exact type name may differ in newer library versions.
  • Rectangle constructor uses integer parameters for coordinates and size; ensure correct units.
  • GraphInfo may be null until the shape is added to a Graph; setting FillColor before adding is safe in this pattern.

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 graphs-zugferd-operators patterns
<!-- AUTOGENERATED:START -->

Updated: 2026-08-20 | Run: 20260820_001147_12d7b3

<!-- AUTOGENERATED:END -->

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.