document

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2025 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildRequest

type BuildRequest struct {
	TemplatePath string
	ConfigPath   string
	Variables    *config.Variables // Use complex variables from pkg/
	Engine       string
	OutputPath   string
	DoConvert    bool
	DoClean      bool
	DebugEnabled bool // Enable debug mode for persistent concrete files
	Conversion   ConversionSettings
}

BuildRequest encapsulates all parameters for building a document

type BuildResult

type BuildResult struct {
	PDFPath    string
	ImagePaths []string
	Success    bool
	Error      error
}

BuildResult encapsulates the results of building a document

type ConversionSettings

type ConversionSettings struct {
	Enabled bool
	Formats []string
}

ConversionSettings holds conversion options

type DocumentService

type DocumentService struct {
	TemplateProcessor ports.TemplateProcessor
	LaTeXCompiler     ports.LaTeXCompiler
	Converter         ports.Converter
	Cleaner           ports.Cleaner
}

DocumentService orchestrates the document generation workflow It depends on ports (interfaces) for flexibility and testability

func (*DocumentService) Build

Build orchestrates the entire document generation workflow: 1. Process template with variables 2. Compile LaTeX to PDF 3. Optionally convert PDF to images 4. Optionally clean auxiliary files

func (*DocumentService) CleanDocument

func (s *DocumentService) CleanDocument(ctx context.Context, pdfPath string) error

CleanDocument removes auxiliary files for a given PDF

func (*DocumentService) ConvertDocument

func (s *DocumentService) ConvertDocument(ctx context.Context, pdfPath string, formats []string) ([]string, error)

ConvertDocument converts an existing PDF to images

Jump to

Keyboard shortcuts

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