Skip to content

Commit 35b82f2

Browse files
Update repo docs (2312 examples, 31 categories)
1 parent e76a0aa commit 35b82f2

37 files changed

Lines changed: 50709 additions & 78 deletions

File tree

.github/copilot-instructions.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Copilot Instructions
2+
3+
This repository is a curated collection of validated, build-tested C# examples for **Aspose.PDF for .NET (26.5.0)** targeting **net10.0**.
4+
5+
The canonical coding-agent guide is [`AGENTS.md`](../AGENTS.md) at the repository root, and there is one per category folder. **Read those first** before suggesting changes.
6+
7+
## When suggesting code in this repository
8+
9+
- Match the style of the surrounding `.cs` files. They are self-contained `dotnet new console` examples, not a multi-file project.
10+
- Use fully-qualified `Aspose.Pdf.*` types (e.g. `Aspose.Pdf.Drawing.Path`) so `System.IO.Path` does not shadow them.
11+
- Wrap every `IDisposable` in a `using` block. `Document` in particular must be disposed deterministically.
12+
- Aspose.PDF uses **1-based** page indexing (`pdfDoc.Pages[1]` is the first page). Off-by-one is the most common bug.
13+
- Write errors to `Console.Error.WriteLine` with the `Error:` prefix. Successful operations log to `Console.WriteLine`.
14+
15+
## Do not
16+
17+
- Edit `AGENTS.md`, `index.json`, or `README.md` by hand. They are regenerated by an external generator and your edits will be overwritten.
18+
- Add a `.csproj` per example. CI synthesises one at validation time; shipping one would conflict.
19+
- Suggest API calls that do not exist in `Aspose.PDF` package version 26.5.0. If you are not sure, check `index.json` for the apis_used field on neighbouring examples in the same category.
20+
21+
## Where to look for context
22+
23+
- [`AGENTS.md`](../AGENTS.md) -- repository-wide conventions, anti-patterns, domain knowledge.
24+
- `<category>/AGENTS.md` -- category-specific tips and the file table.
25+
- [`CONTRIBUTING.md`](../CONTRIBUTING.md) -- the human-oriented contribution rules.

.github/pull_request_template.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## Summary
2+
3+
<!-- One or two sentences: what does this PR change and why. -->
4+
5+
## Changed examples / categories
6+
7+
<!-- List the files or categories touched. e.g.
8+
- `working-with-text/extract-text-from-page.cs`
9+
- `working-with-annotations/` (new file: `add-text-annotation.cs`)
10+
-->
11+
12+
## Validation
13+
14+
- [ ] `dotnet build` succeeded for every changed `.cs` file (paste the final line of output below).
15+
- [ ] `dotnet run` was executed for every changed example. Outcome:
16+
- [ ] Ran to completion successfully
17+
- [ ] Failed at runtime due to a missing input file (note which file below)
18+
- [ ] Skipped runtime testing (explain why below)
19+
20+
```
21+
<!-- Paste the relevant dotnet build / dotnet run output here. -->
22+
```
23+
24+
## Missing input files
25+
26+
<!-- If any example expects an input file (input.pdf, sample.docx, etc.) that is
27+
NOT included in the repo, list them here so the CI runtime check failure is
28+
expected. -->
29+
30+
- None
31+
32+
## Generated metadata
33+
34+
- [ ] I did NOT hand-edit `index.json`, `AGENTS.md`, `README.md`, or `.github/copilot-instructions.md`.
35+
- [ ] If a generated file looks wrong, I have opened an issue on the generator repo (or this PR fixes it upstream).
36+
37+
## Additional notes
38+
39+
<!-- Optional: anything reviewers should know. -->

0 commit comments

Comments
 (0)