Documentation
¶
Overview ¶
Package convert is the ONE AND ONLY package in the eden-press module that imports github.com/chromedp/chromedp (and its cdproto companion). Every chromedp-touching type, launch flag, and CDP call lives under convert/ or one of its subpackages (convert/chrome, and the sibling exporters convert/pdf and convert/png added by later TRDs).
press/, chase/, and profiles/ MUST NEVER import convert/ (directly or transitively) -- doing so would pull chromedp into the public render path, breaking the zero-chromedp boundary that scripts/check-no-chromedp.sh mechanically enforces in CI (`go list -deps ./press/... ./chase/... ./profiles/...` must contain zero chromedp packages). The dependency edge is strictly one-directional: convert/ imports press/ (to consume press.Output as its rendering input), and press/ never imports convert/.
This boundary is why chromedp is provisioned here, in this TRD, and nowhere else: the moment chromedp entered go.mod, check-no-chromedp.sh became the load-bearing proof that the one-directional edge holds.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageFormat ¶
type ImageFormat int
ImageFormat selects the raster image format a screenshot-based exporter (convert/png, added by a later TRD) produces. The zero value is PNG.
const ( // PNG is the lossless raster format and the zero value of ImageFormat. PNG ImageFormat = iota // JPEG is the lossy raster format, selectable when smaller output size // matters more than pixel-perfect fidelity. JPEG )
func (ImageFormat) String ¶
func (f ImageFormat) String() string
String returns the lower-case name of the format ("png" or "jpeg"). An unrecognized value (outside the two declared constants) returns "unknown" rather than panicking.
type Options ¶
type Options struct {
// BrowserPath, when non-empty, is an explicit Chrome/Chromium executable
// override -- the highest-precedence tier of convert/chrome.Discover's
// fallback chain. Leave empty to let Discover fall through to
// CHROME_PATH, then auto-detection, then the documented pinned-download
// tier.
BrowserPath string
}
Options is the shared cross-exporter option surface both convert/pdf and convert/png (added by later TRDs) consume. It is deliberately minimal -- mirroring the frozen-surface discipline of press.Options -- and grows a field only when a named consumer needs it, never speculatively.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package chrome implements the EXP-04 Chrome-discovery fallback chain (Discover), the one-browser-many-tabs Session pool primitive that every convert/ exporter (convert/pdf, convert/png) drives its rendering through, and the SHARED determinism substrate (determinism.go, load.go, fonts.go) those same exporters fold in exactly once: ComposeCSS/PageCSSInches (pure CSS transforms), ApplyDeterminism (the ordered CDP recipe), LoadHTML (the SetDocumentContent loader), and the embedded STIX Two Math font (EXP-04 font provisioning).
|
Package chrome implements the EXP-04 Chrome-discovery fallback chain (Discover), the one-browser-many-tabs Session pool primitive that every convert/ exporter (convert/pdf, convert/png) drives its rendering through, and the SHARED determinism substrate (determinism.go, load.go, fonts.go) those same exporters fold in exactly once: ComposeCSS/PageCSSInches (pure CSS transforms), ApplyDeterminism (the ordered CDP recipe), LoadHTML (the SetDocumentContent loader), and the embedded STIX Two Math font (EXP-04 font provisioning). |
|
Package docx renders a chase/model.Document to an editable Word .docx, built DIRECTLY from the docmodel as hand-rolled OOXML -- zero rendered HTML, zero chromedp, zero Node.
|
Package docx renders a chase/model.Document to an editable Word .docx, built DIRECTLY from the docmodel as hand-rolled OOXML -- zero rendered HTML, zero chromedp, zero Node. |
|
Package pdf delivers EXP-01: deterministic PDF export of an already-rendered deck (press.Output) via chromedp's Chrome DevTools Protocol Page.PrintToPDF call, driven through convert/chrome's Session pool and its shared determinism substrate (ComposeCSS/PageCSSInches/ ApplyDeterminism/LoadHTML -- 05-02).
|
Package pdf delivers EXP-01: deterministic PDF export of an already-rendered deck (press.Output) via chromedp's Chrome DevTools Protocol Page.PrintToPDF call, driven through convert/chrome's Session pool and its shared determinism substrate (ComposeCSS/PageCSSInches/ ApplyDeterminism/LoadHTML -- 05-02). |
|
Package png implements EXP-02: per-slide PNG/JPEG export via chromedp element screenshots.
|
Package png implements EXP-02: per-slide PNG/JPEG export via chromedp element screenshots. |
|
Package pptx is Eden Press's hand-rolled, stdlib-only (archive/zip + encoding/xml) OOXML PresentationML writer: it emits editable-text-box .pptx files directly from chase/model.Document, with NO headless browser and NO third-party OOXML library (unioffice and its forks were evaluated and rejected -- AGPLv3 licensing / commercial license-key + network check-in; see 06-RESEARCH.md's re-confirmed decision gate).
|
Package pptx is Eden Press's hand-rolled, stdlib-only (archive/zip + encoding/xml) OOXML PresentationML writer: it emits editable-text-box .pptx files directly from chase/model.Document, with NO headless browser and NO third-party OOXML library (unioffice and its forks were evaluated and rejected -- AGPLv3 licensing / commercial license-key + network check-in; see 06-RESEARCH.md's re-confirmed decision gate). |
|
Package xlsx renders a chase/model.Document to an Excel .xlsx workbook, built DIRECTLY from the docmodel as hand-rolled OOXML SpreadsheetML -- zero rendered HTML, zero chromedp, zero Node.
|
Package xlsx renders a chase/model.Document to an Excel .xlsx workbook, built DIRECTLY from the docmodel as hand-rolled OOXML SpreadsheetML -- zero rendered HTML, zero chromedp, zero Node. |