pptx

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertHTMLToText

func ConvertHTMLToText(html string) string

ConvertHTMLToText converts basic HTML to plain text for PowerPoint Strips HTML tags and preserves content

Types

type Slide

type Slide struct {
	// contains filtered or unexported fields
}

Slide represents a slide in the PPTX file

type Template

type Template struct {
	// contains filtered or unexported fields
}

Template represents a PPTX document template

func Open

func Open(path string) (*Template, error)

Open reads a PPTX file and prepares it for manipulation

func (*Template) Apply

func (t *Template) Apply(data map[string]any) error

Apply replaces multiple placeholders

func (*Template) Close

func (t *Template) Close() error

Close releases resources

func (*Template) ProcessLoops

func (t *Template) ProcessLoops(data map[string]any) error

ProcessLoops handles {#arrayName}...{/arrayName} in slides Duplicates slides for each array element

func (*Template) Save

func (t *Template) Save(path string) error

Save writes the modified PPTX file

func (*Template) SetTextValue

func (t *Template) SetTextValue(placeholder, value string) error

SetTextValue replaces a placeholder in text runs with a value

func (*Template) SetTextValueHTML

func (t *Template) SetTextValueHTML(placeholder, htmlValue string) error

SetTextValueHTML replaces a placeholder with HTML content (basic support)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL