# document/ — the NetCorePpt C# API reference

This folder documents **NetCorePpt**, the .NET port of PptxGenJS. It is built
from the official PptxGenJS documentation at <https://gitbrent.github.io/PptxGenJS/>, but filtered down to
what the C# library actually offers: JavaScript / browser / Node-only features
and upstream project meta are gone, and each remaining sample shows the
JavaScript original next to the equivalent **NetCorePpt** C# code.

- Downloaded / generated: **2026-09-17**
- Upstream pages mirrored: **19**
- Code blocks translated: **27**
- Left navigation sidebar: **on every page** — all 19 pages, grouped by topic,
  with the current page expanded into its section anchors
- Index / landing page: **not generated** (by request — the sidebar is the entry point)

## Not in NetCorePpt — removed from these pages

| Removed | Why |
|---|---|
| `integration`, `deprecated`, `needs-repair-errors` (whole pages) | Node / bundler / Web Worker / Electron integration, PptxGenJS v2–v3 npm-era migration history, upstream issue-reporting workflow |
| `compatibility`, `html-to-powerpoint` (whole pages) | browser-only upstream features |
| `Live Demos`, `Universal Compatibility`, `HTML-to-PowerPoint Magic` (introduction) | browser-only features |
| npm / yarn / CDN install instructions | the library ships as the `NetCorePpt` NuGet package — see `installation.html` |
| `write()` output types (blob, arraybuffer, nodebuffer, …) | JS runtime containers; .NET returns `byte[]` from `exportToBytes()` |
| Node stream / Express example | replaced with `exportToStream` and an ASP.NET Core response |
| TypeScript definition sections | typed C# API — there is no `.d.ts` to describe |
| `Contributors`, `Support the Open Source Community`, `Need Help?`, `Issues / Suggestions`, `Full Documentation`, `License` (introduction) | upstream community / attribution links |
| upstream demo links (`demos/modules/demo_*.mjs`, online demos, jsFiddle, StackOverflow) | replaced with this site's own `examples_docs/` |
| npm / jsDelivr / shields.io badge row (introduction) | JavaScript package metadata |
| `types/index.d.ts` references (types, api-shapes, shapes-and-schemes) | replaced with the `ShapeType` / `SchemeColor` enums in `NetCorePpt.CoreEnums` |
| `officegen` project credit (shapes-and-schemes) | upstream dependency attribution, not a NetCorePpt feature |
| "PptxGenJS uses ES6-style getters/setters" (usage-pres-options) | reworded for C# option objects |
| `Source: <upstream url>` callout, `PptxGenJS docs` breadcrumb, per-page "converted from upstream" lead | upstream site meta — each page now introduces itself with its own one-liner; attribution stays in `license.html` |
| slide-master `objects`, `Placeholders` section | `SlideMasterProps.objects` is `internal`, so master decorations and placeholder definitions cannot be declared from consumer code |
| chart option `valueBarColors` | not implemented in NetCorePpt |
| `shapeName`, `newAutoPagedSlides` table rows | renamed in the port to `objectName`, `autoPagedSlides` |

## Layout

| Path | What it is |
|---|---|
| `<slug>.html` | Rendered page — original text plus a JS / C# pane per code sample |
| `md/<slug>.md` | The same page as Markdown (handy for diffs and for feeding other tooling) |
| `css/document.css`, `js/document.js` | Page styles, the JS / C# tab switcher, the left-nav behaviour |
| `assets/images/` | Images pulled from the upstream site |
| `source/raw/<slug>.html` | The page exactly as served by the upstream site (archive) |
| `source/pages.json` | Structured extraction (headings / prose / tables / code blocks) |

## How the conversion works

The C# samples are written against the real NetCorePpt API — the same names the
library exposes, so they line up with `NetCorePptxTest/Modules` and the
`examples_docs/` pages:

```csharp
using NetCorePpt;                  // PptxGen, Slide
using NetCorePpt.CoreInterfaces;   // option objects: TextProps* / ShapeProps / ImageProps / TableProps / HAlign / VAlign ...
using NetCorePpt.CoreEnums;        // ShapeType, ChartType, MediaType, ShadowType, BulletType, DashType, SCHEME_COLORS ...
using TableRow = System.Collections.Generic.List<NetCorePpt.CoreInterfaces.TableCell>;
```

General rules applied throughout:

- `new PptxGenJS()` → `new PptxGen()`; the JS option object literals become C# option
  objects (`{ x: 1, color: "363636" }` → `new TextPropsOptions { x = 1, color = "363636" }`).
- Methods and properties keep their PptxGenJS names (`addText`, `addShape`, `addTable`,
  `slideNumber`, `autoPage`, …), so a JS sample translates almost line for line.
- `writeFile({ fileName })` → `await pptx.exportToFile("…")`; `write()` → `exportToBytes()`;
  `stream()` → `exportToStream(stream)`. There is no promise chain — `await` replaces `.then()`.
- `"left"` / `"center"` / `"right"` become `HAlign.left` / `HAlign.center` / `HAlign.right`,
  and `"top"` / `"middle"` / `"bottom"` become `VAlign.…`.
- Object arrays become typed lists: `[{ text, options }]` → `new List<TextProps> { new TextProps { … } }`.
- Samples that only make sense in a browser or in Node (DOM scraping, downloads, npm
  packaging) are not mirrored at all — the pages describing them are gone.

## Source / licence

The original documentation text and code samples are © Brent Ely and the PptxGenJS
contributors, MIT licensed — see <https://gitbrent.github.io/PptxGenJS/license/> and the third-party attribution
section on <https://pptxgen.net/license.html>. Files under `source/` are reproduced
verbatim for reference.
